Coverage Report

Created: 2026-09-20 06:33

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
98.9k
#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
414
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
414
    (void)module;
53
414
    (void)op;
54
55
414
    if ( result.second != std::nullopt ) {
56
362
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
362
    }
58
414
}
59
60
414
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
414
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
414
    return module->OpDigest(op);
64
414
}
65
66
/* Specialization for operation::HMAC */
67
521
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
521
    (void)module;
69
521
    (void)op;
70
71
521
    if ( result.second != std::nullopt ) {
72
291
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
291
    }
74
521
}
75
76
521
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
521
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
521
    return module->OpHMAC(op);
80
521
}
81
82
/* Specialization for operation::UMAC */
83
90
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
90
    (void)module;
85
90
    (void)op;
86
87
90
    if ( result.second != std::nullopt ) {
88
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
0
    }
90
90
}
91
92
90
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
90
    return module->OpUMAC(op);
94
90
}
95
96
/* Specialization for operation::CMAC */
97
333
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
333
    (void)module;
99
333
    (void)op;
100
101
333
    if ( result.second != std::nullopt ) {
102
156
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
156
    }
104
333
}
105
106
333
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
333
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
333
    return module->OpCMAC(op);
110
333
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
1.97k
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.97k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
1.97k
    if ( result.second != std::nullopt ) {
119
961
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
961
        if ( result.second->tag != std::nullopt ) {
121
10
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
10
        }
123
961
    }
124
125
1.97k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
928
        using fuzzing::datasource::ID;
127
128
928
        bool tryDecrypt = true;
129
130
928
        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
928
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
928
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
928
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
928
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
928
                    op.cleartext.GetSize() + 32,
171
172
928
                    op.aad,
173
174
                    /* Empty modifier */
175
928
                    {});
176
177
928
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
928
            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
928
            } 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
928
        }
208
928
    }
209
1.97k
}
210
211
1.97k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
1.97k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
1.97k
    return module->OpSymmetricEncrypt(op);
215
1.97k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
917
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
917
    (void)module;
220
917
    (void)op;
221
222
917
    if ( result.second != std::nullopt ) {
223
211
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
211
    }
225
917
}
226
227
917
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
917
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
917
    return module->OpSymmetricDecrypt(op);
231
917
}
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
321
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
321
    (void)module;
250
321
    (void)op;
251
252
321
    if ( result.second != std::nullopt ) {
253
111
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
111
    }
255
321
}
256
257
321
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
321
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
321
    return module->OpKDF_HKDF(op);
261
321
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
91
template<> void ExecutorBase<component::Key, operation::KDF_PBKDF>::postprocess(std::shared_ptr<Module> module, operation::KDF_PBKDF& op, const ExecutorBase<component::Key, operation::KDF_PBKDF>::ResultPair& result) const {
265
91
    (void)module;
266
91
    (void)op;
267
268
91
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
91
}
272
273
91
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
91
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
91
    return module->OpKDF_PBKDF(op);
277
91
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
98
template<> void ExecutorBase<component::Key, operation::KDF_PBKDF1>::postprocess(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op, const ExecutorBase<component::Key, operation::KDF_PBKDF1>::ResultPair& result) const {
281
98
    (void)module;
282
98
    (void)op;
283
284
98
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
98
}
288
289
98
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
98
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
98
    return module->OpKDF_PBKDF1(op);
293
98
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
272
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
272
    (void)module;
298
272
    (void)op;
299
300
272
    if ( result.second != std::nullopt ) {
301
143
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
143
    }
303
272
}
304
305
272
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
272
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
272
    return module->OpKDF_PBKDF2(op);
309
272
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
2
template<> void ExecutorBase<component::Key, operation::KDF_ARGON2>::postprocess(std::shared_ptr<Module> module, operation::KDF_ARGON2& op, const ExecutorBase<component::Key, operation::KDF_ARGON2>::ResultPair& result) const {
313
2
    (void)module;
314
2
    (void)op;
315
316
2
    if ( result.second != std::nullopt ) {
317
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
0
    }
319
2
}
320
321
2
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
2
    return module->OpKDF_ARGON2(op);
323
2
}
324
325
/* Specialization for operation::KDF_SSH */
326
89
template<> void ExecutorBase<component::Key, operation::KDF_SSH>::postprocess(std::shared_ptr<Module> module, operation::KDF_SSH& op, const ExecutorBase<component::Key, operation::KDF_SSH>::ResultPair& result) const {
327
89
    (void)module;
328
89
    (void)op;
329
330
89
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
89
}
334
335
89
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
89
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
89
    return module->OpKDF_SSH(op);
339
89
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
72
template<> void ExecutorBase<component::Key, operation::KDF_TLS1_PRF>::postprocess(std::shared_ptr<Module> module, operation::KDF_TLS1_PRF& op, const ExecutorBase<component::Key, operation::KDF_TLS1_PRF>::ResultPair& result) const {
343
72
    (void)module;
344
72
    (void)op;
345
346
72
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
72
}
350
351
72
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_TLS1_PRF>::callModule(std::shared_ptr<Module> module, operation::KDF_TLS1_PRF& op) const {
352
72
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
72
    return module->OpKDF_TLS1_PRF(op);
355
72
}
356
357
/* Specialization for operation::KDF_X963 */
358
75
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
75
    (void)module;
360
75
    (void)op;
361
362
75
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
75
}
366
367
75
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
75
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
75
    return module->OpKDF_X963(op);
371
75
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
14
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
14
    (void)module;
376
14
    (void)op;
377
378
14
    if ( result.second != std::nullopt ) {
379
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
0
    }
381
14
}
382
383
14
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
14
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
14
    return module->OpKDF_BCRYPT(op);
387
14
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
108
template<> void ExecutorBase<component::Key, operation::KDF_SP_800_108>::postprocess(std::shared_ptr<Module> module, operation::KDF_SP_800_108& op, const ExecutorBase<component::Key, operation::KDF_SP_800_108>::ResultPair& result) const {
391
108
    (void)module;
392
108
    (void)op;
393
394
108
    if ( result.second != std::nullopt ) {
395
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
0
    }
397
108
}
398
399
108
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SP_800_108>::callModule(std::shared_ptr<Module> module, operation::KDF_SP_800_108& op) const {
400
108
    if ( op.mech.mode == true ) {
401
90
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
90
    }
403
404
108
    return module->OpKDF_SP_800_108(op);
405
108
}
406
407
/* Specialization for operation::KDF_SRTP */
408
56
template<> void ExecutorBase<component::Key3, operation::KDF_SRTP>::postprocess(std::shared_ptr<Module> module, operation::KDF_SRTP& op, const ExecutorBase<component::Key3, operation::KDF_SRTP>::ResultPair& result) const {
409
56
    (void)module;
410
56
    (void)op;
411
56
    (void)result;
412
56
}
413
414
56
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const {
415
56
    return module->OpKDF_SRTP(op);
416
56
}
417
418
/* Specialization for operation::KDF_SRTCP */
419
71
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
71
    (void)module;
421
71
    (void)op;
422
71
    (void)result;
423
71
}
424
425
71
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const {
426
71
    return module->OpKDF_SRTCP(op);
427
71
}
428
429
/* Specialization for operation::ECC_PrivateToPublic */
430
5.50k
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op, const ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::ResultPair& result) const {
431
5.50k
    (void)module;
432
433
5.50k
    if ( result.second != std::nullopt  ) {
434
2.26k
        const auto curveID = op.curveType.Get();
435
2.26k
        const auto privkey = op.priv.ToTrimmedString();
436
2.26k
        const auto pub_x = result.second->first.ToTrimmedString();
437
2.26k
        const auto pub_y = result.second->second.ToTrimmedString();
438
439
2.26k
        Pool_CurvePrivkey.Set({ curveID, privkey });
440
2.26k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
441
2.26k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
442
443
2.26k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
444
2.26k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
445
2.26k
    }
446
5.50k
}
447
448
5.50k
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op) const {
449
5.50k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
450
451
5.50k
    const size_t size = op.priv.ToTrimmedString().size();
452
453
5.50k
    if ( size == 0 || size > 4096 ) {
454
82
        return std::nullopt;
455
82
    }
456
457
5.41k
    return module->OpECC_PrivateToPublic(op);
458
5.50k
}
459
460
/* Specialization for operation::ECC_ValidatePubkey */
461
3.58k
template<> void ExecutorBase<bool, operation::ECC_ValidatePubkey>::postprocess(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op, const ExecutorBase<bool, operation::ECC_ValidatePubkey>::ResultPair& result) const {
462
3.58k
    (void)module;
463
3.58k
    (void)op;
464
3.58k
    (void)result;
465
3.58k
}
466
467
3.58k
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
468
3.58k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
469
470
3.58k
    return module->OpECC_ValidatePubkey(op);
471
3.58k
}
472
473
/* Specialization for operation::ECC_GenerateKeyPair */
474
475
/* Do not compare DH_GenerateKeyPair results, because the result can be produced indeterministically */
476
template <>
477
1.20k
void ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DH_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
478
1.20k
    (void)operations;
479
1.20k
    (void)results;
480
1.20k
    (void)data;
481
1.20k
    (void)size;
482
1.20k
}
483
484
7.13k
template<> void ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op, const ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::ResultPair& result) const {
485
7.13k
    (void)module;
486
487
7.13k
    if ( result.second != std::nullopt  ) {
488
2.48k
        const auto curveID = op.curveType.Get();
489
2.48k
        const auto privkey = result.second->priv.ToTrimmedString();
490
2.48k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
491
2.48k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
492
493
2.48k
        Pool_CurvePrivkey.Set({ curveID, privkey });
494
2.48k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
495
2.48k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
496
497
2.48k
        {
498
2.48k
            auto opValidate = operation::ECC_ValidatePubkey(
499
2.48k
                    op.curveType,
500
2.48k
                    result.second->pub,
501
2.48k
                    op.modifier);
502
503
2.48k
            const auto validateResult = module->OpECC_ValidatePubkey(opValidate);
504
2.48k
            CF_ASSERT(
505
2.48k
                    validateResult == std::nullopt ||
506
2.48k
                    *validateResult == true,
507
2.48k
                    "Cannot validate generated public key");
508
2.48k
        }
509
2.48k
    }
510
7.13k
}
511
512
7.13k
template<> std::optional<component::ECC_KeyPair> ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op) const {
513
7.13k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
514
515
7.13k
    return module->OpECC_GenerateKeyPair(op);
516
7.13k
}
517
518
/* Specialization for operation::ECCSI_Sign */
519
578
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
578
    (void)module;
521
522
578
    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
578
}
565
566
578
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
578
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
568
578
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
569
570
410
    const size_t size = op.priv.ToTrimmedString().size();
571
572
410
    if ( size == 0 || size > 4096 ) {
573
3
        return std::nullopt;
574
3
    }
575
576
407
    return module->OpECCSI_Sign(op);
577
410
}
578
579
/* Specialization for operation::ECDSA_Sign */
580
7.87k
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
7.87k
    (void)module;
582
583
7.87k
    if ( result.second != std::nullopt  ) {
584
5.14k
        const auto curveID = op.curveType.Get();
585
5.14k
        const auto cleartext = op.cleartext.ToHex();
586
5.14k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
587
5.14k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
588
5.14k
        const auto sig_r = result.second->signature.first.ToTrimmedString();
589
5.14k
        const auto sig_s = result.second->signature.second.ToTrimmedString();
590
591
5.14k
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
592
5.14k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
593
5.14k
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
594
595
5.14k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
596
5.14k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
597
5.14k
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
598
5.14k
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
599
600
5.14k
        {
601
5.14k
            auto opVerify = operation::ECDSA_Verify(
602
5.14k
                    op,
603
5.14k
                    *(result.second),
604
5.14k
                    op.modifier);
605
606
5.14k
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
607
5.14k
            CF_ASSERT(
608
5.14k
                    verifyResult == std::nullopt ||
609
5.14k
                    *verifyResult == true,
610
5.14k
                    "Cannot verify generated signature");
611
5.14k
        }
612
5.14k
    }
613
7.87k
}
614
615
7.87k
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
7.87k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
617
7.87k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
618
619
7.65k
    const size_t size = op.priv.ToTrimmedString().size();
620
621
7.65k
    if ( size == 0 || size > 4096 ) {
622
3
        return std::nullopt;
623
3
    }
624
625
7.64k
    return module->OpECDSA_Sign(op);
626
7.65k
}
627
628
/* Specialization for operation::ECGDSA_Sign */
629
4
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
4
    (void)module;
631
632
4
    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
4
}
650
651
4
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
4
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
653
4
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
654
655
4
    const size_t size = op.priv.ToTrimmedString().size();
656
657
4
    if ( size == 0 || size > 4096 ) {
658
1
        return std::nullopt;
659
1
    }
660
661
3
    return module->OpECGDSA_Sign(op);
662
4
}
663
664
/* Specialization for operation::ECRDSA_Sign */
665
3
template<> void ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECRDSA_Sign& op, const ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::ResultPair& result) const {
666
3
    (void)module;
667
668
3
    if ( result.second != std::nullopt  ) {
669
0
        const auto curveID = op.curveType.Get();
670
0
        const auto cleartext = op.cleartext.ToHex();
671
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
672
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
673
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
674
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
675
676
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
677
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
678
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
679
680
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
681
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
682
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
683
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
684
0
    }
685
3
}
686
687
3
template<> std::optional<component::ECRDSA_Signature> ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Sign& op) const {
688
3
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
689
3
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
690
691
3
    const size_t size = op.priv.ToTrimmedString().size();
692
693
3
    if ( size == 0 || size > 4096 ) {
694
0
        return std::nullopt;
695
0
    }
696
697
3
    return module->OpECRDSA_Sign(op);
698
3
}
699
700
/* Specialization for operation::Schnorr_Sign */
701
2
template<> void ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::postprocess(std::shared_ptr<Module> module, operation::Schnorr_Sign& op, const ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::ResultPair& result) const {
702
2
    (void)module;
703
704
2
    if ( result.second != std::nullopt  ) {
705
0
        const auto curveID = op.curveType.Get();
706
0
        const auto cleartext = op.cleartext.ToHex();
707
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
708
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
709
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
710
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
711
712
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
713
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
714
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
715
716
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
717
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
718
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
719
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
720
0
    }
721
2
}
722
723
2
template<> std::optional<component::Schnorr_Signature> ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Sign& op) const {
724
2
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
2
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
726
727
2
    const size_t size = op.priv.ToTrimmedString().size();
728
729
2
    if ( size == 0 || size > 4096 ) {
730
0
        return std::nullopt;
731
0
    }
732
733
2
    return module->OpSchnorr_Sign(op);
734
2
}
735
736
/* Specialization for operation::ECCSI_Verify */
737
291
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
291
    (void)module;
739
291
    (void)op;
740
291
    (void)result;
741
291
}
742
743
291
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
744
291
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
745
291
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
746
747
120
    return module->OpECCSI_Verify(op);
748
291
}
749
750
/* Specialization for operation::ECDSA_Verify */
751
4.07k
template<> void ExecutorBase<bool, operation::ECDSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Verify& op, const ExecutorBase<bool, operation::ECDSA_Verify>::ResultPair& result) const {
752
4.07k
    (void)module;
753
4.07k
    (void)op;
754
4.07k
    (void)result;
755
4.07k
}
756
757
4.07k
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
758
4.07k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
759
4.07k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
760
761
    /* Intentionally do not constrain the size of the public key or
762
     * signature (like we do for BignumCalc).
763
     *
764
     * If any large public key or signature causes a time-out (or
765
     * worse), this is something that needs attention;
766
     * because verifiers sometimes process untrusted public keys,
767
     * signatures or both, they should be resistant to bugs
768
     * arising from large inputs.
769
     */
770
771
3.85k
    return module->OpECDSA_Verify(op);
772
4.07k
}
773
774
/* Specialization for operation::ECGDSA_Verify */
775
2
template<> void ExecutorBase<bool, operation::ECGDSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op, const ExecutorBase<bool, operation::ECGDSA_Verify>::ResultPair& result) const {
776
2
    (void)module;
777
2
    (void)op;
778
2
    (void)result;
779
2
}
780
781
2
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
782
2
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
783
2
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
784
785
    /* Intentionally do not constrain the size of the public key or
786
     * signature (like we do for BignumCalc).
787
     *
788
     * If any large public key or signature causes a time-out (or
789
     * worse), this is something that needs attention;
790
     * because verifiers sometimes process untrusted public keys,
791
     * signatures or both, they should be resistant to bugs
792
     * arising from large inputs.
793
     */
794
795
2
    return module->OpECGDSA_Verify(op);
796
2
}
797
798
/* Specialization for operation::ECRDSA_Verify */
799
2
template<> void ExecutorBase<bool, operation::ECRDSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op, const ExecutorBase<bool, operation::ECRDSA_Verify>::ResultPair& result) const {
800
2
    (void)module;
801
2
    (void)op;
802
2
    (void)result;
803
2
}
804
805
2
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
806
2
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
807
2
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
808
809
    /* Intentionally do not constrain the size of the public key or
810
     * signature (like we do for BignumCalc).
811
     *
812
     * If any large public key or signature causes a time-out (or
813
     * worse), this is something that needs attention;
814
     * because verifiers sometimes process untrusted public keys,
815
     * signatures or both, they should be resistant to bugs
816
     * arising from large inputs.
817
     */
818
819
2
    return module->OpECRDSA_Verify(op);
820
2
}
821
822
/* Specialization for operation::Schnorr_Verify */
823
5
template<> void ExecutorBase<bool, operation::Schnorr_Verify>::postprocess(std::shared_ptr<Module> module, operation::Schnorr_Verify& op, const ExecutorBase<bool, operation::Schnorr_Verify>::ResultPair& result) const {
824
5
    (void)module;
825
5
    (void)op;
826
5
    (void)result;
827
5
}
828
829
5
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
830
5
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
831
5
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
832
833
    /* Intentionally do not constrain the size of the public key or
834
     * signature (like we do for BignumCalc).
835
     *
836
     * If any large public key or signature causes a time-out (or
837
     * worse), this is something that needs attention;
838
     * because verifiers sometimes process untrusted public keys,
839
     * signatures or both, they should be resistant to bugs
840
     * arising from large inputs.
841
     */
842
843
5
    return module->OpSchnorr_Verify(op);
844
5
}
845
846
7
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Recover& op, const ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::ResultPair& result) const {
847
7
    (void)module;
848
7
    (void)op;
849
7
    (void)result;
850
7
}
851
852
7
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Recover& op) const {
853
7
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
854
7
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
855
856
7
    return module->OpECDSA_Recover(op);
857
7
}
858
859
/* Specialization for operation::DSA_Verify */
860
0
template<> void ExecutorBase<bool, operation::DSA_Verify>::updateExtraCounters(const uint64_t moduleID, operation::DSA_Verify& op) const {
861
0
    (void)moduleID;
862
0
    (void)op;
863
864
    /* TODO */
865
0
}
866
867
27
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
27
    (void)module;
869
27
    (void)op;
870
27
    (void)result;
871
27
}
872
873
27
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
874
27
    const std::vector<size_t> sizes = {
875
27
        op.parameters.p.ToTrimmedString().size(),
876
27
        op.parameters.q.ToTrimmedString().size(),
877
27
        op.parameters.g.ToTrimmedString().size(),
878
27
        op.pub.ToTrimmedString().size(),
879
27
        op.signature.first.ToTrimmedString().size(),
880
27
        op.signature.second.ToTrimmedString().size(),
881
27
    };
882
883
149
    for (const auto& size : sizes) {
884
149
        if ( size == 0 || size > 4096 ) {
885
5
            return std::nullopt;
886
5
        }
887
149
    }
888
889
22
    return module->OpDSA_Verify(op);
890
27
}
891
892
/* Specialization for operation::DSA_Sign */
893
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
894
template <>
895
8
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
8
    (void)operations;
897
8
    (void)results;
898
8
    (void)data;
899
8
    (void)size;
900
8
}
901
0
template<> void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::updateExtraCounters(const uint64_t moduleID, operation::DSA_Sign& op) const {
902
0
    (void)moduleID;
903
0
    (void)op;
904
905
    /* TODO */
906
0
}
907
908
16
template<> void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::DSA_Sign& op, const ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::ResultPair& result) const {
909
16
    (void)module;
910
16
    (void)op;
911
16
    if ( result.second != std::nullopt ) {
912
0
        const auto cleartext = op.cleartext.ToHex();
913
0
        const auto p = op.parameters.p.ToTrimmedString();
914
0
        const auto q = op.parameters.q.ToTrimmedString();
915
0
        const auto g = op.parameters.g.ToTrimmedString();
916
0
        const auto r = result.second->signature.first.ToTrimmedString();
917
0
        const auto s = result.second->signature.second.ToTrimmedString();
918
0
        const auto pub = result.second->pub.ToTrimmedString();
919
920
0
        Pool_DSASignature.Set({
921
0
                cleartext,
922
0
                p,
923
0
                q,
924
0
                g,
925
0
                pub,
926
0
                r,
927
0
                s
928
0
        });
929
930
0
        if ( r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(r); }
931
0
        if ( s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(s); }
932
0
    }
933
16
}
934
935
16
template<> std::optional<component::DSA_Signature> ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::callModule(std::shared_ptr<Module> module, operation::DSA_Sign& op) const {
936
16
    const std::vector<size_t> sizes = {
937
16
        op.parameters.p.ToTrimmedString().size(),
938
16
        op.parameters.q.ToTrimmedString().size(),
939
16
        op.parameters.g.ToTrimmedString().size(),
940
16
        op.priv.ToTrimmedString().size(),
941
16
    };
942
943
61
    for (const auto& size : sizes) {
944
61
        if ( size == 0 || size > 4096 ) {
945
13
            return std::nullopt;
946
13
        }
947
61
    }
948
949
3
    return module->OpDSA_Sign(op);
950
16
}
951
952
/* Specialization for operation::DSA_PrivateToPublic */
953
954
0
template<> void ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::updateExtraCounters(const uint64_t moduleID, operation::DSA_PrivateToPublic& op) const {
955
0
    (void)moduleID;
956
0
    (void)op;
957
958
    /* TODO */
959
0
}
960
961
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
8
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
8
    (void)operations;
980
8
    (void)results;
981
8
    (void)data;
982
8
    (void)size;
983
8
}
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
13
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
13
    (void)result;
994
13
    (void)module;
995
13
    (void)op;
996
13
    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
13
}
1003
1004
13
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
13
    const std::vector<size_t> sizes = {
1006
13
        op.p.ToTrimmedString().size(),
1007
13
        op.q.ToTrimmedString().size(),
1008
13
        op.g.ToTrimmedString().size(),
1009
13
    };
1010
1011
38
    for (const auto& size : sizes) {
1012
38
        if ( size == 0 || size > 4096 ) {
1013
7
            return std::nullopt;
1014
7
        }
1015
38
    }
1016
1017
6
    return module->OpDSA_GenerateKeyPair(op);
1018
13
}
1019
1020
/* Specialization for operation::DSA_GenerateParameters */
1021
1022
/* Do not compare DSA_GenerateParameters results, because the result can be produced indeterministically */
1023
template <>
1024
0
void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DSA_GenerateParameters> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
1025
0
    (void)operations;
1026
0
    (void)results;
1027
0
    (void)data;
1028
0
    (void)size;
1029
0
}
1030
1031
0
template<> void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateParameters& op) const {
1032
0
    (void)moduleID;
1033
0
    (void)op;
1034
1035
    /* TODO */
1036
0
}
1037
1038
0
template<> void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::postprocess(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op, const ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::ResultPair& result) const {
1039
0
    (void)result;
1040
0
    (void)module;
1041
0
    (void)op;
1042
0
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1043
0
        const auto P = result.second->p.ToTrimmedString();
1044
0
        const auto Q = result.second->q.ToTrimmedString();
1045
0
        const auto G = result.second->g.ToTrimmedString();
1046
1047
0
        Pool_DSA_PQG.Set({P, Q, G});
1048
1049
0
        if ( P.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(P); }
1050
0
        if ( Q.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(Q); }
1051
0
        if ( G.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(G); }
1052
0
    }
1053
0
}
1054
1055
0
template<> std::optional<component::DSA_Parameters> ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op) const {
1056
0
    return module->OpDSA_GenerateParameters(op);
1057
0
}
1058
1059
/* Specialization for operation::ECDH_Derive */
1060
748
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
748
    (void)module;
1062
748
    (void)op;
1063
748
    (void)result;
1064
748
}
1065
1066
748
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1067
748
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1068
1069
748
    return module->OpECDH_Derive(op);
1070
748
}
1071
1072
/* Specialization for operation::ECIES_Encrypt */
1073
template <>
1074
435
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
435
    (void)operations;
1076
435
    (void)results;
1077
435
    (void)data;
1078
435
    (void)size;
1079
435
}
1080
941
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
941
    (void)module;
1082
941
    (void)op;
1083
941
    (void)result;
1084
941
}
1085
1086
941
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1087
941
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1088
1089
941
    return module->OpECIES_Encrypt(op);
1090
941
}
1091
1092
/* Specialization for operation::ECIES_Decrypt */
1093
895
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
895
    (void)module;
1095
895
    (void)op;
1096
895
    (void)result;
1097
895
}
1098
1099
895
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1100
895
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1101
1102
895
    return module->OpECIES_Decrypt(op);
1103
895
}
1104
1105
/* Specialization for operation::ECC_Point_Add */
1106
3.24k
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.24k
    (void)module;
1108
1109
3.24k
    if ( result.second != std::nullopt  ) {
1110
120
        const auto curveID = op.curveType.Get();
1111
120
        const auto x = result.second->first.ToTrimmedString();
1112
120
        const auto y = result.second->second.ToTrimmedString();
1113
1114
120
        Pool_CurveECC_Point.Set({ curveID, x, y });
1115
1116
120
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1117
120
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1118
120
    }
1119
3.24k
}
1120
1121
3.24k
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.24k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1123
1124
3.24k
    return module->OpECC_Point_Add(op);
1125
3.24k
}
1126
1127
/* Specialization for operation::ECC_Point_Sub */
1128
0
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Sub& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>::ResultPair& result) const {
1129
0
    (void)module;
1130
1131
0
    if ( result.second != std::nullopt  ) {
1132
0
        const auto curveID = op.curveType.Get();
1133
0
        const auto x = result.second->first.ToTrimmedString();
1134
0
        const auto y = result.second->second.ToTrimmedString();
1135
1136
0
        Pool_CurveECC_Point.Set({ curveID, x, y });
1137
1138
0
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1139
0
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1140
0
    }
1141
0
}
1142
1143
0
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Sub& op) const {
1144
0
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1145
1146
0
    return module->OpECC_Point_Sub(op);
1147
0
}
1148
1149
/* Specialization for operation::ECC_Point_Mul */
1150
2.93k
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Mul& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::ResultPair& result) const {
1151
2.93k
    (void)module;
1152
1153
2.93k
    if ( result.second != std::nullopt  ) {
1154
152
        const auto curveID = op.curveType.Get();
1155
152
        const auto x = result.second->first.ToTrimmedString();
1156
152
        const auto y = result.second->second.ToTrimmedString();
1157
1158
152
        Pool_CurveECC_Point.Set({ curveID, x, y });
1159
1160
152
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1161
152
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1162
152
    }
1163
2.93k
}
1164
1165
2.93k
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Mul& op) const {
1166
2.93k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1167
1168
2.93k
    return module->OpECC_Point_Mul(op);
1169
2.93k
}
1170
1171
/* Specialization for operation::ECC_Point_Neg */
1172
24
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
24
    (void)module;
1174
1175
24
    if ( result.second != std::nullopt  ) {
1176
3
        const auto curveID = op.curveType.Get();
1177
3
        const auto x = result.second->first.ToTrimmedString();
1178
3
        const auto y = result.second->second.ToTrimmedString();
1179
1180
3
        Pool_CurveECC_Point.Set({ curveID, x, y });
1181
1182
3
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1183
3
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1184
3
    }
1185
24
}
1186
1187
24
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
24
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1189
1190
24
    return module->OpECC_Point_Neg(op);
1191
24
}
1192
1193
/* Specialization for operation::ECC_Point_Dbl */
1194
4.63k
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Dbl& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>::ResultPair& result) const {
1195
4.63k
    (void)module;
1196
1197
4.63k
    if ( result.second != std::nullopt  ) {
1198
117
        const auto curveID = op.curveType.Get();
1199
117
        const auto x = result.second->first.ToTrimmedString();
1200
117
        const auto y = result.second->second.ToTrimmedString();
1201
1202
117
        Pool_CurveECC_Point.Set({ curveID, x, y });
1203
1204
117
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1205
117
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1206
117
    }
1207
4.63k
}
1208
1209
4.63k
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Dbl& op) const {
1210
4.63k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1211
1212
4.63k
    return module->OpECC_Point_Dbl(op);
1213
4.63k
}
1214
1215
/* Specialization for operation::ECC_Point_Cmp */
1216
16
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
16
    (void)module;
1218
16
    (void)result;
1219
16
    (void)op;
1220
16
}
1221
1222
16
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1223
16
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1224
1225
16
    return module->OpECC_Point_Cmp(op);
1226
16
}
1227
1228
/* Specialization for operation::DH_Derive */
1229
1.51k
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.51k
    (void)module;
1231
1.51k
    (void)op;
1232
1.51k
    (void)result;
1233
1.51k
}
1234
1235
1.51k
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1236
1.51k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1237
1.46k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1238
1.43k
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1239
1.39k
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1240
1241
1.33k
    return module->OpDH_Derive(op);
1242
1.39k
}
1243
1244
/* Specialization for operation::DH_GenerateKeyPair */
1245
2.00k
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.00k
    (void)result;
1247
2.00k
    (void)op;
1248
2.00k
    (void)module;
1249
1250
2.00k
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1251
28
        const auto priv = result.second->first.ToTrimmedString();
1252
28
        const auto pub = result.second->second.ToTrimmedString();
1253
1254
28
        Pool_DH_PrivateKey.Set(priv);
1255
28
        Pool_DH_PublicKey.Set(pub);
1256
28
    }
1257
2.00k
}
1258
1259
2.00k
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.00k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1261
1.97k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1262
1263
1.93k
    return module->OpDH_GenerateKeyPair(op);
1264
1.97k
}
1265
1266
/* Specialization for operation::BignumCalc */
1267
36.8k
template<> void ExecutorBase<component::Bignum, operation::BignumCalc>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc& op, const ExecutorBase<component::Bignum, operation::BignumCalc>::ResultPair& result) const {
1268
36.8k
    (void)module;
1269
36.8k
    (void)op;
1270
1271
36.8k
    if ( result.second != std::nullopt  ) {
1272
15.1k
        const auto bignum = result.second->ToTrimmedString();
1273
1274
15.1k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1275
15.1k
            Pool_Bignum.Set(bignum);
1276
15.1k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1277
436
                Pool_Bignum_Primes.Set(bignum);
1278
436
            }
1279
15.1k
        }
1280
15.1k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1281
1.12k
            if ( bignum == "1" ) {
1282
508
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1283
508
            }
1284
1.12k
        }
1285
15.1k
    }
1286
36.8k
}
1287
1288
36.8k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1289
36.8k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1290
1291
    /* Prevent timeouts */
1292
36.8k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1293
36.8k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1294
36.7k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1295
36.7k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1296
1297
36.6k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1298
25
        return std::nullopt;
1299
25
    }
1300
1301
36.6k
    switch ( op.calcOp.Get() ) {
1302
431
        case    CF_CALCOP("SetBit(A,B)"):
1303
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1304
431
            if ( op.bn1.GetSize() > 4 ) {
1305
47
                return std::nullopt;
1306
47
            }
1307
384
            break;
1308
384
        case    CF_CALCOP("Exp(A,B)"):
1309
144
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1310
100
                return std::nullopt;
1311
100
            }
1312
44
            break;
1313
115
        case    CF_CALCOP("ModLShift(A,B,C)"):
1314
115
            if ( op.bn1.GetSize() > 4 ) {
1315
66
                return std::nullopt;
1316
66
            }
1317
49
            break;
1318
244
        case    CF_CALCOP("Exp2(A)"):
1319
244
            if ( op.bn0.GetSize() > 4 ) {
1320
62
                return std::nullopt;
1321
62
            }
1322
182
            break;
1323
36.6k
    }
1324
1325
36.3k
    return module->OpBignumCalc(op);
1326
36.6k
}
1327
1328
/* Specialization for operation::BignumCalc_Fp2 */
1329
105
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
105
    (void)module;
1331
105
    (void)op;
1332
1333
105
    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
105
}
1345
1346
105
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1347
105
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1348
1349
    /* Prevent timeouts */
1350
105
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1351
102
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1352
92
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1353
81
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1354
70
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1355
60
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1356
50
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1357
40
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1358
1359
34
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1360
0
        return std::nullopt;
1361
0
    }
1362
1363
34
    return module->OpBignumCalc_Fp2(op);
1364
34
}
1365
1366
/* Specialization for operation::BignumCalc_Fp12 */
1367
650
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
650
    (void)module;
1369
650
    (void)op;
1370
1371
650
    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
650
}
1400
1401
650
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1402
650
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1403
1404
    /* Prevent timeouts */
1405
650
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1406
640
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1407
629
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1408
619
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1409
609
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1410
599
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1411
589
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1412
579
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1413
569
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1414
558
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1415
548
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1416
538
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1417
1418
528
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1419
518
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1420
508
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1421
498
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1422
488
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1423
478
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1424
468
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1425
458
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1426
448
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1427
437
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1428
427
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1429
417
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1430
1431
407
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1432
397
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1433
387
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1434
377
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1435
367
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1436
357
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1437
347
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1438
337
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1439
327
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1440
317
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1441
307
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1442
297
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1443
1444
287
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1445
277
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1446
267
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1447
257
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1448
247
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1449
237
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1450
226
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1451
215
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1452
205
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1453
195
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1454
185
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1455
175
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1456
1457
165
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1458
0
        return std::nullopt;
1459
0
    }
1460
1461
165
    return module->OpBignumCalc_Fp12(op);
1462
165
}
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
12
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
12
    (void)module;
1495
12
    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
12
}
1510
1511
12
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
12
    const size_t size = op.priv.ToTrimmedString().size();
1513
1514
12
    if ( size == 0 || size > 4096 ) {
1515
1
        return std::nullopt;
1516
1
    }
1517
1518
11
    return module->OpBLS_PrivateToPublic_G2(op);
1519
12
}
1520
1521
/* Specialization for operation::BLS_Sign */
1522
10
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
10
    (void)module;
1524
1525
10
    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
10
}
1553
1554
10
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
10
    const size_t size = op.priv.ToTrimmedString().size();
1556
1557
10
    if ( size == 0 || size > 4096 ) {
1558
3
        return std::nullopt;
1559
3
    }
1560
1561
7
    return module->OpBLS_Sign(op);
1562
10
}
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
10
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
10
    (void)module;
1593
10
    (void)op;
1594
1595
10
    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
10
}
1624
1625
10
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
10
    return module->OpBLS_BatchSign(op);
1627
10
}
1628
1629
/* Specialization for operation::BLS_BatchVerify */
1630
12
template<> void ExecutorBase<bool, operation::BLS_BatchVerify>::postprocess(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op, const ExecutorBase<bool, operation::BLS_BatchVerify>::ResultPair& result) const {
1631
12
    (void)module;
1632
12
    (void)op;
1633
12
    (void)result;
1634
12
}
1635
1636
12
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1637
12
    return module->OpBLS_BatchVerify(op);
1638
12
}
1639
1640
/* Specialization for operation::BLS_Aggregate_G1 */
1641
8
template<> void ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::postprocess(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op, const ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::ResultPair& result) const {
1642
8
    (void)module;
1643
8
    (void)op;
1644
8
    (void)result;
1645
8
}
1646
1647
8
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op) const {
1648
8
    return module->OpBLS_Aggregate_G1(op);
1649
8
}
1650
1651
/* Specialization for operation::BLS_Aggregate_G2 */
1652
10
template<> void ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op, const ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::ResultPair& result) const {
1653
10
    (void)module;
1654
10
    (void)op;
1655
10
    (void)result;
1656
10
}
1657
1658
10
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op) const {
1659
10
    return module->OpBLS_Aggregate_G2(op);
1660
10
}
1661
1662
/* Specialization for operation::BLS_Pairing */
1663
0
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
0
    (void)module;
1665
0
    (void)op;
1666
1667
0
    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
0
}
1684
1685
0
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1686
0
    return module->OpBLS_Pairing(op);
1687
0
}
1688
1689
/* Specialization for operation::BLS_MillerLoop */
1690
2
template<> void ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::postprocess(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op, const ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::ResultPair& result) const {
1691
2
    (void)module;
1692
2
    (void)op;
1693
1694
2
    if ( result.second != std::nullopt  ) {
1695
0
        Pool_Fp12.Set({
1696
0
                result.second->bn1.ToTrimmedString(),
1697
0
                result.second->bn2.ToTrimmedString(),
1698
0
                result.second->bn3.ToTrimmedString(),
1699
0
                result.second->bn4.ToTrimmedString(),
1700
0
                result.second->bn5.ToTrimmedString(),
1701
0
                result.second->bn6.ToTrimmedString(),
1702
0
                result.second->bn7.ToTrimmedString(),
1703
0
                result.second->bn8.ToTrimmedString(),
1704
0
                result.second->bn9.ToTrimmedString(),
1705
0
                result.second->bn10.ToTrimmedString(),
1706
0
                result.second->bn11.ToTrimmedString(),
1707
0
                result.second->bn12.ToTrimmedString()
1708
0
        });
1709
0
    }
1710
2
}
1711
1712
2
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1713
2
    return module->OpBLS_MillerLoop(op);
1714
2
}
1715
1716
/* Specialization for operation::BLS_FinalExp */
1717
16
template<> void ExecutorBase<component::Fp12, operation::BLS_FinalExp>::postprocess(std::shared_ptr<Module> module, operation::BLS_FinalExp& op, const ExecutorBase<component::Fp12, operation::BLS_FinalExp>::ResultPair& result) const {
1718
16
    (void)module;
1719
16
    (void)op;
1720
1721
16
    if ( result.second != std::nullopt  ) {
1722
0
        Pool_Fp12.Set({
1723
0
                result.second->bn1.ToTrimmedString(),
1724
0
                result.second->bn2.ToTrimmedString(),
1725
0
                result.second->bn3.ToTrimmedString(),
1726
0
                result.second->bn4.ToTrimmedString(),
1727
0
                result.second->bn5.ToTrimmedString(),
1728
0
                result.second->bn6.ToTrimmedString(),
1729
0
                result.second->bn7.ToTrimmedString(),
1730
0
                result.second->bn8.ToTrimmedString(),
1731
0
                result.second->bn9.ToTrimmedString(),
1732
0
                result.second->bn10.ToTrimmedString(),
1733
0
                result.second->bn11.ToTrimmedString(),
1734
0
                result.second->bn12.ToTrimmedString()
1735
0
        });
1736
0
    }
1737
16
}
1738
1739
16
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1740
16
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1741
16
    return module->OpBLS_FinalExp(op);
1742
16
}
1743
1744
/* Specialization for operation::BLS_HashToG1 */
1745
2
template<> void ExecutorBase<component::G1, operation::BLS_HashToG1>::postprocess(std::shared_ptr<Module> module, operation::BLS_HashToG1& op, const ExecutorBase<component::G1, operation::BLS_HashToG1>::ResultPair& result) const {
1746
2
    (void)module;
1747
1748
2
    if ( result.second != std::nullopt  ) {
1749
0
        const auto curveID = op.curveType.Get();
1750
0
        const auto g1_x = result.second->first.ToTrimmedString();
1751
0
        const auto g1_y = result.second->second.ToTrimmedString();
1752
1753
0
        G1AddToPool(curveID, g1_x, g1_y);
1754
1755
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1756
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1757
0
    }
1758
2
}
1759
1760
2
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1761
2
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1762
2
    return module->OpBLS_HashToG1(op);
1763
2
}
1764
1765
/* Specialization for operation::BLS_MapToG1 */
1766
2
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
2
    (void)module;
1768
1769
2
    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
2
}
1780
1781
2
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1782
2
    return module->OpBLS_MapToG1(op);
1783
2
}
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
32
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
32
    (void)module;
1812
32
    (void)op;
1813
32
    (void)result;
1814
32
}
1815
1816
32
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1817
32
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1818
32
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1819
21
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1820
1821
18
    return module->OpBLS_IsG1OnCurve(op);
1822
21
}
1823
1824
/* Specialization for operation::BLS_IsG2OnCurve */
1825
51
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
51
    (void)module;
1827
51
    (void)op;
1828
51
    (void)result;
1829
51
}
1830
1831
51
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1832
51
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1833
41
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1834
31
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1835
20
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1836
1837
17
    return module->OpBLS_IsG2OnCurve(op);
1838
20
}
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
1
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
1
    (void)module;
1865
1866
1
    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
1
}
1877
1878
1
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
1
    return module->OpBLS_Decompress_G1(op);
1880
1
}
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
0
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
0
    (void)module;
1901
1902
0
    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
0
}
1917
1918
0
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
0
    return module->OpBLS_Decompress_G2(op);
1920
0
}
1921
1922
/* Specialization for operation::BLS_Compress_G2 */
1923
3
template<> void ExecutorBase<component::G1, operation::BLS_Compress_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_Compress_G2& op, const ExecutorBase<component::G1, operation::BLS_Compress_G2>::ResultPair& result) const {
1924
3
    (void)module;
1925
1926
3
    if ( result.second != std::nullopt  ) {
1927
0
        const auto curveID = op.curveType.Get();
1928
0
        const auto g1_x = result.second->first.ToTrimmedString();
1929
0
        const auto g1_y = result.second->second.ToTrimmedString();
1930
1931
0
        G1AddToPool(curveID, g1_x, g1_y);
1932
1933
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1934
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1935
0
    }
1936
3
}
1937
1938
3
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Compress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G2& op) const {
1939
3
    return module->OpBLS_Compress_G2(op);
1940
3
}
1941
1942
/* Specialization for operation::BLS_G1_Add */
1943
60
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
60
    (void)module;
1945
1946
60
    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
60
}
1957
1958
60
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
60
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1960
60
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1961
50
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1962
40
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1963
30
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1964
1965
20
    return module->OpBLS_G1_Add(op);
1966
30
}
1967
1968
/* Specialization for operation::BLS_G1_Mul */
1969
48
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
48
    (void)module;
1971
1972
48
    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
48
}
1983
1984
48
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
48
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1986
48
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1987
43
    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
87
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
87
    (void)module;
1996
87
    (void)op;
1997
87
    (void)result;
1998
87
}
1999
2000
87
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
2001
87
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2002
87
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2003
77
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2004
66
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2005
55
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2006
2007
45
    return module->OpBLS_G1_IsEq(op);
2008
55
}
2009
2010
/* Specialization for operation::BLS_G1_Neg */
2011
37
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
37
    (void)module;
2013
2014
37
    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
37
}
2025
2026
37
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
37
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2028
37
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
27
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
2031
24
    return module->OpBLS_G1_Neg(op);
2032
27
}
2033
2034
/* Specialization for operation::BLS_G2_Add */
2035
144
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
144
    (void)module;
2037
2038
144
    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
144
}
2053
2054
144
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
144
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2056
144
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2057
134
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2058
124
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2059
110
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2060
100
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2061
94
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2062
84
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2063
74
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2064
2065
64
    return module->OpBLS_G2_Add(op);
2066
74
}
2067
2068
/* Specialization for operation::BLS_G2_Mul */
2069
78
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
78
    (void)module;
2071
2072
78
    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
78
}
2087
2088
78
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
78
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2090
78
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2091
68
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2092
58
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2093
52
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2094
41
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2095
2096
38
    return module->OpBLS_G2_Mul(op);
2097
41
}
2098
2099
/* Specialization for operation::BLS_G2_IsEq */
2100
134
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
134
    (void)module;
2102
134
    (void)op;
2103
134
    (void)result;
2104
134
}
2105
2106
134
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2107
134
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2108
134
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2109
131
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2110
120
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2111
110
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2112
100
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2113
90
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2114
80
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2115
70
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2116
2117
60
    return module->OpBLS_G2_IsEq(op);
2118
70
}
2119
2120
/* Specialization for operation::BLS_G2_Neg */
2121
77
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
77
    (void)module;
2123
2124
77
    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
77
}
2139
2140
77
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
77
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2142
77
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2143
67
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2144
57
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2145
54
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2146
2147
44
    return module->OpBLS_G2_Neg(op);
2148
54
}
2149
2150
/* Specialization for operation::BLS_G1_MultiExp */
2151
58
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
58
    (void)module;
2153
2154
58
    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
58
}
2165
2166
58
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
58
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2168
2169
1.38k
    for (const auto& point_scalar : op.points_scalars.points_scalars) {
2170
1.38k
        if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2171
1.37k
        if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2172
1.37k
        if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2173
1.37k
    }
2174
2175
45
    return module->OpBLS_G1_MultiExp(op);
2176
58
}
2177
2178
/* Specialization for operation::Misc */
2179
6
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2180
6
    (void)module;
2181
6
    (void)op;
2182
6
    (void)result;
2183
6
}
2184
2185
6
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2186
6
    return module->OpMisc(op);
2187
6
}
2188
2189
/* Specialization for operation::BLS_HashToG2 */
2190
7
template<> void ExecutorBase<component::G2, operation::BLS_HashToG2>::postprocess(std::shared_ptr<Module> module, operation::BLS_HashToG2& op, const ExecutorBase<component::G2, operation::BLS_HashToG2>::ResultPair& result) const {
2191
7
    (void)module;
2192
2193
7
    if ( result.second != std::nullopt  ) {
2194
0
        const auto curveID = op.curveType.Get();
2195
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2196
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2197
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2198
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2199
2200
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2201
2202
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2203
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2204
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2205
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2206
0
    }
2207
7
}
2208
2209
7
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2210
7
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2211
7
    return module->OpBLS_HashToG2(op);
2212
7
}
2213
2214
ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2215
138
    ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options)
2216
138
{ }
2217
132
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2218
132
    this->modulo = component::Bignum(modulo);
2219
132
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2223
6
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2224
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2228
6
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2229
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2233
6
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2234
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2238
6
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2239
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2243
6
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2244
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2248
6
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2249
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2253
6
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337"));
2254
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2258
6
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097"));
2259
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2263
6
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2264
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2268
6
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2269
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2273
6
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2274
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2278
6
    CF_NORET(SetModulo("18446744069414584321"));
2279
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2283
6
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2284
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2288
6
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2289
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2293
6
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2294
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2298
6
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2299
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2303
6
    CF_NORET(SetModulo("18446744073709551616"));
2304
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2308
6
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2309
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2313
6
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2314
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2318
6
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2319
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2323
6
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2324
6
}
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
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2328
6
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2329
6
}
2330
2331
ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2332
6
    ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options)
2333
6
{ }
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
6
    ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options)
2340
6
{ }
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
642
    operationID(operationID),
2348
642
    modules(modules),
2349
642
    options(options)
2350
642
{
2351
642
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
138
    operationID(operationID),
2348
138
    modules(modules),
2349
138
    options(options)
2350
138
{
2351
138
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
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
6
    operationID(operationID),
2348
6
    modules(modules),
2349
6
    options(options)
2350
6
{
2351
6
}
2352
2353
/* Specialization for operation::SR25519_Verify */
2354
5
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
5
    (void)module;
2356
5
    (void)op;
2357
5
    (void)result;
2358
5
}
2359
2360
5
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2361
5
    return module->OpSR25519_Verify(op);
2362
5
}
2363
2364
template <class ResultType, class OperationType>
2365
642
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
642
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2365
138
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
138
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2365
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
6
}
2367
2368
/* Filter away the values in the set that are std::nullopt */
2369
template <class ResultType, class OperationType>
2370
15.1k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
15.1k
    ResultSet ret;
2372
2373
46.2k
    for (const auto& result : results) {
2374
46.2k
        if ( result.second == std::nullopt ) {
2375
28.6k
            continue;
2376
28.6k
        }
2377
2378
17.6k
        ret.push_back(result);
2379
17.6k
    }
2380
2381
15.1k
    return ret;
2382
15.1k
}
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
53
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
53
    ResultSet ret;
2372
2373
391
    for (const auto& result : results) {
2374
391
        if ( result.second == std::nullopt ) {
2375
52
            continue;
2376
52
        }
2377
2378
339
        ret.push_back(result);
2379
339
    }
2380
2381
53
    return ret;
2382
53
}
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
59
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
59
    ResultSet ret;
2372
2373
516
    for (const auto& result : results) {
2374
516
        if ( result.second == std::nullopt ) {
2375
230
            continue;
2376
230
        }
2377
2378
286
        ret.push_back(result);
2379
286
    }
2380
2381
59
    return ret;
2382
59
}
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
90
    for (const auto& result : results) {
2374
90
        if ( result.second == std::nullopt ) {
2375
90
            continue;
2376
90
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
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
32
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
32
    ResultSet ret;
2372
2373
316
    for (const auto& result : results) {
2374
316
        if ( result.second == std::nullopt ) {
2375
160
            continue;
2376
160
        }
2377
2378
156
        ret.push_back(result);
2379
156
    }
2380
2381
32
    return ret;
2382
32
}
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
235
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
235
    ResultSet ret;
2372
2373
1.85k
    for (const auto& result : results) {
2374
1.85k
        if ( result.second == std::nullopt ) {
2375
920
            continue;
2376
920
        }
2377
2378
933
        ret.push_back(result);
2379
933
    }
2380
2381
235
    return ret;
2382
235
}
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
97
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
97
    ResultSet ret;
2372
2373
856
    for (const auto& result : results) {
2374
856
        if ( result.second == std::nullopt ) {
2375
649
            continue;
2376
649
        }
2377
2378
207
        ret.push_back(result);
2379
207
    }
2380
2381
97
    return ret;
2382
97
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
5
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
5
    ResultSet ret;
2372
2373
72
    for (const auto& result : results) {
2374
72
        if ( result.second == std::nullopt ) {
2375
72
            continue;
2376
72
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
5
    return ret;
2382
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
34
    ResultSet ret;
2372
2373
293
    for (const auto& result : results) {
2374
293
        if ( result.second == std::nullopt ) {
2375
205
            continue;
2376
205
        }
2377
2378
88
        ret.push_back(result);
2379
88
    }
2380
2381
34
    return ret;
2382
34
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
5
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
5
    ResultSet ret;
2372
2373
72
    for (const auto& result : results) {
2374
72
        if ( result.second == std::nullopt ) {
2375
72
            continue;
2376
72
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
5
    return ret;
2382
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
6
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
6
    ResultSet ret;
2372
2373
91
    for (const auto& result : results) {
2374
91
        if ( result.second == std::nullopt ) {
2375
91
            continue;
2376
91
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
6
    return ret;
2382
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
7
    ResultSet ret;
2372
2373
98
    for (const auto& result : results) {
2374
98
        if ( result.second == std::nullopt ) {
2375
98
            continue;
2376
98
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
7
    return ret;
2382
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
22
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
22
    ResultSet ret;
2372
2373
262
    for (const auto& result : results) {
2374
262
        if ( result.second == std::nullopt ) {
2375
129
            continue;
2376
129
        }
2377
2378
133
        ret.push_back(result);
2379
133
    }
2380
2381
22
    return ret;
2382
22
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
6
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
6
    ResultSet ret;
2372
2373
89
    for (const auto& result : results) {
2374
89
        if ( result.second == std::nullopt ) {
2375
89
            continue;
2376
89
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
6
    return ret;
2382
6
}
cryptofuzz::ExecutorBase<cryptofuzz::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
5
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
5
    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
5
    return ret;
2382
5
}
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
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
7
    ResultSet ret;
2372
2373
14
    for (const auto& result : results) {
2374
14
        if ( result.second == std::nullopt ) {
2375
14
            continue;
2376
14
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
7
    return ret;
2382
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
7
    ResultSet ret;
2372
2373
108
    for (const auto& result : results) {
2374
108
        if ( result.second == std::nullopt ) {
2375
108
            continue;
2376
108
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
7
    return ret;
2382
7
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&) const
Line
Count
Source
2370
4
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
4
    ResultSet ret;
2372
2373
56
    for (const auto& result : results) {
2374
56
        if ( result.second == std::nullopt ) {
2375
56
            continue;
2376
56
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
4
    return ret;
2382
4
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&) const
Line
Count
Source
2370
5
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
5
    ResultSet ret;
2372
2373
71
    for (const auto& result : results) {
2374
71
        if ( result.second == std::nullopt ) {
2375
71
            continue;
2376
71
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
5
    return ret;
2382
5
}
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
964
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
964
    ResultSet ret;
2372
2373
2.66k
    for (const auto& result : results) {
2374
2.66k
        if ( result.second == std::nullopt ) {
2375
1.62k
            continue;
2376
1.62k
        }
2377
2378
1.03k
        ret.push_back(result);
2379
1.03k
    }
2380
2381
964
    return ret;
2382
964
}
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
695
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
695
    ResultSet ret;
2372
2373
1.86k
    for (const auto& result : results) {
2374
1.86k
        if ( result.second == std::nullopt ) {
2375
1.36k
            continue;
2376
1.36k
        }
2377
2378
501
        ret.push_back(result);
2379
501
    }
2380
2381
695
    return ret;
2382
695
}
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
184
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
184
    ResultSet ret;
2372
2373
525
    for (const auto& result : results) {
2374
525
        if ( result.second == std::nullopt ) {
2375
525
            continue;
2376
525
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
184
    return ret;
2382
184
}
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.11k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2.11k
    ResultSet ret;
2372
2373
6.15k
    for (const auto& result : results) {
2374
6.15k
        if ( result.second == std::nullopt ) {
2375
2.01k
            continue;
2376
2.01k
        }
2377
2378
4.14k
        ret.push_back(result);
2379
4.14k
    }
2380
2381
2.11k
    return ret;
2382
2.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
94
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
94
    ResultSet ret;
2372
2373
279
    for (const auto& result : results) {
2374
279
        if ( result.second == std::nullopt ) {
2375
279
            continue;
2376
279
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
94
    return ret;
2382
94
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
1.13k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.13k
    ResultSet ret;
2372
2373
3.16k
    for (const auto& result : results) {
2374
3.16k
        if ( result.second == std::nullopt ) {
2375
1.63k
            continue;
2376
1.63k
        }
2377
2378
1.52k
        ret.push_back(result);
2379
1.52k
    }
2380
2381
1.13k
    return ret;
2382
1.13k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
5
    for (const auto& result : results) {
2374
5
        if ( result.second == std::nullopt ) {
2375
5
            continue;
2376
5
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
2
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2
    ResultSet ret;
2372
2373
7
    for (const auto& result : results) {
2374
7
        if ( result.second == std::nullopt ) {
2375
7
            continue;
2376
7
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
2
    return ret;
2382
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
8
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
8
    ResultSet ret;
2372
2373
22
    for (const auto& result : results) {
2374
22
        if ( result.second == std::nullopt ) {
2375
22
            continue;
2376
22
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
8
    return ret;
2382
8
}
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
219
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
219
    ResultSet ret;
2372
2373
640
    for (const auto& result : results) {
2374
640
        if ( result.second == std::nullopt ) {
2375
545
            continue;
2376
545
        }
2377
2378
95
        ret.push_back(result);
2379
95
    }
2380
2381
219
    return ret;
2382
219
}
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
264
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
264
    ResultSet ret;
2372
2373
774
    for (const auto& result : results) {
2374
774
        if ( result.second == std::nullopt ) {
2375
766
            continue;
2376
766
        }
2377
2378
8
        ret.push_back(result);
2379
8
    }
2380
2381
264
    return ret;
2382
264
}
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
800
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
800
    ResultSet ret;
2372
2373
2.18k
    for (const auto& result : results) {
2374
2.18k
        if ( result.second == std::nullopt ) {
2375
2.08k
            continue;
2376
2.08k
        }
2377
2378
101
        ret.push_back(result);
2379
101
    }
2380
2381
800
    return ret;
2382
800
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
574
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
574
    ResultSet ret;
2372
2373
1.63k
    for (const auto& result : results) {
2374
1.63k
        if ( result.second == std::nullopt ) {
2375
1.51k
            continue;
2376
1.51k
        }
2377
2378
114
        ret.push_back(result);
2379
114
    }
2380
2381
574
    return ret;
2382
574
}
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
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
7
    ResultSet ret;
2372
2373
19
    for (const auto& result : results) {
2374
19
        if ( result.second == std::nullopt ) {
2375
17
            continue;
2376
17
        }
2377
2378
2
        ret.push_back(result);
2379
2
    }
2380
2381
7
    return ret;
2382
7
}
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
845
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
845
    ResultSet ret;
2372
2373
2.22k
    for (const auto& result : results) {
2374
2.22k
        if ( result.second == std::nullopt ) {
2375
2.13k
            continue;
2376
2.13k
        }
2377
2378
91
        ret.push_back(result);
2379
91
    }
2380
2381
845
    return ret;
2382
845
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
5
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
5
    ResultSet ret;
2372
2373
13
    for (const auto& result : results) {
2374
13
        if ( result.second == std::nullopt ) {
2375
6
            continue;
2376
6
        }
2377
2378
7
        ret.push_back(result);
2379
7
    }
2380
2381
5
    return ret;
2382
5
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const
Line
Count
Source
2370
448
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
448
    ResultSet ret;
2372
2373
1.25k
    for (const auto& result : results) {
2374
1.25k
        if ( result.second == std::nullopt ) {
2375
1.12k
            continue;
2376
1.12k
        }
2377
2378
121
        ret.push_back(result);
2379
121
    }
2380
2381
448
    return ret;
2382
448
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const
Line
Count
Source
2370
5.66k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
5.66k
    ResultSet ret;
2372
2373
16.1k
    for (const auto& result : results) {
2374
16.1k
        if ( result.second == std::nullopt ) {
2375
8.38k
            continue;
2376
8.38k
        }
2377
2378
7.71k
        ret.push_back(result);
2379
7.71k
    }
2380
2381
5.66k
    return ret;
2382
5.66k
}
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
31
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
31
    ResultSet ret;
2372
2373
83
    for (const auto& result : results) {
2374
83
        if ( result.second == std::nullopt ) {
2375
83
            continue;
2376
83
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
31
    return ret;
2382
31
}
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
193
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
193
    ResultSet ret;
2372
2373
540
    for (const auto& result : results) {
2374
540
        if ( result.second == std::nullopt ) {
2375
540
            continue;
2376
540
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
193
    return ret;
2382
193
}
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
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::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
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<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
3
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3
    ResultSet ret;
2372
2373
10
    for (const auto& result : results) {
2374
10
        if ( result.second == std::nullopt ) {
2375
10
            continue;
2376
10
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
3
    return ret;
2382
3
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
4
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
4
    ResultSet ret;
2372
2373
12
    for (const auto& result : results) {
2374
12
        if ( result.second == std::nullopt ) {
2375
12
            continue;
2376
12
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
4
    return ret;
2382
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
3
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3
    ResultSet ret;
2372
2373
8
    for (const auto& result : results) {
2374
8
        if ( result.second == std::nullopt ) {
2375
8
            continue;
2376
8
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
3
    return ret;
2382
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
3
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3
    ResultSet ret;
2372
2373
10
    for (const auto& result : results) {
2374
10
        if ( result.second == std::nullopt ) {
2375
10
            continue;
2376
10
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
3
    return ret;
2382
3
}
Unexecuted instantiation: 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
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
8
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
8
    ResultSet ret;
2372
2373
16
    for (const auto& result : results) {
2374
16
        if ( result.second == std::nullopt ) {
2375
16
            continue;
2376
16
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
8
    return ret;
2382
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
2
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2
    ResultSet ret;
2372
2373
7
    for (const auto& result : results) {
2374
7
        if ( result.second == std::nullopt ) {
2375
7
            continue;
2376
7
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
2
    return ret;
2382
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_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
10
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
10
    ResultSet ret;
2372
2373
24
    for (const auto& result : results) {
2374
24
        if ( result.second == std::nullopt ) {
2375
24
            continue;
2376
24
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
10
    return ret;
2382
10
}
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
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
15
    ResultSet ret;
2372
2373
46
    for (const auto& result : results) {
2374
46
        if ( result.second == std::nullopt ) {
2375
46
            continue;
2376
46
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
15
    return ret;
2382
15
}
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
Unexecuted instantiation: 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
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
15
    ResultSet ret;
2372
2373
42
    for (const auto& result : results) {
2374
42
        if ( result.second == std::nullopt ) {
2375
42
            continue;
2376
42
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
15
    return ret;
2382
15
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
38
    for (const auto& result : results) {
2374
38
        if ( result.second == std::nullopt ) {
2375
38
            continue;
2376
38
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
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
10
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
10
    ResultSet ret;
2372
2373
23
    for (const auto& result : results) {
2374
23
        if ( result.second == std::nullopt ) {
2375
23
            continue;
2376
23
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
10
    return ret;
2382
10
}
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
48
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
48
    ResultSet ret;
2372
2373
122
    for (const auto& result : results) {
2374
122
        if ( result.second == std::nullopt ) {
2375
122
            continue;
2376
122
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
48
    return ret;
2382
48
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
23
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
23
    ResultSet ret;
2372
2373
57
    for (const auto& result : results) {
2374
57
        if ( result.second == std::nullopt ) {
2375
57
            continue;
2376
57
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
23
    return ret;
2382
23
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
40
    ResultSet ret;
2372
2373
105
    for (const auto& result : results) {
2374
105
        if ( result.second == std::nullopt ) {
2375
105
            continue;
2376
105
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
40
    return ret;
2382
40
}
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
23
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
23
    ResultSet ret;
2372
2373
55
    for (const auto& result : results) {
2374
55
        if ( result.second == std::nullopt ) {
2375
55
            continue;
2376
55
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
23
    return ret;
2382
23
}
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
19
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
19
    ResultSet ret;
2372
2373
50
    for (const auto& result : results) {
2374
50
        if ( result.second == std::nullopt ) {
2375
50
            continue;
2376
50
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
19
    return ret;
2382
19
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
3
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3
    ResultSet ret;
2372
2373
6
    for (const auto& result : results) {
2374
6
        if ( result.second == std::nullopt ) {
2375
6
            continue;
2376
6
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
3
    return ret;
2382
3
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
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
}
2383
2384
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2385
template <>
2386
4.67k
void ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::ECC_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2387
4.67k
    (void)operations;
2388
4.67k
    (void)results;
2389
4.67k
    (void)data;
2390
4.67k
    (void)size;
2391
4.67k
}
2392
2393
template <class ResultType, class OperationType>
2394
1.27k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
1.27k
    (void)operation;
2396
2397
1.27k
    return false;
2398
1.27k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2394
49
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
49
    (void)operation;
2396
2397
49
    return false;
2398
49
}
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
15
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
15
    (void)operation;
2396
2397
15
    return false;
2398
15
}
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
13
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
13
    (void)operation;
2396
2397
13
    return false;
2398
13
}
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
365
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
365
    (void)operation;
2396
2397
365
    return false;
2398
365
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2394
169
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
169
    (void)operation;
2396
2397
169
    return false;
2398
169
}
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
500
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
500
    (void)operation;
2396
2397
500
    return false;
2398
500
}
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
31
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
31
    (void)operation;
2396
2397
31
    return false;
2398
31
}
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
2
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
2
    (void)operation;
2396
2397
2
    return false;
2398
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::dontCompare(cryptofuzz::operation::ECC_Point_Add const&) const
Line
Count
Source
2394
30
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
30
    (void)operation;
2396
2397
30
    return false;
2398
30
}
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
34
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
34
    (void)operation;
2396
2397
34
    return false;
2398
34
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2394
1
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
1
    (void)operation;
2396
2397
1
    return false;
2398
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
Line
Count
Source
2394
27
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
27
    (void)operation;
2396
2397
27
    return false;
2398
27
}
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
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::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::dontCompare(cryptofuzz::operation::BignumCalc_Fp2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::dontCompare(cryptofuzz::operation::BignumCalc_Fp12 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::dontCompare(cryptofuzz::operation::BLS_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::dontCompare(cryptofuzz::operation::BLS_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::dontCompare(cryptofuzz::operation::BLS_BatchSign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::dontCompare(cryptofuzz::operation::BLS_BatchVerify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::dontCompare(cryptofuzz::operation::BLS_Pairing const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::dontCompare(cryptofuzz::operation::BLS_MillerLoop const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::dontCompare(cryptofuzz::operation::BLS_FinalExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::dontCompare(cryptofuzz::operation::BLS_HashToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::dontCompare(cryptofuzz::operation::BLS_HashToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::dontCompare(cryptofuzz::operation::BLS_MapToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::dontCompare(cryptofuzz::operation::BLS_MapToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG1OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG2OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::dontCompare(cryptofuzz::operation::BLS_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::dontCompare(cryptofuzz::operation::BLS_Decompress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::dontCompare(cryptofuzz::operation::BLS_Compress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::dontCompare(cryptofuzz::operation::BLS_Decompress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::dontCompare(cryptofuzz::operation::BLS_Compress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::dontCompare(cryptofuzz::operation::BLS_G1_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::dontCompare(cryptofuzz::operation::BLS_G1_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::dontCompare(cryptofuzz::operation::BLS_G1_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::dontCompare(cryptofuzz::operation::BLS_G1_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::dontCompare(cryptofuzz::operation::BLS_G2_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::dontCompare(cryptofuzz::operation::BLS_G2_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::dontCompare(cryptofuzz::operation::BLS_G2_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::dontCompare(cryptofuzz::operation::BLS_G2_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::dontCompare(cryptofuzz::operation::BLS_G1_MultiExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::dontCompare(cryptofuzz::operation::Misc const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::dontCompare(cryptofuzz::operation::SR25519_Verify const&) const
2399
2400
template <>
2401
2.57k
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2402
2.57k
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2403
2.54k
    if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; }
2404
2.54k
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2405
2.46k
    if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; }
2406
2407
2.46k
    return false;
2408
2.46k
}
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.38k
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2418
1.38k
    if (
2419
1.38k
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2420
1.10k
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2421
712
        if ( operation.UseRandomNonce() ) {
2422
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2423
524
            return true;
2424
524
        }
2425
712
    }
2426
2427
864
    return false;
2428
1.38k
}
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
127
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2461
127
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2462
2463
127
    return false;
2464
127
}
2465
2466
template <>
2467
21
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2468
21
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2469
2470
21
    return false;
2471
21
}
2472
2473
template <>
2474
16
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2475
16
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2476
2477
16
    return false;
2478
16
}
2479
2480
template <>
2481
41
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2482
41
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2483
2484
41
    return false;
2485
41
}
2486
2487
template <class ResultType, class OperationType>
2488
48.9k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
48.9k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
33.8k
        return;
2492
33.8k
    }
2493
2494
15.1k
    const auto filtered = filter(results);
2495
2496
15.1k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
9.70k
        return;
2499
9.70k
    }
2500
2501
5.44k
    if ( dontCompare(operations[0].second) == true ) {
2502
632
        return;
2503
632
    }
2504
2505
15.0k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
10.2k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
10.2k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
10.2k
        const bool equal = *prev == *cur;
2510
2511
10.2k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
10.2k
    }
2528
4.80k
}
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
76
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
76
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
23
        return;
2492
23
    }
2493
2494
53
    const auto filtered = filter(results);
2495
2496
53
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
4
        return;
2499
4
    }
2500
2501
49
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
339
    for (size_t i = 1; i < filtered.size(); i++) {
2506
290
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
290
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
290
        const bool equal = *prev == *cur;
2510
2511
290
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
290
    }
2528
49
}
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
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
5
        return;
2492
5
    }
2493
2494
59
    const auto filtered = filter(results);
2495
2496
59
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
18
        return;
2499
18
    }
2500
2501
41
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
286
    for (size_t i = 1; i < filtered.size(); i++) {
2506
245
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
245
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
245
        const bool equal = *prev == *cur;
2510
2511
245
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
245
    }
2528
41
}
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
49
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
49
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
17
        return;
2492
17
    }
2493
2494
32
    const auto filtered = filter(results);
2495
2496
32
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
16
        return;
2499
16
    }
2500
2501
16
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
156
    for (size_t i = 1; i < filtered.size(); i++) {
2506
140
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
140
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
140
        const bool equal = *prev == *cur;
2510
2511
140
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
140
    }
2528
16
}
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
354
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
354
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
119
        return;
2492
119
    }
2493
2494
235
    const auto filtered = filter(results);
2495
2496
235
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
108
        return;
2499
108
    }
2500
2501
127
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
932
    for (size_t i = 1; i < filtered.size(); i++) {
2506
805
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
805
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
805
        const bool equal = *prev == *cur;
2510
2511
805
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
805
    }
2528
127
}
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
158
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
158
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
61
        return;
2492
61
    }
2493
2494
97
    const auto filtered = filter(results);
2495
2496
97
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
76
        return;
2499
76
    }
2500
2501
21
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
207
    for (size_t i = 1; i < filtered.size(); i++) {
2506
186
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
186
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
186
        const bool equal = *prev == *cur;
2510
2511
186
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
186
    }
2528
21
}
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
62
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
62
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
28
        return;
2492
28
    }
2493
2494
34
    const auto filtered = filter(results);
2495
2496
34
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
19
        return;
2499
19
    }
2500
2501
15
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
88
    for (size_t i = 1; i < filtered.size(); i++) {
2506
73
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
73
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
73
        const bool equal = *prev == *cur;
2510
2511
73
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
73
    }
2528
15
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_TLS1_PRF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_TLS1_PRF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
5
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
5
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
5
    const auto filtered = filter(results);
2495
2496
5
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
5
        return;
2499
5
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
6
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
6
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
6
    const auto filtered = filter(results);
2495
2496
6
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
6
        return;
2499
6
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
7
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
7
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
7
    const auto filtered = filter(results);
2495
2496
7
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
7
        return;
2499
7
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
32
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
32
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
10
        return;
2492
10
    }
2493
2494
22
    const auto filtered = filter(results);
2495
2496
22
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
9
        return;
2499
9
    }
2500
2501
13
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
133
    for (size_t i = 1; i < filtered.size(); i++) {
2506
120
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
120
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
120
        const bool equal = *prev == *cur;
2510
2511
120
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
120
    }
2528
13
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_ARGON2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_ARGON2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SSH>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SSH> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
6
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
6
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
6
    const auto filtered = filter(results);
2495
2496
6
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
6
        return;
2499
6
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_X963>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_X963> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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_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
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_SP_800_108>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
7
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
7
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
7
    const auto filtered = filter(results);
2495
2496
7
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
7
        return;
2499
7
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTP>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTP> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
4
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
4
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
4
    const auto filtered = filter(results);
2495
2496
4
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
4
        return;
2499
4
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTCP>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTCP> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_PrivateToPublic>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_PrivateToPublic> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
3.80k
void ExecutorBase<ResultType, OperationType>::compare(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.80k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2.83k
        return;
2492
2.83k
    }
2493
2494
964
    const auto filtered = filter(results);
2495
2496
964
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
599
        return;
2499
599
    }
2500
2501
365
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
986
    for (size_t i = 1; i < filtered.size(); i++) {
2506
621
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
621
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
621
        const bool equal = *prev == *cur;
2510
2511
621
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
621
    }
2528
365
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_ValidatePubkey>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_ValidatePubkey> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2.41k
void ExecutorBase<ResultType, OperationType>::compare(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.41k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.71k
        return;
2492
1.71k
    }
2493
2494
695
    const auto filtered = filter(results);
2495
2496
695
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
526
        return;
2499
526
    }
2500
2501
169
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
471
    for (size_t i = 1; i < filtered.size(); i++) {
2506
302
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
302
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
302
        const bool equal = *prev == *cur;
2510
2511
302
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
302
    }
2528
169
}
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
237
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
237
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
53
        return;
2492
53
    }
2493
2494
184
    const auto filtered = filter(results);
2495
2496
184
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
184
        return;
2499
184
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
3.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
3.82k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.71k
        return;
2492
1.71k
    }
2493
2494
2.11k
    const auto filtered = filter(results);
2495
2496
2.11k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
722
        return;
2499
722
    }
2500
2501
1.38k
    if ( dontCompare(operations[0].second) == true ) {
2502
524
        return;
2503
524
    }
2504
2505
2.57k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.70k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.70k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.70k
        const bool equal = *prev == *cur;
2510
2511
1.70k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.70k
    }
2528
864
}
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
3
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
3
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
106
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
106
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
12
        return;
2492
12
    }
2493
2494
94
    const auto filtered = filter(results);
2495
2496
94
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
94
        return;
2499
94
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::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.05k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2.05k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
912
        return;
2492
912
    }
2493
2494
1.13k
    const auto filtered = filter(results);
2495
2496
1.13k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
639
        return;
2499
639
    }
2500
2501
500
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.39k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
899
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
899
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
899
        const bool equal = *prev == *cur;
2510
2511
899
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
899
    }
2528
500
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Recover>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Recover> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
2
    const auto filtered = filter(results);
2495
2496
2
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2
        return;
2499
2
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
13
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
13
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
5
        return;
2492
5
    }
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::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
327
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
327
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
108
        return;
2492
108
    }
2493
2494
219
    const auto filtered = filter(results);
2495
2496
219
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
188
        return;
2499
188
    }
2500
2501
31
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
87
    for (size_t i = 1; i < filtered.size(); i++) {
2506
56
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
56
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
56
        const bool equal = *prev == *cur;
2510
2511
56
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
56
    }
2528
31
}
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
385
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
385
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
121
        return;
2492
121
    }
2493
2494
264
    const auto filtered = filter(results);
2495
2496
264
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
262
        return;
2499
262
    }
2500
2501
2
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
4
    for (size_t i = 1; i < filtered.size(); i++) {
2506
2
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
2
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
2
        const bool equal = *prev == *cur;
2510
2511
2
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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
    }
2528
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1.86k
void ExecutorBase<ResultType, OperationType>::compare(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.86k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.06k
        return;
2492
1.06k
    }
2493
2494
800
    const auto filtered = filter(results);
2495
2496
800
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
770
        return;
2499
770
    }
2500
2501
30
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
96
    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
30
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Mul>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Mul> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1.87k
void ExecutorBase<ResultType, OperationType>::compare(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.87k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.30k
        return;
2492
1.30k
    }
2493
2494
574
    const auto filtered = filter(results);
2495
2496
574
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
540
        return;
2499
540
    }
2500
2501
34
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
108
    for (size_t i = 1; i < filtered.size(); i++) {
2506
74
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
74
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
74
        const bool equal = *prev == *cur;
2510
2511
74
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
74
    }
2528
34
}
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
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
5
        return;
2492
5
    }
2493
2494
7
    const auto filtered = filter(results);
2495
2496
7
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
6
        return;
2499
6
    }
2500
2501
1
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
2
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1
        const bool equal = *prev == *cur;
2510
2511
1
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
1
    }
2528
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
3.25k
void ExecutorBase<ResultType, OperationType>::compare(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.25k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2.40k
        return;
2492
2.40k
    }
2493
2494
845
    const auto filtered = filter(results);
2495
2496
845
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
818
        return;
2499
818
    }
2500
2501
27
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
78
    for (size_t i = 1; i < filtered.size(); i++) {
2506
51
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
51
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
51
        const bool equal = *prev == *cur;
2510
2511
51
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
51
    }
2528
27
}
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
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
3
        return;
2492
3
    }
2493
2494
5
    const auto filtered = filter(results);
2495
2496
5
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3
        return;
2499
3
    }
2500
2501
2
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
7
    for (size_t i = 1; i < filtered.size(); i++) {
2506
5
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
5
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
5
        const bool equal = *prev == *cur;
2510
2511
5
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
5
    }
2528
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DH_Derive>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DH_Derive> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
717
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
717
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
269
        return;
2492
269
    }
2493
2494
448
    const auto filtered = filter(results);
2495
2496
448
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
409
        return;
2499
409
    }
2500
2501
39
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
116
    for (size_t i = 1; i < filtered.size(); i++) {
2506
77
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
77
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
77
        const bool equal = *prev == *cur;
2510
2511
77
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
77
    }
2528
39
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
26.3k
void ExecutorBase<ResultType, OperationType>::compare(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.3k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
20.7k
        return;
2492
20.7k
    }
2493
2494
5.66k
    const auto filtered = filter(results);
2495
2496
5.66k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3.09k
        return;
2499
3.09k
    }
2500
2501
2.57k
    if ( dontCompare(operations[0].second) == true ) {
2502
108
        return;
2503
108
    }
2504
2505
6.96k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
4.50k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
4.50k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
4.50k
        const bool equal = *prev == *cur;
2510
2511
4.50k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
4.50k
    }
2528
2.46k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
53
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
53
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
22
        return;
2492
22
    }
2493
2494
31
    const auto filtered = filter(results);
2495
2496
31
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
31
        return;
2499
31
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
303
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
303
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
110
        return;
2492
110
    }
2493
2494
193
    const auto filtered = filter(results);
2495
2496
193
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
193
        return;
2499
193
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
3
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
3
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
2
    const auto filtered = filter(results);
2495
2496
2
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2
        return;
2499
2
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
10
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
10
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
8
        return;
2492
8
    }
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::BLS_Signature, cryptofuzz::operation::BLS_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
4
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
4
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
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
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::BLS_BatchVerify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchVerify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchVerify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
4
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
4
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
4
    const auto filtered = filter(results);
2495
2496
4
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
4
        return;
2499
4
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
3
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
3
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
3
    const auto filtered = filter(results);
2495
2496
3
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3
        return;
2499
3
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
3
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
3
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
3
    const auto filtered = filter(results);
2495
2496
3
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3
        return;
2499
3
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
Unexecuted instantiation: 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
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MillerLoop>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MillerLoop> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_FinalExp>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_FinalExp> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
8
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
8
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
8
    const auto filtered = filter(results);
2495
2496
8
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
8
        return;
2499
8
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
2
    const auto filtered = filter(results);
2495
2496
2
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2
        return;
2499
2
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_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
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
18
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
8
        return;
2492
8
    }
2493
2494
10
    const auto filtered = filter(results);
2495
2496
10
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
10
        return;
2499
10
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
20
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
20
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
5
        return;
2492
5
    }
2493
2494
15
    const auto filtered = filter(results);
2495
2496
15
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
15
        return;
2499
15
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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
1
        return;
2492
1
    }
2493
2494
0
    const auto filtered = filter(results);
2495
2496
0
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
0
        return;
2499
0
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
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
Unexecuted instantiation: 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
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
33
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
33
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
18
        return;
2492
18
    }
2493
2494
15
    const auto filtered = filter(results);
2495
2496
15
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
15
        return;
2499
15
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
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
10
        return;
2492
10
    }
2493
2494
16
    const auto filtered = filter(results);
2495
2496
16
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
16
        return;
2499
16
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_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
47
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
47
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
21
        return;
2492
21
    }
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
24
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
24
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
14
        return;
2492
14
    }
2493
2494
10
    const auto filtered = filter(results);
2495
2496
10
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
10
        return;
2499
10
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
70
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
70
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
22
        return;
2492
22
    }
2493
2494
48
    const auto filtered = filter(results);
2495
2496
48
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
48
        return;
2499
48
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_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
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
21
        return;
2492
21
    }
2493
2494
23
    const auto filtered = filter(results);
2495
2496
23
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
23
        return;
2499
23
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_IsEq>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_IsEq> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
69
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
69
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
29
        return;
2492
29
    }
2493
2494
40
    const auto filtered = filter(results);
2495
2496
40
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
40
        return;
2499
40
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
45
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
45
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
22
        return;
2492
22
    }
2493
2494
23
    const auto filtered = filter(results);
2495
2496
23
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
23
        return;
2499
23
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
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
8
        return;
2492
8
    }
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::Buffer, cryptofuzz::operation::Misc>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Misc>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Misc> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
3
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
3
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
3
    const auto filtered = filter(results);
2495
2496
3
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3
        return;
2499
3
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SR25519_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SR25519_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
3
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
3
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
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
}
2529
2530
template <class ResultType, class OperationType>
2531
0
void ExecutorBase<ResultType, OperationType>::abort(std::vector<std::string> moduleNames, const std::string operation, const std::string algorithm, const std::string reason) const {
2532
0
    std::sort(moduleNames.begin(), moduleNames.end());
2533
2534
0
    printf("CPU:\n");
2535
0
    system("cat /proc/cpuinfo | grep '^model name' | head -n1");
2536
0
    system("cat /proc/cpuinfo | grep '^flags' | head -n1");
2537
2538
0
    printf("Assertion failure: ");
2539
0
    for (const auto& moduleName : moduleNames) {
2540
0
        printf("%s-", moduleName.c_str());
2541
0
    }
2542
0
    printf("%s-%s-%s\n", operation.c_str(), algorithm.c_str(), reason.c_str());
2543
0
    fflush(stdout);
2544
2545
0
    ::abort();
2546
0
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
2547
2548
template <class ResultType, class OperationType>
2549
93.3k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
93.3k
    (void)parentDs;
2551
93.3k
    return op;
2552
93.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2549
447
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
447
    (void)parentDs;
2551
447
    return op;
2552
447
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2549
570
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
570
    (void)parentDs;
2551
570
    return op;
2552
570
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2549
171
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
171
    (void)parentDs;
2551
171
    return op;
2552
171
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) 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::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2549
2.03k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.03k
    (void)parentDs;
2551
2.03k
    return op;
2552
2.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2549
948
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
948
    (void)parentDs;
2551
948
    return op;
2552
948
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2549
104
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
104
    (void)parentDs;
2551
104
    return op;
2552
104
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2549
368
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
368
    (void)parentDs;
2551
368
    return op;
2552
368
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2549
88
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
88
    (void)parentDs;
2551
88
    return op;
2552
88
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2549
155
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
155
    (void)parentDs;
2551
155
    return op;
2552
155
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2549
162
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
162
    (void)parentDs;
2551
162
    return op;
2552
162
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2549
337
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
337
    (void)parentDs;
2551
337
    return op;
2552
337
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2549
106
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
106
    (void)parentDs;
2551
106
    return op;
2552
106
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2549
124
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
124
    (void)parentDs;
2551
124
    return op;
2552
124
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) 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
}
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
140
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
140
    (void)parentDs;
2551
140
    return op;
2552
140
}
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
106
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
106
    (void)parentDs;
2551
106
    return op;
2552
106
}
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
88
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
88
    (void)parentDs;
2551
88
    return op;
2552
88
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2549
5.66k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.66k
    (void)parentDs;
2551
5.66k
    return op;
2552
5.66k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2549
3.79k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.79k
    (void)parentDs;
2551
3.79k
    return op;
2552
3.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2549
7.30k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
7.30k
    (void)parentDs;
2551
7.30k
    return op;
2552
7.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const
Line
Count
Source
2549
671
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
671
    (void)parentDs;
2551
671
    return op;
2552
671
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const
Line
Count
Source
2549
7.99k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
7.99k
    (void)parentDs;
2551
7.99k
    return op;
2552
7.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) 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::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const
Line
Count
Source
2549
3
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3
    (void)parentDs;
2551
3
    return op;
2552
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2549
385
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
385
    (void)parentDs;
2551
385
    return op;
2552
385
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2549
4.21k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.21k
    (void)parentDs;
2551
4.21k
    return op;
2552
4.21k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2549
5
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5
    (void)parentDs;
2551
5
    return op;
2552
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2549
7
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
7
    (void)parentDs;
2551
7
    return op;
2552
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2549
27
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
27
    (void)parentDs;
2551
27
    return op;
2552
27
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2549
16
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
16
    (void)parentDs;
2551
16
    return op;
2552
16
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2549
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
13
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
13
    (void)parentDs;
2551
13
    return op;
2552
13
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2549
845
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
845
    (void)parentDs;
2551
845
    return op;
2552
845
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2549
1.10k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.10k
    (void)parentDs;
2551
1.10k
    return op;
2552
1.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2549
1.07k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.07k
    (void)parentDs;
2551
1.07k
    return op;
2552
1.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2549
3.42k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.42k
    (void)parentDs;
2551
3.42k
    return op;
2552
3.42k
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const
Line
Count
Source
2549
3.06k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.06k
    (void)parentDs;
2551
3.06k
    return op;
2552
3.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) 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::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2549
4.81k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.81k
    (void)parentDs;
2551
4.81k
    return op;
2552
4.81k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) 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::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2549
2.18k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.18k
    (void)parentDs;
2551
2.18k
    return op;
2552
2.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2549
1.67k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.67k
    (void)parentDs;
2551
1.67k
    return op;
2552
1.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2549
36.9k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
36.9k
    (void)parentDs;
2551
36.9k
    return op;
2552
36.9k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2549
105
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
105
    (void)parentDs;
2551
105
    return op;
2552
105
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2549
653
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
653
    (void)parentDs;
2551
653
    return op;
2552
653
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) 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::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2549
12
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
12
    (void)parentDs;
2551
12
    return op;
2552
12
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) 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<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
17
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
17
    (void)parentDs;
2551
17
    return op;
2552
17
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2549
24
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
24
    (void)parentDs;
2551
24
    return op;
2552
24
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2549
8
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
8
    (void)parentDs;
2551
8
    return op;
2552
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2549
26
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
26
    (void)parentDs;
2551
26
    return op;
2552
26
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2549
20
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
20
    (void)parentDs;
2551
20
    return op;
2552
20
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2549
7
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
7
    (void)parentDs;
2551
7
    return op;
2552
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2549
32
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
32
    (void)parentDs;
2551
32
    return op;
2552
32
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2549
51
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
51
    (void)parentDs;
2551
51
    return op;
2552
51
}
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
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
Line
Count
Source
2549
1
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1
    (void)parentDs;
2551
1
    return op;
2552
1
}
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
1
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1
    (void)parentDs;
2551
1
    return op;
2552
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2549
3
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3
    (void)parentDs;
2551
3
    return op;
2552
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2549
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::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) 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<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2549
87
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
87
    (void)parentDs;
2551
87
    return op;
2552
87
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2549
37
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
37
    (void)parentDs;
2551
37
    return op;
2552
37
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2549
144
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
144
    (void)parentDs;
2551
144
    return op;
2552
144
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2549
78
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
78
    (void)parentDs;
2551
78
    return op;
2552
78
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2549
138
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
138
    (void)parentDs;
2551
138
    return op;
2552
138
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2549
77
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
77
    (void)parentDs;
2551
77
    return op;
2552
77
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const
Line
Count
Source
2549
83
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
83
    (void)parentDs;
2551
83
    return op;
2552
83
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2549
6
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
6
    (void)parentDs;
2551
6
    return op;
2552
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2549
6
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
6
    (void)parentDs;
2551
6
    return op;
2552
6
}
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
14
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2561
14
    (void)parentDs;
2562
14
    op.modulo = modulo;
2563
14
    return op;
2564
14
}
2565
2566
2
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2567
2
    (void)parentDs;
2568
2
    op.modulo = modulo;
2569
2
    return op;
2570
2
}
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
0
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2579
0
    (void)parentDs;
2580
0
    op.modulo = modulo;
2581
0
    return op;
2582
0
}
2583
2584
0
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2585
0
    (void)parentDs;
2586
0
    op.modulo = modulo;
2587
0
    return op;
2588
0
}
2589
2590
0
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2591
0
    (void)parentDs;
2592
0
    op.modulo = modulo;
2593
0
    return op;
2594
0
}
2595
2596
4
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2597
4
    (void)parentDs;
2598
4
    op.modulo = modulo;
2599
4
    return op;
2600
4
}
2601
2602
0
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2603
0
    (void)parentDs;
2604
0
    op.modulo = modulo;
2605
0
    return op;
2606
0
}
2607
2608
0
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2609
0
    (void)parentDs;
2610
0
    op.modulo = modulo;
2611
0
    return op;
2612
0
}
2613
2614
4
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2615
4
    (void)parentDs;
2616
4
    op.modulo = modulo;
2617
4
    return op;
2618
4
}
2619
2620
0
operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2621
0
    (void)parentDs;
2622
0
    op.modulo = modulo;
2623
0
    return op;
2624
0
}
2625
2626
0
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2627
0
    (void)parentDs;
2628
0
    op.modulo = modulo;
2629
0
    return op;
2630
0
}
2631
2632
8
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2633
8
    (void)parentDs;
2634
8
    op.modulo = modulo;
2635
8
    return op;
2636
8
}
2637
2638
9
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2639
9
    (void)parentDs;
2640
9
    op.modulo = modulo;
2641
9
    return op;
2642
9
}
2643
2644
1
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2645
1
    (void)parentDs;
2646
1
    op.modulo = modulo;
2647
1
    return op;
2648
1
}
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
0
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2669
0
    (void)parentDs;
2670
0
    op.modulo = modulo;
2671
0
    return op;
2672
0
}
2673
2674
4
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2675
4
    (void)parentDs;
2676
4
    op.modulo = modulo;
2677
4
    return op;
2678
4
}
2679
2680
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
94.3k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
94.3k
    Datasource ds(data, size);
2689
94.3k
    if ( parentDs != nullptr ) {
2690
94.3k
        auto modifier = parentDs->GetData(0);
2691
94.3k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
94.3k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
94.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
448
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
448
    Datasource ds(data, size);
2689
448
    if ( parentDs != nullptr ) {
2690
448
        auto modifier = parentDs->GetData(0);
2691
448
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
448
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
448
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
571
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
571
    Datasource ds(data, size);
2689
571
    if ( parentDs != nullptr ) {
2690
571
        auto modifier = parentDs->GetData(0);
2691
571
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
571
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
571
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
172
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
172
    Datasource ds(data, size);
2689
172
    if ( parentDs != nullptr ) {
2690
172
        auto modifier = parentDs->GetData(0);
2691
172
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
172
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
172
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::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::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.03k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.03k
    Datasource ds(data, size);
2689
2.03k
    if ( parentDs != nullptr ) {
2690
2.03k
        auto modifier = parentDs->GetData(0);
2691
2.03k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.03k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
950
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
950
    Datasource ds(data, size);
2689
950
    if ( parentDs != nullptr ) {
2690
950
        auto modifier = parentDs->GetData(0);
2691
950
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
950
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
950
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
105
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
105
    Datasource ds(data, size);
2689
105
    if ( parentDs != nullptr ) {
2690
105
        auto modifier = parentDs->GetData(0);
2691
105
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
105
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
105
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
370
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
370
    Datasource ds(data, size);
2689
370
    if ( parentDs != nullptr ) {
2690
370
        auto modifier = parentDs->GetData(0);
2691
370
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
370
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
370
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
89
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
89
    Datasource ds(data, size);
2689
89
    if ( parentDs != nullptr ) {
2690
89
        auto modifier = parentDs->GetData(0);
2691
89
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
89
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
89
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
157
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
157
    Datasource ds(data, size);
2689
157
    if ( parentDs != nullptr ) {
2690
157
        auto modifier = parentDs->GetData(0);
2691
157
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
157
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
157
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
165
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
165
    Datasource ds(data, size);
2689
165
    if ( parentDs != nullptr ) {
2690
165
        auto modifier = parentDs->GetData(0);
2691
165
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
165
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
165
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
338
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
338
    Datasource ds(data, size);
2689
338
    if ( parentDs != nullptr ) {
2690
338
        auto modifier = parentDs->GetData(0);
2691
338
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
338
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
338
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
106
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
106
    Datasource ds(data, size);
2689
106
    if ( parentDs != nullptr ) {
2690
106
        auto modifier = parentDs->GetData(0);
2691
106
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
106
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
106
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
125
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
125
    Datasource ds(data, size);
2689
125
    if ( parentDs != nullptr ) {
2690
125
        auto modifier = parentDs->GetData(0);
2691
125
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
125
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
125
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::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
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
141
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
141
    Datasource ds(data, size);
2689
141
    if ( parentDs != nullptr ) {
2690
141
        auto modifier = parentDs->GetData(0);
2691
141
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
141
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
141
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
106
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
106
    Datasource ds(data, size);
2689
106
    if ( parentDs != nullptr ) {
2690
106
        auto modifier = parentDs->GetData(0);
2691
106
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
106
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
106
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
88
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
88
    Datasource ds(data, size);
2689
88
    if ( parentDs != nullptr ) {
2690
88
        auto modifier = parentDs->GetData(0);
2691
88
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
88
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
88
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.75k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.75k
    Datasource ds(data, size);
2689
5.75k
    if ( parentDs != nullptr ) {
2690
5.75k
        auto modifier = parentDs->GetData(0);
2691
5.75k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.75k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.75k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.83k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.83k
    Datasource ds(data, size);
2689
3.83k
    if ( parentDs != nullptr ) {
2690
3.83k
        auto modifier = parentDs->GetData(0);
2691
3.83k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.83k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
7.34k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
7.34k
    Datasource ds(data, size);
2689
7.34k
    if ( parentDs != nullptr ) {
2690
7.34k
        auto modifier = parentDs->GetData(0);
2691
7.34k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
7.34k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
7.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
704
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
704
    Datasource ds(data, size);
2689
704
    if ( parentDs != nullptr ) {
2690
704
        auto modifier = parentDs->GetData(0);
2691
704
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
704
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
704
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
8.05k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
8.05k
    Datasource ds(data, size);
2689
8.05k
    if ( parentDs != nullptr ) {
2690
8.05k
        auto modifier = parentDs->GetData(0);
2691
8.05k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
8.05k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
8.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4
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::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3
    Datasource ds(data, size);
2689
3
    if ( parentDs != nullptr ) {
2690
3
        auto modifier = parentDs->GetData(0);
2691
3
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
429
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
429
    Datasource ds(data, size);
2689
429
    if ( parentDs != nullptr ) {
2690
429
        auto modifier = parentDs->GetData(0);
2691
429
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
429
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
429
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.28k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.28k
    Datasource ds(data, size);
2689
4.28k
    if ( parentDs != nullptr ) {
2690
4.28k
        auto modifier = parentDs->GetData(0);
2691
4.28k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.28k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.28k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::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<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
27
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
27
    Datasource ds(data, size);
2689
27
    if ( parentDs != nullptr ) {
2690
27
        auto modifier = parentDs->GetData(0);
2691
27
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
27
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
27
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
16
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
16
    Datasource ds(data, size);
2689
16
    if ( parentDs != nullptr ) {
2690
16
        auto modifier = parentDs->GetData(0);
2691
16
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
16
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
16
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
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
13
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
13
    Datasource ds(data, size);
2689
13
    if ( parentDs != nullptr ) {
2690
13
        auto modifier = parentDs->GetData(0);
2691
13
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
13
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
13
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
875
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
875
    Datasource ds(data, size);
2689
875
    if ( parentDs != nullptr ) {
2690
875
        auto modifier = parentDs->GetData(0);
2691
875
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
875
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
875
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.14k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.14k
    Datasource ds(data, size);
2689
1.14k
    if ( parentDs != nullptr ) {
2690
1.14k
        auto modifier = parentDs->GetData(0);
2691
1.14k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.14k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.11k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.11k
    Datasource ds(data, size);
2689
1.11k
    if ( parentDs != nullptr ) {
2690
1.11k
        auto modifier = parentDs->GetData(0);
2691
1.11k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.11k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.50k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.50k
    Datasource ds(data, size);
2689
3.50k
    if ( parentDs != nullptr ) {
2690
3.50k
        auto modifier = parentDs->GetData(0);
2691
3.50k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.50k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.50k
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.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::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::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::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.88k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.88k
    Datasource ds(data, size);
2689
4.88k
    if ( parentDs != nullptr ) {
2690
4.88k
        auto modifier = parentDs->GetData(0);
2691
4.88k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.88k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.88k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::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::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.28k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.28k
    Datasource ds(data, size);
2689
2.28k
    if ( parentDs != nullptr ) {
2690
2.28k
        auto modifier = parentDs->GetData(0);
2691
2.28k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.28k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.74k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.74k
    Datasource ds(data, size);
2689
1.74k
    if ( parentDs != nullptr ) {
2690
1.74k
        auto modifier = parentDs->GetData(0);
2691
1.74k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.74k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
37.0k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
37.0k
    Datasource ds(data, size);
2689
37.0k
    if ( parentDs != nullptr ) {
2690
37.0k
        auto modifier = parentDs->GetData(0);
2691
37.0k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
37.0k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
37.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
105
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
105
    Datasource ds(data, size);
2689
105
    if ( parentDs != nullptr ) {
2690
105
        auto modifier = parentDs->GetData(0);
2691
105
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
105
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
105
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
653
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
653
    Datasource ds(data, size);
2689
653
    if ( parentDs != nullptr ) {
2690
653
        auto modifier = parentDs->GetData(0);
2691
653
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
653
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
653
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
9
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
9
    Datasource ds(data, size);
2689
9
    if ( parentDs != nullptr ) {
2690
9
        auto modifier = parentDs->GetData(0);
2691
9
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
9
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
9
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
12
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
12
    Datasource ds(data, size);
2689
12
    if ( parentDs != nullptr ) {
2690
12
        auto modifier = parentDs->GetData(0);
2691
12
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
12
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
12
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
10
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
10
    Datasource ds(data, size);
2689
10
    if ( parentDs != nullptr ) {
2690
10
        auto modifier = parentDs->GetData(0);
2691
10
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
10
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
10
}
cryptofuzz::ExecutorBase<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
19
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
19
    Datasource ds(data, size);
2689
19
    if ( parentDs != nullptr ) {
2690
19
        auto modifier = parentDs->GetData(0);
2691
19
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
19
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
19
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::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<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
9
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
9
    Datasource ds(data, size);
2689
9
    if ( parentDs != nullptr ) {
2690
9
        auto modifier = parentDs->GetData(0);
2691
9
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
9
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
9
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
27
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
27
    Datasource ds(data, size);
2689
27
    if ( parentDs != nullptr ) {
2690
27
        auto modifier = parentDs->GetData(0);
2691
27
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
27
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
27
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
21
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
21
    Datasource ds(data, size);
2689
21
    if ( parentDs != nullptr ) {
2690
21
        auto modifier = parentDs->GetData(0);
2691
21
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
21
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
21
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
7
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
7
    Datasource ds(data, size);
2689
7
    if ( parentDs != nullptr ) {
2690
7
        auto modifier = parentDs->GetData(0);
2691
7
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
7
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
32
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
32
    Datasource ds(data, size);
2689
32
    if ( parentDs != nullptr ) {
2690
32
        auto modifier = parentDs->GetData(0);
2691
32
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
32
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
32
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
51
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
51
    Datasource ds(data, size);
2689
51
    if ( parentDs != nullptr ) {
2690
51
        auto modifier = parentDs->GetData(0);
2691
51
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
51
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
51
}
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
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1
    Datasource ds(data, size);
2689
1
    if ( parentDs != nullptr ) {
2690
1
        auto modifier = parentDs->GetData(0);
2691
1
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1
}
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
1
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1
    Datasource ds(data, size);
2689
1
    if ( parentDs != nullptr ) {
2690
1
        auto modifier = parentDs->GetData(0);
2691
1
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3
    Datasource ds(data, size);
2689
3
    if ( parentDs != nullptr ) {
2690
3
        auto modifier = parentDs->GetData(0);
2691
3
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
62
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
62
    Datasource ds(data, size);
2689
62
    if ( parentDs != nullptr ) {
2690
62
        auto modifier = parentDs->GetData(0);
2691
62
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
62
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
62
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::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<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
37
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
37
    Datasource ds(data, size);
2689
37
    if ( parentDs != nullptr ) {
2690
37
        auto modifier = parentDs->GetData(0);
2691
37
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
37
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
37
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
144
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
144
    Datasource ds(data, size);
2689
144
    if ( parentDs != nullptr ) {
2690
144
        auto modifier = parentDs->GetData(0);
2691
144
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
144
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
144
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
78
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
78
    Datasource ds(data, size);
2689
78
    if ( parentDs != nullptr ) {
2690
78
        auto modifier = parentDs->GetData(0);
2691
78
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
78
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
78
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
138
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
138
    Datasource ds(data, size);
2689
138
    if ( parentDs != nullptr ) {
2690
138
        auto modifier = parentDs->GetData(0);
2691
138
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
138
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
138
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
77
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
77
    Datasource ds(data, size);
2689
77
    if ( parentDs != nullptr ) {
2690
77
        auto modifier = parentDs->GetData(0);
2691
77
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
77
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
77
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
84
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
84
    Datasource ds(data, size);
2689
84
    if ( parentDs != nullptr ) {
2690
84
        auto modifier = parentDs->GetData(0);
2691
84
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
84
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
84
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
6
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
6
    Datasource ds(data, size);
2689
6
    if ( parentDs != nullptr ) {
2690
6
        auto modifier = parentDs->GetData(0);
2691
6
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
6
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
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
}
2696
2697
template <class ResultType, class OperationType>
2698
93.4k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
93.4k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
93.4k
    if ( options.forceModule != std::nullopt ) {
2703
92.8k
        moduleID = *options.forceModule;
2704
92.8k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
93.4k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
93.4k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
93.4k
    return modules.at(moduleID);
2716
93.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
447
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
447
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
447
    if ( options.forceModule != std::nullopt ) {
2703
447
        moduleID = *options.forceModule;
2704
447
    }
2705
2706
    /* Skip if this is a disabled module */
2707
447
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
447
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
447
    return modules.at(moduleID);
2716
447
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
570
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
570
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
570
    if ( options.forceModule != std::nullopt ) {
2703
569
        moduleID = *options.forceModule;
2704
569
    }
2705
2706
    /* Skip if this is a disabled module */
2707
570
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
570
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
570
    return modules.at(moduleID);
2716
570
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
171
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
171
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
171
    if ( options.forceModule != std::nullopt ) {
2703
169
        moduleID = *options.forceModule;
2704
169
    }
2705
2706
    /* Skip if this is a disabled module */
2707
171
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
171
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
171
    return modules.at(moduleID);
2716
171
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::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::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.03k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.03k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.03k
    if ( options.forceModule != std::nullopt ) {
2703
2.03k
        moduleID = *options.forceModule;
2704
2.03k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.03k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.03k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2.03k
    return modules.at(moduleID);
2716
2.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
948
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
948
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
948
    if ( options.forceModule != std::nullopt ) {
2703
948
        moduleID = *options.forceModule;
2704
948
    }
2705
2706
    /* Skip if this is a disabled module */
2707
948
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
948
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
948
    return modules.at(moduleID);
2716
948
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
104
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
104
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
104
    if ( options.forceModule != std::nullopt ) {
2703
104
        moduleID = *options.forceModule;
2704
104
    }
2705
2706
    /* Skip if this is a disabled module */
2707
104
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
104
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
104
    return modules.at(moduleID);
2716
104
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
368
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
368
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
368
    if ( options.forceModule != std::nullopt ) {
2703
368
        moduleID = *options.forceModule;
2704
368
    }
2705
2706
    /* Skip if this is a disabled module */
2707
368
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
368
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
368
    return modules.at(moduleID);
2716
368
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
88
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
88
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
88
    if ( options.forceModule != std::nullopt ) {
2703
88
        moduleID = *options.forceModule;
2704
88
    }
2705
2706
    /* Skip if this is a disabled module */
2707
88
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
88
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
88
    return modules.at(moduleID);
2716
88
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
155
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
155
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
155
    if ( options.forceModule != std::nullopt ) {
2703
155
        moduleID = *options.forceModule;
2704
155
    }
2705
2706
    /* Skip if this is a disabled module */
2707
155
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
155
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
155
    return modules.at(moduleID);
2716
155
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
162
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
162
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
162
    if ( options.forceModule != std::nullopt ) {
2703
162
        moduleID = *options.forceModule;
2704
162
    }
2705
2706
    /* Skip if this is a disabled module */
2707
162
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
162
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
162
    return modules.at(moduleID);
2716
162
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
337
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
337
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
337
    if ( options.forceModule != std::nullopt ) {
2703
336
        moduleID = *options.forceModule;
2704
336
    }
2705
2706
    /* Skip if this is a disabled module */
2707
337
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
337
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
337
    return modules.at(moduleID);
2716
337
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
106
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
106
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
106
    if ( options.forceModule != std::nullopt ) {
2703
106
        moduleID = *options.forceModule;
2704
106
    }
2705
2706
    /* Skip if this is a disabled module */
2707
106
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
106
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
106
    return modules.at(moduleID);
2716
106
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
124
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
124
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
124
    if ( options.forceModule != std::nullopt ) {
2703
124
        moduleID = *options.forceModule;
2704
124
    }
2705
2706
    /* Skip if this is a disabled module */
2707
124
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
124
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
124
    return modules.at(moduleID);
2716
124
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::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
14
        moduleID = *options.forceModule;
2704
14
    }
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
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
140
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
140
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
140
    if ( options.forceModule != std::nullopt ) {
2703
140
        moduleID = *options.forceModule;
2704
140
    }
2705
2706
    /* Skip if this is a disabled module */
2707
140
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
140
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
140
    return modules.at(moduleID);
2716
140
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
106
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
106
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
106
    if ( options.forceModule != std::nullopt ) {
2703
105
        moduleID = *options.forceModule;
2704
105
    }
2705
2706
    /* Skip if this is a disabled module */
2707
106
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
106
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
106
    return modules.at(moduleID);
2716
106
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::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::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.66k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.66k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.66k
    if ( options.forceModule != std::nullopt ) {
2703
5.62k
        moduleID = *options.forceModule;
2704
5.62k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.66k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.66k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
5.66k
    return modules.at(moduleID);
2716
5.66k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.79k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.79k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.79k
    if ( options.forceModule != std::nullopt ) {
2703
3.71k
        moduleID = *options.forceModule;
2704
3.71k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.79k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.79k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
3.79k
    return modules.at(moduleID);
2716
3.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
7.30k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
7.30k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
7.30k
    if ( options.forceModule != std::nullopt ) {
2703
7.25k
        moduleID = *options.forceModule;
2704
7.25k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
7.30k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
7.30k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
7.30k
    return modules.at(moduleID);
2716
7.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
671
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
671
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
671
    if ( options.forceModule != std::nullopt ) {
2703
653
        moduleID = *options.forceModule;
2704
653
    }
2705
2706
    /* Skip if this is a disabled module */
2707
671
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
671
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
671
    return modules.at(moduleID);
2716
671
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
7.99k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
7.99k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
7.99k
    if ( options.forceModule != std::nullopt ) {
2703
7.97k
        moduleID = *options.forceModule;
2704
7.97k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
7.99k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
7.99k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
7.99k
    return modules.at(moduleID);
2716
7.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::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::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3
    if ( options.forceModule != std::nullopt ) {
2703
3
        moduleID = *options.forceModule;
2704
3
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
3
    return modules.at(moduleID);
2716
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
385
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
385
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
385
    if ( options.forceModule != std::nullopt ) {
2703
369
        moduleID = *options.forceModule;
2704
369
    }
2705
2706
    /* Skip if this is a disabled module */
2707
385
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
385
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
385
    return modules.at(moduleID);
2716
385
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.21k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.21k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.21k
    if ( options.forceModule != std::nullopt ) {
2703
4.18k
        moduleID = *options.forceModule;
2704
4.18k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.21k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.21k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4.21k
    return modules.at(moduleID);
2716
4.21k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5
    if ( options.forceModule != std::nullopt ) {
2703
5
        moduleID = *options.forceModule;
2704
5
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
5
    return modules.at(moduleID);
2716
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
7
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
7
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
7
    if ( options.forceModule != std::nullopt ) {
2703
7
        moduleID = *options.forceModule;
2704
7
    }
2705
2706
    /* Skip if this is a disabled module */
2707
7
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
7
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
7
    return modules.at(moduleID);
2716
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
27
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
27
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
27
    if ( options.forceModule != std::nullopt ) {
2703
27
        moduleID = *options.forceModule;
2704
27
    }
2705
2706
    /* Skip if this is a disabled module */
2707
27
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
27
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
27
    return modules.at(moduleID);
2716
27
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
16
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
16
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
16
    if ( options.forceModule != std::nullopt ) {
2703
16
        moduleID = *options.forceModule;
2704
16
    }
2705
2706
    /* Skip if this is a disabled module */
2707
16
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
16
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
16
    return modules.at(moduleID);
2716
16
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
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
13
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
13
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
13
    if ( options.forceModule != std::nullopt ) {
2703
13
        moduleID = *options.forceModule;
2704
13
    }
2705
2706
    /* Skip if this is a disabled module */
2707
13
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
13
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
13
    return modules.at(moduleID);
2716
13
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
845
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
845
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
845
    if ( options.forceModule != std::nullopt ) {
2703
827
        moduleID = *options.forceModule;
2704
827
    }
2705
2706
    /* Skip if this is a disabled module */
2707
845
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
845
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
845
    return modules.at(moduleID);
2716
845
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.10k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.10k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.10k
    if ( options.forceModule != std::nullopt ) {
2703
1.07k
        moduleID = *options.forceModule;
2704
1.07k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.10k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.10k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.10k
    return modules.at(moduleID);
2716
1.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.07k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.07k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.07k
    if ( options.forceModule != std::nullopt ) {
2703
1.04k
        moduleID = *options.forceModule;
2704
1.04k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.07k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.07k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.07k
    return modules.at(moduleID);
2716
1.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.42k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.42k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.42k
    if ( options.forceModule != std::nullopt ) {
2703
3.38k
        moduleID = *options.forceModule;
2704
3.38k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.42k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.42k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
3.42k
    return modules.at(moduleID);
2716
3.42k
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.06k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.06k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.06k
    if ( options.forceModule != std::nullopt ) {
2703
3.04k
        moduleID = *options.forceModule;
2704
3.04k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.06k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.06k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
3.06k
    return modules.at(moduleID);
2716
3.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::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
24
        moduleID = *options.forceModule;
2704
24
    }
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::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.81k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.81k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.81k
    if ( options.forceModule != std::nullopt ) {
2703
4.75k
        moduleID = *options.forceModule;
2704
4.75k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.81k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.81k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4.81k
    return modules.at(moduleID);
2716
4.81k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::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::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.18k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.18k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.18k
    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.18k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.18k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2.18k
    return modules.at(moduleID);
2716
2.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.67k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.67k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.67k
    if ( options.forceModule != std::nullopt ) {
2703
1.62k
        moduleID = *options.forceModule;
2704
1.62k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.67k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.67k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.67k
    return modules.at(moduleID);
2716
1.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
36.9k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
36.9k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
36.9k
    if ( options.forceModule != std::nullopt ) {
2703
36.9k
        moduleID = *options.forceModule;
2704
36.9k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
36.9k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
36.9k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
36.9k
    return modules.at(moduleID);
2716
36.9k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
105
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
105
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
105
    if ( options.forceModule != std::nullopt ) {
2703
105
        moduleID = *options.forceModule;
2704
105
    }
2705
2706
    /* Skip if this is a disabled module */
2707
105
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
105
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
105
    return modules.at(moduleID);
2716
105
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
653
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
653
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
653
    if ( options.forceModule != std::nullopt ) {
2703
653
        moduleID = *options.forceModule;
2704
653
    }
2705
2706
    /* Skip if this is a disabled module */
2707
653
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
653
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
653
    return modules.at(moduleID);
2716
653
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::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
8
        moduleID = *options.forceModule;
2704
8
    }
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::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
12
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
12
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
12
    if ( options.forceModule != std::nullopt ) {
2703
12
        moduleID = *options.forceModule;
2704
12
    }
2705
2706
    /* Skip if this is a disabled module */
2707
12
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
12
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
12
    return modules.at(moduleID);
2716
12
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::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<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
17
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
17
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
17
    if ( options.forceModule != std::nullopt ) {
2703
15
        moduleID = *options.forceModule;
2704
15
    }
2705
2706
    /* Skip if this is a disabled module */
2707
17
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
17
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
17
    return modules.at(moduleID);
2716
17
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
24
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
24
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
24
    if ( options.forceModule != std::nullopt ) {
2703
21
        moduleID = *options.forceModule;
2704
21
    }
2705
2706
    /* Skip if this is a disabled module */
2707
24
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
24
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
24
    return modules.at(moduleID);
2716
24
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
8
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
8
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
8
    if ( options.forceModule != std::nullopt ) {
2703
8
        moduleID = *options.forceModule;
2704
8
    }
2705
2706
    /* Skip if this is a disabled module */
2707
8
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
8
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
8
    return modules.at(moduleID);
2716
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
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
23
        moduleID = *options.forceModule;
2704
23
    }
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
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
20
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
20
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
20
    if ( options.forceModule != std::nullopt ) {
2703
20
        moduleID = *options.forceModule;
2704
20
    }
2705
2706
    /* Skip if this is a disabled module */
2707
20
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
20
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
20
    return modules.at(moduleID);
2716
20
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
7
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
7
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
7
    if ( options.forceModule != std::nullopt ) {
2703
7
        moduleID = *options.forceModule;
2704
7
    }
2705
2706
    /* Skip if this is a disabled module */
2707
7
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
7
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
7
    return modules.at(moduleID);
2716
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
32
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
32
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
32
    if ( options.forceModule != std::nullopt ) {
2703
32
        moduleID = *options.forceModule;
2704
32
    }
2705
2706
    /* Skip if this is a disabled module */
2707
32
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
32
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
32
    return modules.at(moduleID);
2716
32
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
51
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
51
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
51
    if ( options.forceModule != std::nullopt ) {
2703
51
        moduleID = *options.forceModule;
2704
51
    }
2705
2706
    /* Skip if this is a disabled module */
2707
51
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
51
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
51
    return modules.at(moduleID);
2716
51
}
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
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1
    if ( options.forceModule != std::nullopt ) {
2703
1
        moduleID = *options.forceModule;
2704
1
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1
    return modules.at(moduleID);
2716
1
}
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
1
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1
    return modules.at(moduleID);
2716
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3
    if ( options.forceModule != std::nullopt ) {
2703
3
        moduleID = *options.forceModule;
2704
3
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
3
    return modules.at(moduleID);
2716
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
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::BLS_G1_Mul>::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<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
87
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
87
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
87
    if ( options.forceModule != std::nullopt ) {
2703
87
        moduleID = *options.forceModule;
2704
87
    }
2705
2706
    /* Skip if this is a disabled module */
2707
87
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
87
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
87
    return modules.at(moduleID);
2716
87
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
37
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
37
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
37
    if ( options.forceModule != std::nullopt ) {
2703
37
        moduleID = *options.forceModule;
2704
37
    }
2705
2706
    /* Skip if this is a disabled module */
2707
37
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
37
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
37
    return modules.at(moduleID);
2716
37
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
144
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
144
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
144
    if ( options.forceModule != std::nullopt ) {
2703
144
        moduleID = *options.forceModule;
2704
144
    }
2705
2706
    /* Skip if this is a disabled module */
2707
144
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
144
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
144
    return modules.at(moduleID);
2716
144
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
78
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
78
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
78
    if ( options.forceModule != std::nullopt ) {
2703
78
        moduleID = *options.forceModule;
2704
78
    }
2705
2706
    /* Skip if this is a disabled module */
2707
78
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
78
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
78
    return modules.at(moduleID);
2716
78
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
138
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
138
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
138
    if ( options.forceModule != std::nullopt ) {
2703
138
        moduleID = *options.forceModule;
2704
138
    }
2705
2706
    /* Skip if this is a disabled module */
2707
138
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
138
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
138
    return modules.at(moduleID);
2716
138
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
77
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
77
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
77
    if ( options.forceModule != std::nullopt ) {
2703
77
        moduleID = *options.forceModule;
2704
77
    }
2705
2706
    /* Skip if this is a disabled module */
2707
77
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
77
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
77
    return modules.at(moduleID);
2716
77
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
83
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
83
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
83
    if ( options.forceModule != std::nullopt ) {
2703
76
        moduleID = *options.forceModule;
2704
76
    }
2705
2706
    /* Skip if this is a disabled module */
2707
83
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
83
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
83
    return modules.at(moduleID);
2716
83
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
6
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
6
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
6
    if ( options.forceModule != std::nullopt ) {
2703
6
        moduleID = *options.forceModule;
2704
6
    }
2705
2706
    /* Skip if this is a disabled module */
2707
6
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
6
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
6
    return modules.at(moduleID);
2716
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
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
5
        moduleID = *options.forceModule;
2704
5
    }
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
}
2717
2718
template <class ResultType, class OperationType>
2719
57.1k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
57.1k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
57.1k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
94.3k
    do {
2725
94.3k
        auto op = getOp(&parentDs, data, size);
2726
94.3k
        auto module = getModule(parentDs);
2727
94.3k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
94.3k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
94.3k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1.53k
            break;
2736
1.53k
        }
2737
94.3k
    } while ( parentDs.Get<bool>() == true );
2738
2739
57.1k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
57.1k
#if 1
2745
57.1k
    {
2746
57.1k
        std::set<uint64_t> moduleIDs;
2747
57.1k
        for (const auto& m : modules ) {
2748
55.3k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
55.3k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
55.3k
            moduleIDs.insert(moduleID);
2756
55.3k
        }
2757
2758
57.1k
        std::set<uint64_t> operationModuleIDs;
2759
90.2k
        for (const auto& op : operations) {
2760
90.2k
            operationModuleIDs.insert(op.first->ID);
2761
90.2k
        }
2762
2763
57.1k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
57.1k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
57.1k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
57.1k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
57.1k
    }
2771
57.1k
#endif
2772
2773
57.1k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
57.1k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
147k
    for (size_t i = 0; i < operations.size(); i++) {
2781
90.2k
        auto& operation = operations[i];
2782
2783
90.2k
        auto& module = operation.first;
2784
90.2k
        auto& op = operation.second;
2785
2786
90.2k
        if ( i > 0 ) {
2787
34.8k
            auto& prevModule = operations[i-1].first;
2788
34.8k
            auto& prevOp = operations[i-1].second;
2789
2790
34.8k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
10.4k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
10.4k
                if ( curModifier.size() == 0 ) {
2793
2.63M
                    for (size_t j = 0; j < 512; j++) {
2794
2.62M
                        curModifier.push_back(1);
2795
2.62M
                    }
2796
5.36k
                } else {
2797
822k
                    for (auto& c : curModifier) {
2798
822k
                        c++;
2799
822k
                    }
2800
5.36k
                }
2801
10.4k
            }
2802
34.8k
        }
2803
2804
90.2k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
90.2k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
90.2k
        const auto& result = results.back();
2811
2812
90.2k
        if ( result.second != std::nullopt ) {
2813
31.4k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
31.4k
        }
2820
2821
90.2k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
90.2k
        if ( options.disableTests == false ) {
2830
90.2k
            tests::test(op, result.second);
2831
90.2k
        }
2832
2833
90.2k
        postprocess(module, op, result);
2834
90.2k
    }
2835
2836
57.1k
    if ( options.noCompare == false ) {
2837
55.3k
        compare(operations, results, data, size);
2838
55.3k
    }
2839
57.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
78
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
78
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
78
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
448
    do {
2725
448
        auto op = getOp(&parentDs, data, size);
2726
448
        auto module = getModule(parentDs);
2727
448
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
448
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
448
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
448
    } while ( parentDs.Get<bool>() == true );
2738
2739
78
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
78
#if 1
2745
78
    {
2746
78
        std::set<uint64_t> moduleIDs;
2747
78
        for (const auto& m : modules ) {
2748
76
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
76
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
76
            moduleIDs.insert(moduleID);
2756
76
        }
2757
2758
78
        std::set<uint64_t> operationModuleIDs;
2759
414
        for (const auto& op : operations) {
2760
414
            operationModuleIDs.insert(op.first->ID);
2761
414
        }
2762
2763
78
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
78
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
78
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
78
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
78
    }
2771
78
#endif
2772
2773
78
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
78
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
492
    for (size_t i = 0; i < operations.size(); i++) {
2781
414
        auto& operation = operations[i];
2782
2783
414
        auto& module = operation.first;
2784
414
        auto& op = operation.second;
2785
2786
414
        if ( i > 0 ) {
2787
338
            auto& prevModule = operations[i-1].first;
2788
338
            auto& prevOp = operations[i-1].second;
2789
2790
338
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
144
                auto& curModifier = op.modifier.GetVectorPtr();
2792
144
                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
171k
                    for (auto& c : curModifier) {
2798
171k
                        c++;
2799
171k
                    }
2800
42
                }
2801
144
            }
2802
338
        }
2803
2804
414
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
414
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
414
        const auto& result = results.back();
2811
2812
414
        if ( result.second != std::nullopt ) {
2813
362
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
362
        }
2820
2821
414
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
414
        if ( options.disableTests == false ) {
2830
414
            tests::test(op, result.second);
2831
414
        }
2832
2833
414
        postprocess(module, op, result);
2834
414
    }
2835
2836
78
    if ( options.noCompare == false ) {
2837
76
        compare(operations, results, data, size);
2838
76
    }
2839
78
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
67
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
67
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
67
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
571
    do {
2725
571
        auto op = getOp(&parentDs, data, size);
2726
571
        auto module = getModule(parentDs);
2727
571
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
571
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
571
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
571
    } while ( parentDs.Get<bool>() == true );
2738
2739
67
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
67
#if 1
2745
67
    {
2746
67
        std::set<uint64_t> moduleIDs;
2747
67
        for (const auto& m : modules ) {
2748
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
67
        std::set<uint64_t> operationModuleIDs;
2759
521
        for (const auto& op : operations) {
2760
521
            operationModuleIDs.insert(op.first->ID);
2761
521
        }
2762
2763
67
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
67
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
67
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
67
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
67
    }
2771
67
#endif
2772
2773
67
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
67
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
588
    for (size_t i = 0; i < operations.size(); i++) {
2781
521
        auto& operation = operations[i];
2782
2783
521
        auto& module = operation.first;
2784
521
        auto& op = operation.second;
2785
2786
521
        if ( i > 0 ) {
2787
457
            auto& prevModule = operations[i-1].first;
2788
457
            auto& prevOp = operations[i-1].second;
2789
2790
457
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
159
                auto& curModifier = op.modifier.GetVectorPtr();
2792
159
                if ( curModifier.size() == 0 ) {
2793
64.1k
                    for (size_t j = 0; j < 512; j++) {
2794
64.0k
                        curModifier.push_back(1);
2795
64.0k
                    }
2796
125
                } else {
2797
1.18k
                    for (auto& c : curModifier) {
2798
1.18k
                        c++;
2799
1.18k
                    }
2800
34
                }
2801
159
            }
2802
457
        }
2803
2804
521
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
521
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
521
        const auto& result = results.back();
2811
2812
521
        if ( result.second != std::nullopt ) {
2813
291
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
291
        }
2820
2821
521
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
521
        if ( options.disableTests == false ) {
2830
521
            tests::test(op, result.second);
2831
521
        }
2832
2833
521
        postprocess(module, op, result);
2834
521
    }
2835
2836
67
    if ( options.noCompare == false ) {
2837
64
        compare(operations, results, data, size);
2838
64
    }
2839
67
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::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
172
    do {
2725
172
        auto op = getOp(&parentDs, data, size);
2726
172
        auto module = getModule(parentDs);
2727
172
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
172
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
172
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
172
    } 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
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
12
        std::set<uint64_t> operationModuleIDs;
2759
90
        for (const auto& op : operations) {
2760
90
            operationModuleIDs.insert(op.first->ID);
2761
90
        }
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
102
    for (size_t i = 0; i < operations.size(); i++) {
2781
90
        auto& operation = operations[i];
2782
2783
90
        auto& module = operation.first;
2784
90
        auto& op = operation.second;
2785
2786
90
        if ( i > 0 ) {
2787
83
            auto& prevModule = operations[i-1].first;
2788
83
            auto& prevOp = operations[i-1].second;
2789
2790
83
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
41
                auto& curModifier = op.modifier.GetVectorPtr();
2792
41
                if ( curModifier.size() == 0 ) {
2793
14.8k
                    for (size_t j = 0; j < 512; j++) {
2794
14.8k
                        curModifier.push_back(1);
2795
14.8k
                    }
2796
29
                } else {
2797
170
                    for (auto& c : curModifier) {
2798
170
                        c++;
2799
170
                    }
2800
12
                }
2801
41
            }
2802
83
        }
2803
2804
90
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
90
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
90
        const auto& result = results.back();
2811
2812
90
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
90
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
90
        if ( options.disableTests == false ) {
2830
90
            tests::test(op, result.second);
2831
90
        }
2832
2833
90
        postprocess(module, op, result);
2834
90
    }
2835
2836
12
    if ( options.noCompare == false ) {
2837
7
        compare(operations, results, data, size);
2838
7
    }
2839
12
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
51
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
51
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
51
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
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
3
            break;
2736
3
        }
2737
366
    } while ( parentDs.Get<bool>() == true );
2738
2739
51
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
51
#if 1
2745
51
    {
2746
51
        std::set<uint64_t> moduleIDs;
2747
51
        for (const auto& m : modules ) {
2748
49
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
49
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
49
            moduleIDs.insert(moduleID);
2756
49
        }
2757
2758
51
        std::set<uint64_t> operationModuleIDs;
2759
333
        for (const auto& op : operations) {
2760
333
            operationModuleIDs.insert(op.first->ID);
2761
333
        }
2762
2763
51
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
51
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
51
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
51
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
51
    }
2771
51
#endif
2772
2773
51
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
51
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
384
    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
284
            auto& prevModule = operations[i-1].first;
2788
284
            auto& prevOp = operations[i-1].second;
2789
2790
284
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
125
                auto& curModifier = op.modifier.GetVectorPtr();
2792
125
                if ( curModifier.size() == 0 ) {
2793
52.8k
                    for (size_t j = 0; j < 512; j++) {
2794
52.7k
                        curModifier.push_back(1);
2795
52.7k
                    }
2796
103
                } else {
2797
3.06k
                    for (auto& c : curModifier) {
2798
3.06k
                        c++;
2799
3.06k
                    }
2800
22
                }
2801
125
            }
2802
284
        }
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
156
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
156
        }
2820
2821
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
51
    if ( options.noCompare == false ) {
2837
49
        compare(operations, results, data, size);
2838
49
    }
2839
51
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
358
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
358
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
358
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.03k
    do {
2725
2.03k
        auto op = getOp(&parentDs, data, size);
2726
2.03k
        auto module = getModule(parentDs);
2727
2.03k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2.03k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.03k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
2.03k
    } while ( parentDs.Get<bool>() == true );
2738
2739
358
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
358
#if 1
2745
358
    {
2746
358
        std::set<uint64_t> moduleIDs;
2747
358
        for (const auto& m : modules ) {
2748
354
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
354
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
354
            moduleIDs.insert(moduleID);
2756
354
        }
2757
2758
358
        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
358
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
358
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
358
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
358
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
358
    }
2771
358
#endif
2772
2773
358
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
358
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.33k
    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.61k
            auto& prevModule = operations[i-1].first;
2788
1.61k
            auto& prevOp = operations[i-1].second;
2789
2790
1.61k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
548
                auto& curModifier = op.modifier.GetVectorPtr();
2792
548
                if ( curModifier.size() == 0 ) {
2793
224k
                    for (size_t j = 0; j < 512; j++) {
2794
223k
                        curModifier.push_back(1);
2795
223k
                    }
2796
437
                } else {
2797
3.00k
                    for (auto& c : curModifier) {
2798
3.00k
                        c++;
2799
3.00k
                    }
2800
111
                }
2801
548
            }
2802
1.61k
        }
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
961
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
961
        }
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
358
    if ( options.noCompare == false ) {
2837
354
        compare(operations, results, data, size);
2838
354
    }
2839
358
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
160
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
160
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
160
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
950
    do {
2725
950
        auto op = getOp(&parentDs, data, size);
2726
950
        auto module = getModule(parentDs);
2727
950
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
950
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
950
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
950
    } while ( parentDs.Get<bool>() == true );
2738
2739
160
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
160
#if 1
2745
160
    {
2746
160
        std::set<uint64_t> moduleIDs;
2747
160
        for (const auto& m : modules ) {
2748
158
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
158
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
158
            moduleIDs.insert(moduleID);
2756
158
        }
2757
2758
160
        std::set<uint64_t> operationModuleIDs;
2759
917
        for (const auto& op : operations) {
2760
917
            operationModuleIDs.insert(op.first->ID);
2761
917
        }
2762
2763
160
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
160
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
160
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
160
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
160
    }
2771
160
#endif
2772
2773
160
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
160
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.07k
    for (size_t i = 0; i < operations.size(); i++) {
2781
917
        auto& operation = operations[i];
2782
2783
917
        auto& module = operation.first;
2784
917
        auto& op = operation.second;
2785
2786
917
        if ( i > 0 ) {
2787
759
            auto& prevModule = operations[i-1].first;
2788
759
            auto& prevOp = operations[i-1].second;
2789
2790
759
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
329
                auto& curModifier = op.modifier.GetVectorPtr();
2792
329
                if ( curModifier.size() == 0 ) {
2793
148k
                    for (size_t j = 0; j < 512; j++) {
2794
147k
                        curModifier.push_back(1);
2795
147k
                    }
2796
289
                } else {
2797
1.44k
                    for (auto& c : curModifier) {
2798
1.44k
                        c++;
2799
1.44k
                    }
2800
40
                }
2801
329
            }
2802
759
        }
2803
2804
917
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
917
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
917
        const auto& result = results.back();
2811
2812
917
        if ( result.second != std::nullopt ) {
2813
211
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
211
        }
2820
2821
917
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
917
        if ( options.disableTests == false ) {
2830
917
            tests::test(op, result.second);
2831
917
        }
2832
2833
917
        postprocess(module, op, result);
2834
917
    }
2835
2836
160
    if ( options.noCompare == false ) {
2837
158
        compare(operations, results, data, size);
2838
158
    }
2839
160
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
7
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
7
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
7
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
105
    do {
2725
105
        auto op = getOp(&parentDs, data, size);
2726
105
        auto module = getModule(parentDs);
2727
105
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
105
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
105
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
105
    } while ( parentDs.Get<bool>() == true );
2738
2739
7
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
7
#if 1
2745
7
    {
2746
7
        std::set<uint64_t> moduleIDs;
2747
7
        for (const auto& m : modules ) {
2748
5
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
5
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
5
            moduleIDs.insert(moduleID);
2756
5
        }
2757
2758
7
        std::set<uint64_t> operationModuleIDs;
2759
72
        for (const auto& op : operations) {
2760
72
            operationModuleIDs.insert(op.first->ID);
2761
72
        }
2762
2763
7
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
7
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
7
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
7
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
7
    }
2771
7
#endif
2772
2773
7
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
7
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
79
    for (size_t i = 0; i < operations.size(); i++) {
2781
72
        auto& operation = operations[i];
2782
2783
72
        auto& module = operation.first;
2784
72
        auto& op = operation.second;
2785
2786
72
        if ( i > 0 ) {
2787
67
            auto& prevModule = operations[i-1].first;
2788
67
            auto& prevOp = operations[i-1].second;
2789
2790
67
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
35
                auto& curModifier = op.modifier.GetVectorPtr();
2792
35
                if ( curModifier.size() == 0 ) {
2793
13.3k
                    for (size_t j = 0; j < 512; j++) {
2794
13.3k
                        curModifier.push_back(1);
2795
13.3k
                    }
2796
26
                } else {
2797
159
                    for (auto& c : curModifier) {
2798
159
                        c++;
2799
159
                    }
2800
9
                }
2801
35
            }
2802
67
        }
2803
2804
72
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
72
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
72
        const auto& result = results.back();
2811
2812
72
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
72
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
72
        if ( options.disableTests == false ) {
2830
72
            tests::test(op, result.second);
2831
72
        }
2832
2833
72
        postprocess(module, op, result);
2834
72
    }
2835
2836
7
    if ( options.noCompare == false ) {
2837
5
        compare(operations, results, data, size);
2838
5
    }
2839
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
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
370
    do {
2725
370
        auto op = getOp(&parentDs, data, size);
2726
370
        auto module = getModule(parentDs);
2727
370
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
370
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
370
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
370
    } 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
62
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
62
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
62
            moduleIDs.insert(moduleID);
2756
62
        }
2757
2758
65
        std::set<uint64_t> operationModuleIDs;
2759
321
        for (const auto& op : operations) {
2760
321
            operationModuleIDs.insert(op.first->ID);
2761
321
        }
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
386
    for (size_t i = 0; i < operations.size(); i++) {
2781
321
        auto& operation = operations[i];
2782
2783
321
        auto& module = operation.first;
2784
321
        auto& op = operation.second;
2785
2786
321
        if ( i > 0 ) {
2787
259
            auto& prevModule = operations[i-1].first;
2788
259
            auto& prevOp = operations[i-1].second;
2789
2790
259
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
121
                auto& curModifier = op.modifier.GetVectorPtr();
2792
121
                if ( curModifier.size() == 0 ) {
2793
55.4k
                    for (size_t j = 0; j < 512; j++) {
2794
55.2k
                        curModifier.push_back(1);
2795
55.2k
                    }
2796
108
                } else {
2797
587
                    for (auto& c : curModifier) {
2798
587
                        c++;
2799
587
                    }
2800
13
                }
2801
121
            }
2802
259
        }
2803
2804
321
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
321
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
321
        const auto& result = results.back();
2811
2812
321
        if ( result.second != std::nullopt ) {
2813
111
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
111
        }
2820
2821
321
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
321
        if ( options.disableTests == false ) {
2830
321
            tests::test(op, result.second);
2831
321
        }
2832
2833
321
        postprocess(module, op, result);
2834
321
    }
2835
2836
65
    if ( options.noCompare == false ) {
2837
62
        compare(operations, results, data, size);
2838
62
    }
2839
65
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
6
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
6
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
6
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
89
    do {
2725
89
        auto op = getOp(&parentDs, data, size);
2726
89
        auto module = getModule(parentDs);
2727
89
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
89
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
89
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
89
    } while ( parentDs.Get<bool>() == true );
2738
2739
6
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
6
#if 1
2745
6
    {
2746
6
        std::set<uint64_t> moduleIDs;
2747
6
        for (const auto& m : modules ) {
2748
5
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
5
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
5
            moduleIDs.insert(moduleID);
2756
5
        }
2757
2758
6
        std::set<uint64_t> operationModuleIDs;
2759
72
        for (const auto& op : operations) {
2760
72
            operationModuleIDs.insert(op.first->ID);
2761
72
        }
2762
2763
6
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
6
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
6
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
6
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
6
    }
2771
6
#endif
2772
2773
6
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
6
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
78
    for (size_t i = 0; i < operations.size(); i++) {
2781
72
        auto& operation = operations[i];
2782
2783
72
        auto& module = operation.first;
2784
72
        auto& op = operation.second;
2785
2786
72
        if ( i > 0 ) {
2787
67
            auto& prevModule = operations[i-1].first;
2788
67
            auto& prevOp = operations[i-1].second;
2789
2790
67
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
35
                auto& curModifier = op.modifier.GetVectorPtr();
2792
35
                if ( curModifier.size() == 0 ) {
2793
13.3k
                    for (size_t j = 0; j < 512; j++) {
2794
13.3k
                        curModifier.push_back(1);
2795
13.3k
                    }
2796
26
                } else {
2797
162
                    for (auto& c : curModifier) {
2798
162
                        c++;
2799
162
                    }
2800
9
                }
2801
35
            }
2802
67
        }
2803
2804
72
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
72
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
72
        const auto& result = results.back();
2811
2812
72
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
72
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
72
        if ( options.disableTests == false ) {
2830
72
            tests::test(op, result.second);
2831
72
        }
2832
2833
72
        postprocess(module, op, result);
2834
72
    }
2835
2836
6
    if ( options.noCompare == false ) {
2837
5
        compare(operations, results, data, size);
2838
5
    }
2839
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
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
157
    do {
2725
157
        auto op = getOp(&parentDs, data, size);
2726
157
        auto module = getModule(parentDs);
2727
157
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
157
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
157
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
157
    } 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
91
        for (const auto& op : operations) {
2760
91
            operationModuleIDs.insert(op.first->ID);
2761
91
        }
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
101
    for (size_t i = 0; i < operations.size(); i++) {
2781
91
        auto& operation = operations[i];
2782
2783
91
        auto& module = operation.first;
2784
91
        auto& op = operation.second;
2785
2786
91
        if ( i > 0 ) {
2787
85
            auto& prevModule = operations[i-1].first;
2788
85
            auto& prevOp = operations[i-1].second;
2789
2790
85
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
37
                auto& curModifier = op.modifier.GetVectorPtr();
2792
37
                if ( curModifier.size() == 0 ) {
2793
9.23k
                    for (size_t j = 0; j < 512; j++) {
2794
9.21k
                        curModifier.push_back(1);
2795
9.21k
                    }
2796
19
                } else {
2797
3.07k
                    for (auto& c : curModifier) {
2798
3.07k
                        c++;
2799
3.07k
                    }
2800
19
                }
2801
37
            }
2802
85
        }
2803
2804
91
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
91
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
91
        const auto& result = results.back();
2811
2812
91
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
91
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
91
        if ( options.disableTests == false ) {
2830
91
            tests::test(op, result.second);
2831
91
        }
2832
2833
91
        postprocess(module, op, result);
2834
91
    }
2835
2836
10
    if ( options.noCompare == false ) {
2837
6
        compare(operations, results, data, size);
2838
6
    }
2839
10
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::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
165
    do {
2725
165
        auto op = getOp(&parentDs, data, size);
2726
165
        auto module = getModule(parentDs);
2727
165
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
165
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
165
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
165
    } 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
98
        for (const auto& op : operations) {
2760
98
            operationModuleIDs.insert(op.first->ID);
2761
98
        }
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
109
    for (size_t i = 0; i < operations.size(); i++) {
2781
98
        auto& operation = operations[i];
2782
2783
98
        auto& module = operation.first;
2784
98
        auto& op = operation.second;
2785
2786
98
        if ( i > 0 ) {
2787
91
            auto& prevModule = operations[i-1].first;
2788
91
            auto& prevOp = operations[i-1].second;
2789
2790
91
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
40
                auto& curModifier = op.modifier.GetVectorPtr();
2792
40
                if ( curModifier.size() == 0 ) {
2793
16.4k
                    for (size_t j = 0; j < 512; j++) {
2794
16.3k
                        curModifier.push_back(1);
2795
16.3k
                    }
2796
32
                } else {
2797
136
                    for (auto& c : curModifier) {
2798
136
                        c++;
2799
136
                    }
2800
8
                }
2801
40
            }
2802
91
        }
2803
2804
98
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
98
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
98
        const auto& result = results.back();
2811
2812
98
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
98
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
98
        if ( options.disableTests == false ) {
2830
98
            tests::test(op, result.second);
2831
98
        }
2832
2833
98
        postprocess(module, op, result);
2834
98
    }
2835
2836
11
    if ( options.noCompare == false ) {
2837
7
        compare(operations, results, data, size);
2838
7
    }
2839
11
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
36
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
36
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
36
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
338
    do {
2725
338
        auto op = getOp(&parentDs, data, size);
2726
338
        auto module = getModule(parentDs);
2727
338
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
338
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
338
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
338
    } while ( parentDs.Get<bool>() == true );
2738
2739
36
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
36
#if 1
2745
36
    {
2746
36
        std::set<uint64_t> moduleIDs;
2747
36
        for (const auto& m : modules ) {
2748
32
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
32
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
32
            moduleIDs.insert(moduleID);
2756
32
        }
2757
2758
36
        std::set<uint64_t> operationModuleIDs;
2759
272
        for (const auto& op : operations) {
2760
272
            operationModuleIDs.insert(op.first->ID);
2761
272
        }
2762
2763
36
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
36
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
36
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
36
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
36
    }
2771
36
#endif
2772
2773
36
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
36
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
308
    for (size_t i = 0; i < operations.size(); i++) {
2781
272
        auto& operation = operations[i];
2782
2783
272
        auto& module = operation.first;
2784
272
        auto& op = operation.second;
2785
2786
272
        if ( i > 0 ) {
2787
240
            auto& prevModule = operations[i-1].first;
2788
240
            auto& prevOp = operations[i-1].second;
2789
2790
240
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
112
                auto& curModifier = op.modifier.GetVectorPtr();
2792
112
                if ( curModifier.size() == 0 ) {
2793
50.2k
                    for (size_t j = 0; j < 512; j++) {
2794
50.1k
                        curModifier.push_back(1);
2795
50.1k
                    }
2796
98
                } else {
2797
403
                    for (auto& c : curModifier) {
2798
403
                        c++;
2799
403
                    }
2800
14
                }
2801
112
            }
2802
240
        }
2803
2804
272
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
272
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
272
        const auto& result = results.back();
2811
2812
272
        if ( result.second != std::nullopt ) {
2813
143
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
143
        }
2820
2821
272
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
272
        if ( options.disableTests == false ) {
2830
272
            tests::test(op, result.second);
2831
272
        }
2832
2833
272
        postprocess(module, op, result);
2834
272
    }
2835
2836
36
    if ( options.noCompare == false ) {
2837
32
        compare(operations, results, data, size);
2838
32
    }
2839
36
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
139
                    for (auto& c : curModifier) {
2798
139
                        c++;
2799
139
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
7
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
7
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
7
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
106
    do {
2725
106
        auto op = getOp(&parentDs, data, size);
2726
106
        auto module = getModule(parentDs);
2727
106
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
106
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
106
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
106
    } while ( parentDs.Get<bool>() == true );
2738
2739
7
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
7
#if 1
2745
7
    {
2746
7
        std::set<uint64_t> moduleIDs;
2747
7
        for (const auto& m : modules ) {
2748
6
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
6
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
6
            moduleIDs.insert(moduleID);
2756
6
        }
2757
2758
7
        std::set<uint64_t> operationModuleIDs;
2759
89
        for (const auto& op : operations) {
2760
89
            operationModuleIDs.insert(op.first->ID);
2761
89
        }
2762
2763
7
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
7
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
7
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
7
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
7
    }
2771
7
#endif
2772
2773
7
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
7
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
96
    for (size_t i = 0; i < operations.size(); i++) {
2781
89
        auto& operation = operations[i];
2782
2783
89
        auto& module = operation.first;
2784
89
        auto& op = operation.second;
2785
2786
89
        if ( i > 0 ) {
2787
83
            auto& prevModule = operations[i-1].first;
2788
83
            auto& prevOp = operations[i-1].second;
2789
2790
83
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
40
                auto& curModifier = op.modifier.GetVectorPtr();
2792
40
                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
147
                    for (auto& c : curModifier) {
2798
147
                        c++;
2799
147
                    }
2800
12
                }
2801
40
            }
2802
83
        }
2803
2804
89
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
89
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
89
        const auto& result = results.back();
2811
2812
89
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
89
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
89
        if ( options.disableTests == false ) {
2830
89
            tests::test(op, result.second);
2831
89
        }
2832
2833
89
        postprocess(module, op, result);
2834
89
    }
2835
2836
7
    if ( options.noCompare == false ) {
2837
6
        compare(operations, results, data, size);
2838
6
    }
2839
7
}
cryptofuzz::ExecutorBase<cryptofuzz::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
125
    do {
2725
125
        auto op = getOp(&parentDs, data, size);
2726
125
        auto module = getModule(parentDs);
2727
125
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
125
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
125
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
125
    } while ( parentDs.Get<bool>() == true );
2738
2739
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
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
8
        std::set<uint64_t> operationModuleIDs;
2759
75
        for (const auto& op : operations) {
2760
75
            operationModuleIDs.insert(op.first->ID);
2761
75
        }
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
83
    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
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
30
                auto& curModifier = op.modifier.GetVectorPtr();
2792
30
                if ( curModifier.size() == 0 ) {
2793
13.3k
                    for (size_t j = 0; j < 512; j++) {
2794
13.3k
                        curModifier.push_back(1);
2795
13.3k
                    }
2796
26
                } else {
2797
140
                    for (auto& c : curModifier) {
2798
140
                        c++;
2799
140
                    }
2800
4
                }
2801
30
            }
2802
70
        }
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
8
    if ( options.noCompare == false ) {
2837
5
        compare(operations, results, data, size);
2838
5
    }
2839
8
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::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
7
            break;
2736
7
        }
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
7
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
7
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
7
            moduleIDs.insert(moduleID);
2756
7
        }
2757
2758
7
        std::set<uint64_t> operationModuleIDs;
2759
14
        for (const auto& op : operations) {
2760
14
            operationModuleIDs.insert(op.first->ID);
2761
14
        }
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
21
    for (size_t i = 0; i < operations.size(); i++) {
2781
14
        auto& operation = operations[i];
2782
2783
14
        auto& module = operation.first;
2784
14
        auto& op = operation.second;
2785
2786
14
        if ( i > 0 ) {
2787
7
            auto& prevModule = operations[i-1].first;
2788
7
            auto& prevOp = operations[i-1].second;
2789
2790
7
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
7
                auto& curModifier = op.modifier.GetVectorPtr();
2792
7
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
7
                } else {
2797
297
                    for (auto& c : curModifier) {
2798
297
                        c++;
2799
297
                    }
2800
7
                }
2801
7
            }
2802
7
        }
2803
2804
14
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
14
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
14
        const auto& result = results.back();
2811
2812
14
        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
14
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
14
        if ( options.disableTests == false ) {
2830
14
            tests::test(op, result.second);
2831
14
        }
2832
2833
14
        postprocess(module, op, result);
2834
14
    }
2835
2836
7
    if ( options.noCompare == false ) {
2837
7
        compare(operations, results, data, size);
2838
7
    }
2839
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
9
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
9
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
9
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
141
    do {
2725
141
        auto op = getOp(&parentDs, data, size);
2726
141
        auto module = getModule(parentDs);
2727
141
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
141
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
141
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
141
    } while ( parentDs.Get<bool>() == true );
2738
2739
9
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
9
#if 1
2745
9
    {
2746
9
        std::set<uint64_t> moduleIDs;
2747
9
        for (const auto& m : modules ) {
2748
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
108
        for (const auto& op : operations) {
2760
108
            operationModuleIDs.insert(op.first->ID);
2761
108
        }
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
117
    for (size_t i = 0; i < operations.size(); i++) {
2781
108
        auto& operation = operations[i];
2782
2783
108
        auto& module = operation.first;
2784
108
        auto& op = operation.second;
2785
2786
108
        if ( i > 0 ) {
2787
101
            auto& prevModule = operations[i-1].first;
2788
101
            auto& prevOp = operations[i-1].second;
2789
2790
101
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
41
                auto& curModifier = op.modifier.GetVectorPtr();
2792
41
                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
161
                    for (auto& c : curModifier) {
2798
161
                        c++;
2799
161
                    }
2800
5
                }
2801
41
            }
2802
101
        }
2803
2804
108
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
108
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
108
        const auto& result = results.back();
2811
2812
108
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
108
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
108
        if ( options.disableTests == false ) {
2830
108
            tests::test(op, result.second);
2831
108
        }
2832
2833
108
        postprocess(module, op, result);
2834
108
    }
2835
2836
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_SRTP>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
7
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
7
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
7
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
106
    do {
2725
106
        auto op = getOp(&parentDs, data, size);
2726
106
        auto module = getModule(parentDs);
2727
106
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
106
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
106
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
106
    } while ( parentDs.Get<bool>() == true );
2738
2739
7
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
7
#if 1
2745
7
    {
2746
7
        std::set<uint64_t> moduleIDs;
2747
7
        for (const auto& m : modules ) {
2748
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
7
        std::set<uint64_t> operationModuleIDs;
2759
56
        for (const auto& op : operations) {
2760
56
            operationModuleIDs.insert(op.first->ID);
2761
56
        }
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
63
    for (size_t i = 0; i < operations.size(); i++) {
2781
56
        auto& operation = operations[i];
2782
2783
56
        auto& module = operation.first;
2784
56
        auto& op = operation.second;
2785
2786
56
        if ( i > 0 ) {
2787
52
            auto& prevModule = operations[i-1].first;
2788
52
            auto& prevOp = operations[i-1].second;
2789
2790
52
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
23
                auto& curModifier = op.modifier.GetVectorPtr();
2792
23
                if ( curModifier.size() == 0 ) {
2793
5.64k
                    for (size_t j = 0; j < 512; j++) {
2794
5.63k
                        curModifier.push_back(1);
2795
5.63k
                    }
2796
12
                } else {
2797
145
                    for (auto& c : curModifier) {
2798
145
                        c++;
2799
145
                    }
2800
12
                }
2801
23
            }
2802
52
        }
2803
2804
56
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
56
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
56
        const auto& result = results.back();
2811
2812
56
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
56
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
56
        if ( options.disableTests == false ) {
2830
56
            tests::test(op, result.second);
2831
56
        }
2832
2833
56
        postprocess(module, op, result);
2834
56
    }
2835
2836
7
    if ( options.noCompare == false ) {
2837
4
        compare(operations, results, data, size);
2838
4
    }
2839
7
}
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
88
    do {
2725
88
        auto op = getOp(&parentDs, data, size);
2726
88
        auto module = getModule(parentDs);
2727
88
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
88
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
88
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
88
    } 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
71
        for (const auto& op : operations) {
2760
71
            operationModuleIDs.insert(op.first->ID);
2761
71
        }
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
77
    for (size_t i = 0; i < operations.size(); i++) {
2781
71
        auto& operation = operations[i];
2782
2783
71
        auto& module = operation.first;
2784
71
        auto& op = operation.second;
2785
2786
71
        if ( i > 0 ) {
2787
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
28
                auto& curModifier = op.modifier.GetVectorPtr();
2792
28
                if ( curModifier.size() == 0 ) {
2793
9.23k
                    for (size_t j = 0; j < 512; j++) {
2794
9.21k
                        curModifier.push_back(1);
2795
9.21k
                    }
2796
18
                } else {
2797
139
                    for (auto& c : curModifier) {
2798
139
                        c++;
2799
139
                    }
2800
10
                }
2801
28
            }
2802
66
        }
2803
2804
71
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
71
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
71
        const auto& result = results.back();
2811
2812
71
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
71
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
71
        if ( options.disableTests == false ) {
2830
71
            tests::test(op, result.second);
2831
71
        }
2832
2833
71
        postprocess(module, op, result);
2834
71
    }
2835
2836
6
    if ( options.noCompare == false ) {
2837
5
        compare(operations, results, data, size);
2838
5
    }
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
3.94k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.94k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.94k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.75k
    do {
2725
5.75k
        auto op = getOp(&parentDs, data, size);
2726
5.75k
        auto module = getModule(parentDs);
2727
5.75k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
5.75k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
5.75k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
69
            break;
2736
69
        }
2737
5.75k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.94k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.94k
#if 1
2745
3.94k
    {
2746
3.94k
        std::set<uint64_t> moduleIDs;
2747
3.94k
        for (const auto& m : modules ) {
2748
3.80k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.80k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.80k
            moduleIDs.insert(moduleID);
2756
3.80k
        }
2757
2758
3.94k
        std::set<uint64_t> operationModuleIDs;
2759
5.50k
        for (const auto& op : operations) {
2760
5.50k
            operationModuleIDs.insert(op.first->ID);
2761
5.50k
        }
2762
2763
3.94k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.94k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.94k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.94k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3.94k
    }
2771
3.94k
#endif
2772
2773
3.94k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.94k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
9.44k
    for (size_t i = 0; i < operations.size(); i++) {
2781
5.50k
        auto& operation = operations[i];
2782
2783
5.50k
        auto& module = operation.first;
2784
5.50k
        auto& op = operation.second;
2785
2786
5.50k
        if ( i > 0 ) {
2787
1.70k
            auto& prevModule = operations[i-1].first;
2788
1.70k
            auto& prevOp = operations[i-1].second;
2789
2790
1.70k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
553
                auto& curModifier = op.modifier.GetVectorPtr();
2792
553
                if ( curModifier.size() == 0 ) {
2793
128k
                    for (size_t j = 0; j < 512; j++) {
2794
128k
                        curModifier.push_back(1);
2795
128k
                    }
2796
303
                } else {
2797
10.2k
                    for (auto& c : curModifier) {
2798
10.2k
                        c++;
2799
10.2k
                    }
2800
303
                }
2801
553
            }
2802
1.70k
        }
2803
2804
5.50k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5.50k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5.50k
        const auto& result = results.back();
2811
2812
5.50k
        if ( result.second != std::nullopt ) {
2813
2.26k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.26k
        }
2820
2821
5.50k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.50k
        if ( options.disableTests == false ) {
2830
5.50k
            tests::test(op, result.second);
2831
5.50k
        }
2832
2833
5.50k
        postprocess(module, op, result);
2834
5.50k
    }
2835
2836
3.94k
    if ( options.noCompare == false ) {
2837
3.80k
        compare(operations, results, data, size);
2838
3.80k
    }
2839
3.94k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.54k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.54k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.54k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.83k
    do {
2725
3.83k
        auto op = getOp(&parentDs, data, size);
2726
3.83k
        auto module = getModule(parentDs);
2727
3.83k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
3.83k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.83k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
51
            break;
2736
51
        }
2737
3.83k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.54k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.54k
#if 1
2745
2.54k
    {
2746
2.54k
        std::set<uint64_t> moduleIDs;
2747
2.54k
        for (const auto& m : modules ) {
2748
2.41k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.41k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.41k
            moduleIDs.insert(moduleID);
2756
2.41k
        }
2757
2758
2.54k
        std::set<uint64_t> operationModuleIDs;
2759
3.58k
        for (const auto& op : operations) {
2760
3.58k
            operationModuleIDs.insert(op.first->ID);
2761
3.58k
        }
2762
2763
2.54k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.54k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.54k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.54k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2.54k
    }
2771
2.54k
#endif
2772
2773
2.54k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.54k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
6.12k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.58k
        auto& operation = operations[i];
2782
2783
3.58k
        auto& module = operation.first;
2784
3.58k
        auto& op = operation.second;
2785
2786
3.58k
        if ( i > 0 ) {
2787
1.16k
            auto& prevModule = operations[i-1].first;
2788
1.16k
            auto& prevOp = operations[i-1].second;
2789
2790
1.16k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
331
                auto& curModifier = op.modifier.GetVectorPtr();
2792
331
                if ( curModifier.size() == 0 ) {
2793
36.4k
                    for (size_t j = 0; j < 512; j++) {
2794
36.3k
                        curModifier.push_back(1);
2795
36.3k
                    }
2796
260
                } else {
2797
6.66k
                    for (auto& c : curModifier) {
2798
6.66k
                        c++;
2799
6.66k
                    }
2800
260
                }
2801
331
            }
2802
1.16k
        }
2803
2804
3.58k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.58k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.58k
        const auto& result = results.back();
2811
2812
3.58k
        if ( result.second != std::nullopt ) {
2813
1.14k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.14k
        }
2820
2821
3.58k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
3.58k
        if ( options.disableTests == false ) {
2830
3.58k
            tests::test(op, result.second);
2831
3.58k
        }
2832
2833
3.58k
        postprocess(module, op, result);
2834
3.58k
    }
2835
2836
2.54k
    if ( options.noCompare == false ) {
2837
2.41k
        compare(operations, results, data, size);
2838
2.41k
    }
2839
2.54k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4.79k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4.79k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4.79k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
7.34k
    do {
2725
7.34k
        auto op = getOp(&parentDs, data, size);
2726
7.34k
        auto module = getModule(parentDs);
2727
7.34k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
7.34k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
7.34k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
112
            break;
2736
112
        }
2737
7.34k
    } while ( parentDs.Get<bool>() == true );
2738
2739
4.79k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4.79k
#if 1
2745
4.79k
    {
2746
4.79k
        std::set<uint64_t> moduleIDs;
2747
4.79k
        for (const auto& m : modules ) {
2748
4.67k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4.67k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4.67k
            moduleIDs.insert(moduleID);
2756
4.67k
        }
2757
2758
4.79k
        std::set<uint64_t> operationModuleIDs;
2759
7.13k
        for (const auto& op : operations) {
2760
7.13k
            operationModuleIDs.insert(op.first->ID);
2761
7.13k
        }
2762
2763
4.79k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4.79k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4.79k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4.79k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
4.79k
    }
2771
4.79k
#endif
2772
2773
4.79k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4.79k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
11.9k
    for (size_t i = 0; i < operations.size(); i++) {
2781
7.13k
        auto& operation = operations[i];
2782
2783
7.13k
        auto& module = operation.first;
2784
7.13k
        auto& op = operation.second;
2785
2786
7.13k
        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
309
                auto& curModifier = op.modifier.GetVectorPtr();
2792
309
                if ( curModifier.size() == 0 ) {
2793
67.7k
                    for (size_t j = 0; j < 512; j++) {
2794
67.5k
                        curModifier.push_back(1);
2795
67.5k
                    }
2796
177
                } else {
2797
6.56k
                    for (auto& c : curModifier) {
2798
6.56k
                        c++;
2799
6.56k
                    }
2800
177
                }
2801
309
            }
2802
2.45k
        }
2803
2804
7.13k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
7.13k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
7.13k
        const auto& result = results.back();
2811
2812
7.13k
        if ( result.second != std::nullopt ) {
2813
2.48k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.48k
        }
2820
2821
7.13k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.13k
        if ( options.disableTests == false ) {
2830
7.13k
            tests::test(op, result.second);
2831
7.13k
        }
2832
2833
7.13k
        postprocess(module, op, result);
2834
7.13k
    }
2835
2836
4.79k
    if ( options.noCompare == false ) {
2837
4.67k
        compare(operations, results, data, size);
2838
4.67k
    }
2839
4.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
297
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
297
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
297
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
704
    do {
2725
704
        auto op = getOp(&parentDs, data, size);
2726
704
        auto module = getModule(parentDs);
2727
704
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
704
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
704
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
24
            break;
2736
24
        }
2737
704
    } while ( parentDs.Get<bool>() == true );
2738
2739
297
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
297
#if 1
2745
297
    {
2746
297
        std::set<uint64_t> moduleIDs;
2747
297
        for (const auto& m : modules ) {
2748
237
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
237
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
237
            moduleIDs.insert(moduleID);
2756
237
        }
2757
2758
297
        std::set<uint64_t> operationModuleIDs;
2759
578
        for (const auto& op : operations) {
2760
578
            operationModuleIDs.insert(op.first->ID);
2761
578
        }
2762
2763
297
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
297
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
297
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
297
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
297
    }
2771
297
#endif
2772
2773
297
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
297
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
875
    for (size_t i = 0; i < operations.size(); i++) {
2781
578
        auto& operation = operations[i];
2782
2783
578
        auto& module = operation.first;
2784
578
        auto& op = operation.second;
2785
2786
578
        if ( i > 0 ) {
2787
341
            auto& prevModule = operations[i-1].first;
2788
341
            auto& prevOp = operations[i-1].second;
2789
2790
341
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
121
                auto& curModifier = op.modifier.GetVectorPtr();
2792
121
                if ( curModifier.size() == 0 ) {
2793
16.4k
                    for (size_t j = 0; j < 512; j++) {
2794
16.3k
                        curModifier.push_back(1);
2795
16.3k
                    }
2796
89
                } else {
2797
3.21k
                    for (auto& c : curModifier) {
2798
3.21k
                        c++;
2799
3.21k
                    }
2800
89
                }
2801
121
            }
2802
341
        }
2803
2804
578
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
578
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
578
        const auto& result = results.back();
2811
2812
578
        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
578
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
578
        if ( options.disableTests == false ) {
2830
578
            tests::test(op, result.second);
2831
578
        }
2832
2833
578
        postprocess(module, op, result);
2834
578
    }
2835
2836
297
    if ( options.noCompare == false ) {
2837
237
        compare(operations, results, data, size);
2838
237
    }
2839
297
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.91k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.91k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.91k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
8.05k
    do {
2725
8.05k
        auto op = getOp(&parentDs, data, size);
2726
8.05k
        auto module = getModule(parentDs);
2727
8.05k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
8.05k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
8.05k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
305
            break;
2736
305
        }
2737
8.05k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.91k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.91k
#if 1
2745
3.91k
    {
2746
3.91k
        std::set<uint64_t> moduleIDs;
2747
3.91k
        for (const auto& m : modules ) {
2748
3.82k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.82k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.82k
            moduleIDs.insert(moduleID);
2756
3.82k
        }
2757
2758
3.91k
        std::set<uint64_t> operationModuleIDs;
2759
7.87k
        for (const auto& op : operations) {
2760
7.87k
            operationModuleIDs.insert(op.first->ID);
2761
7.87k
        }
2762
2763
3.91k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.91k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.91k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.91k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3.91k
    }
2771
3.91k
#endif
2772
2773
3.91k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.91k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
11.7k
    for (size_t i = 0; i < operations.size(); i++) {
2781
7.87k
        auto& operation = operations[i];
2782
2783
7.87k
        auto& module = operation.first;
2784
7.87k
        auto& op = operation.second;
2785
2786
7.87k
        if ( i > 0 ) {
2787
4.04k
            auto& prevModule = operations[i-1].first;
2788
4.04k
            auto& prevOp = operations[i-1].second;
2789
2790
4.04k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.00k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.00k
                if ( curModifier.size() == 0 ) {
2793
79.0k
                    for (size_t j = 0; j < 512; j++) {
2794
78.8k
                        curModifier.push_back(1);
2795
78.8k
                    }
2796
846
                } else {
2797
10.1k
                    for (auto& c : curModifier) {
2798
10.1k
                        c++;
2799
10.1k
                    }
2800
846
                }
2801
1.00k
            }
2802
4.04k
        }
2803
2804
7.87k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
7.87k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
7.87k
        const auto& result = results.back();
2811
2812
7.87k
        if ( result.second != std::nullopt ) {
2813
5.14k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
5.14k
        }
2820
2821
7.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
7.87k
        if ( options.disableTests == false ) {
2830
7.87k
            tests::test(op, result.second);
2831
7.87k
        }
2832
2833
7.87k
        postprocess(module, op, result);
2834
7.87k
    }
2835
2836
3.91k
    if ( options.noCompare == false ) {
2837
3.82k
        compare(operations, results, data, size);
2838
3.82k
    }
2839
3.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_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
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
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
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
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
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
3
        compare(operations, results, data, size);
2838
3
    }
2839
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3
    do {
2725
3
        auto op = getOp(&parentDs, data, size);
2726
3
        auto module = getModule(parentDs);
2727
3
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
3
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
3
    } while ( parentDs.Get<bool>() == true );
2738
2739
2
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2
#if 1
2745
2
    {
2746
2
        std::set<uint64_t> moduleIDs;
2747
2
        for (const auto& m : modules ) {
2748
2
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2
            moduleIDs.insert(moduleID);
2756
2
        }
2757
2758
2
        std::set<uint64_t> operationModuleIDs;
2759
3
        for (const auto& op : operations) {
2760
3
            operationModuleIDs.insert(op.first->ID);
2761
3
        }
2762
2763
2
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2
    }
2771
2
#endif
2772
2773
2
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
5
    for (size_t i = 0; i < operations.size(); i++) {
2781
3
        auto& operation = operations[i];
2782
2783
3
        auto& module = operation.first;
2784
3
        auto& op = operation.second;
2785
2786
3
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
0
                auto& curModifier = op.modifier.GetVectorPtr();
2792
0
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
0
                } else {
2797
0
                    for (auto& c : curModifier) {
2798
0
                        c++;
2799
0
                    }
2800
0
                }
2801
0
            }
2802
1
        }
2803
2804
3
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3
        const auto& result = results.back();
2811
2812
3
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
3
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
3
        if ( options.disableTests == false ) {
2830
3
            tests::test(op, result.second);
2831
3
        }
2832
2833
3
        postprocess(module, op, result);
2834
3
    }
2835
2836
2
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
129
                    for (auto& c : curModifier) {
2798
129
                        c++;
2799
129
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
178
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
178
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
178
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
429
    do {
2725
429
        auto op = getOp(&parentDs, data, size);
2726
429
        auto module = getModule(parentDs);
2727
429
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
429
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
429
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
429
    } while ( parentDs.Get<bool>() == true );
2738
2739
178
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
178
#if 1
2745
178
    {
2746
178
        std::set<uint64_t> moduleIDs;
2747
178
        for (const auto& m : modules ) {
2748
106
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
106
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
106
            moduleIDs.insert(moduleID);
2756
106
        }
2757
2758
178
        std::set<uint64_t> operationModuleIDs;
2759
291
        for (const auto& op : operations) {
2760
291
            operationModuleIDs.insert(op.first->ID);
2761
291
        }
2762
2763
178
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
178
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
178
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
178
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
178
    }
2771
178
#endif
2772
2773
178
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
178
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
469
    for (size_t i = 0; i < operations.size(); i++) {
2781
291
        auto& operation = operations[i];
2782
2783
291
        auto& module = operation.first;
2784
291
        auto& op = operation.second;
2785
2786
291
        if ( i > 0 ) {
2787
185
            auto& prevModule = operations[i-1].first;
2788
185
            auto& prevOp = operations[i-1].second;
2789
2790
185
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
89
                auto& curModifier = op.modifier.GetVectorPtr();
2792
89
                if ( curModifier.size() == 0 ) {
2793
18.9k
                    for (size_t j = 0; j < 512; j++) {
2794
18.9k
                        curModifier.push_back(1);
2795
18.9k
                    }
2796
52
                } else {
2797
2.23k
                    for (auto& c : curModifier) {
2798
2.23k
                        c++;
2799
2.23k
                    }
2800
52
                }
2801
89
            }
2802
185
        }
2803
2804
291
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
291
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
291
        const auto& result = results.back();
2811
2812
291
        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
291
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
291
        if ( options.disableTests == false ) {
2830
291
            tests::test(op, result.second);
2831
291
        }
2832
2833
291
        postprocess(module, op, result);
2834
291
    }
2835
2836
178
    if ( options.noCompare == false ) {
2837
106
        compare(operations, results, data, size);
2838
106
    }
2839
178
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.15k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.15k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.15k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.28k
    do {
2725
4.28k
        auto op = getOp(&parentDs, data, size);
2726
4.28k
        auto module = getModule(parentDs);
2727
4.28k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4.28k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.28k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
90
            break;
2736
90
        }
2737
4.28k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.15k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.15k
#if 1
2745
2.15k
    {
2746
2.15k
        std::set<uint64_t> moduleIDs;
2747
2.15k
        for (const auto& m : modules ) {
2748
2.05k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.05k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.05k
            moduleIDs.insert(moduleID);
2756
2.05k
        }
2757
2758
2.15k
        std::set<uint64_t> operationModuleIDs;
2759
4.07k
        for (const auto& op : operations) {
2760
4.07k
            operationModuleIDs.insert(op.first->ID);
2761
4.07k
        }
2762
2763
2.15k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.15k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.15k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.15k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2.15k
    }
2771
2.15k
#endif
2772
2773
2.15k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.15k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
6.23k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.07k
        auto& operation = operations[i];
2782
2783
4.07k
        auto& module = operation.first;
2784
4.07k
        auto& op = operation.second;
2785
2786
4.07k
        if ( i > 0 ) {
2787
2.02k
            auto& prevModule = operations[i-1].first;
2788
2.02k
            auto& prevOp = operations[i-1].second;
2789
2790
2.02k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
586
                auto& curModifier = op.modifier.GetVectorPtr();
2792
586
                if ( curModifier.size() == 0 ) {
2793
93.3k
                    for (size_t j = 0; j < 512; j++) {
2794
93.1k
                        curModifier.push_back(1);
2795
93.1k
                    }
2796
404
                } else {
2797
13.2k
                    for (auto& c : curModifier) {
2798
13.2k
                        c++;
2799
13.2k
                    }
2800
404
                }
2801
586
            }
2802
2.02k
        }
2803
2804
4.07k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.07k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.07k
        const auto& result = results.back();
2811
2812
4.07k
        if ( result.second != std::nullopt ) {
2813
1.95k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
1.95k
        }
2820
2821
4.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
4.07k
        if ( options.disableTests == false ) {
2830
4.07k
            tests::test(op, result.second);
2831
4.07k
        }
2832
2833
4.07k
        postprocess(module, op, result);
2834
4.07k
    }
2835
2836
2.15k
    if ( options.noCompare == false ) {
2837
2.05k
        compare(operations, results, data, size);
2838
2.05k
    }
2839
2.15k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::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
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
2
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
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
4
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
140
                    for (auto& c : curModifier) {
2798
140
                        c++;
2799
140
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
2
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
142
                    for (auto& c : curModifier) {
2798
142
                        c++;
2799
142
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5
    do {
2725
5
        auto op = getOp(&parentDs, data, size);
2726
5
        auto module = getModule(parentDs);
2727
5
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
5
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
5
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
5
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
5
        for (const auto& op : operations) {
2760
5
            operationModuleIDs.insert(op.first->ID);
2761
5
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
6
    for (size_t i = 0; i < operations.size(); i++) {
2781
5
        auto& operation = operations[i];
2782
2783
5
        auto& module = operation.first;
2784
5
        auto& op = operation.second;
2785
2786
5
        if ( i > 0 ) {
2787
4
            auto& prevModule = operations[i-1].first;
2788
4
            auto& prevOp = operations[i-1].second;
2789
2790
4
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
0
                auto& curModifier = op.modifier.GetVectorPtr();
2792
0
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
0
                } else {
2797
0
                    for (auto& c : curModifier) {
2798
0
                        c++;
2799
0
                    }
2800
0
                }
2801
0
            }
2802
4
        }
2803
2804
5
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5
        const auto& result = results.back();
2811
2812
5
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
5
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
5
        if ( options.disableTests == false ) {
2830
5
            tests::test(op, result.second);
2831
5
        }
2832
2833
5
        postprocess(module, op, result);
2834
5
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
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
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
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
5
            auto& prevModule = operations[i-1].first;
2788
5
            auto& prevOp = operations[i-1].second;
2789
2790
5
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
145
                    for (auto& c : curModifier) {
2798
145
                        c++;
2799
145
                    }
2800
1
                }
2801
1
            }
2802
5
        }
2803
2804
7
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
7
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
7
        const auto& result = results.back();
2811
2812
7
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
7
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
7
        if ( options.disableTests == false ) {
2830
7
            tests::test(op, result.second);
2831
7
        }
2832
2833
7
        postprocess(module, op, result);
2834
7
    }
2835
2836
3
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
3
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::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
27
    do {
2725
27
        auto op = getOp(&parentDs, data, size);
2726
27
        auto module = getModule(parentDs);
2727
27
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
27
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
27
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
27
    } 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
27
        for (const auto& op : operations) {
2760
27
            operationModuleIDs.insert(op.first->ID);
2761
27
        }
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
40
    for (size_t i = 0; i < operations.size(); i++) {
2781
27
        auto& operation = operations[i];
2782
2783
27
        auto& module = operation.first;
2784
27
        auto& op = operation.second;
2785
2786
27
        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
9
                auto& curModifier = op.modifier.GetVectorPtr();
2792
9
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
6
                } else {
2797
191
                    for (auto& c : curModifier) {
2798
191
                        c++;
2799
191
                    }
2800
3
                }
2801
9
            }
2802
14
        }
2803
2804
27
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
27
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
27
        const auto& result = results.back();
2811
2812
27
        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
27
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
27
        if ( options.disableTests == false ) {
2830
27
            tests::test(op, result.second);
2831
27
        }
2832
2833
27
        postprocess(module, op, result);
2834
27
    }
2835
2836
13
    if ( options.noCompare == false ) {
2837
13
        compare(operations, results, data, size);
2838
13
    }
2839
13
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::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
16
    do {
2725
16
        auto op = getOp(&parentDs, data, size);
2726
16
        auto module = getModule(parentDs);
2727
16
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
16
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
16
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
16
    } while ( parentDs.Get<bool>() == true );
2738
2739
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
16
        for (const auto& op : operations) {
2760
16
            operationModuleIDs.insert(op.first->ID);
2761
16
        }
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
24
    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
5
                auto& curModifier = op.modifier.GetVectorPtr();
2792
5
                if ( curModifier.size() == 0 ) {
2793
2.05k
                    for (size_t j = 0; j < 512; j++) {
2794
2.04k
                        curModifier.push_back(1);
2795
2.04k
                    }
2796
4
                } else {
2797
134
                    for (auto& c : curModifier) {
2798
134
                        c++;
2799
134
                    }
2800
1
                }
2801
5
            }
2802
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
8
    if ( options.noCompare == false ) {
2837
8
        compare(operations, results, data, size);
2838
8
    }
2839
8
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
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
186
                    for (auto& c : curModifier) {
2798
186
                        c++;
2799
186
                    }
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
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
13
    do {
2725
13
        auto op = getOp(&parentDs, data, size);
2726
13
        auto module = getModule(parentDs);
2727
13
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
13
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
13
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
13
    } 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
13
        for (const auto& op : operations) {
2760
13
            operationModuleIDs.insert(op.first->ID);
2761
13
        }
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
21
    for (size_t i = 0; i < operations.size(); i++) {
2781
13
        auto& operation = operations[i];
2782
2783
13
        auto& module = operation.first;
2784
13
        auto& op = operation.second;
2785
2786
13
        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
448
                    for (auto& c : curModifier) {
2798
448
                        c++;
2799
448
                    }
2800
2
                }
2801
2
            }
2802
5
        }
2803
2804
13
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
13
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
13
        const auto& result = results.back();
2811
2812
13
        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
13
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
13
        if ( options.disableTests == false ) {
2830
13
            tests::test(op, result.second);
2831
13
        }
2832
2833
13
        postprocess(module, op, result);
2834
13
    }
2835
2836
8
    if ( options.noCompare == false ) {
2837
8
        compare(operations, results, data, size);
2838
8
    }
2839
8
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
385
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
385
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
385
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
875
    do {
2725
875
        auto op = getOp(&parentDs, data, size);
2726
875
        auto module = getModule(parentDs);
2727
875
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
875
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
875
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
24
            break;
2736
24
        }
2737
875
    } while ( parentDs.Get<bool>() == true );
2738
2739
385
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
385
#if 1
2745
385
    {
2746
385
        std::set<uint64_t> moduleIDs;
2747
385
        for (const auto& m : modules ) {
2748
327
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
327
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
327
            moduleIDs.insert(moduleID);
2756
327
        }
2757
2758
385
        std::set<uint64_t> operationModuleIDs;
2759
748
        for (const auto& op : operations) {
2760
748
            operationModuleIDs.insert(op.first->ID);
2761
748
        }
2762
2763
385
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
385
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
385
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
385
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
385
    }
2771
385
#endif
2772
2773
385
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
385
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.13k
    for (size_t i = 0; i < operations.size(); i++) {
2781
748
        auto& operation = operations[i];
2782
2783
748
        auto& module = operation.first;
2784
748
        auto& op = operation.second;
2785
2786
748
        if ( i > 0 ) {
2787
421
            auto& prevModule = operations[i-1].first;
2788
421
            auto& prevOp = operations[i-1].second;
2789
2790
421
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
149
                auto& curModifier = op.modifier.GetVectorPtr();
2792
149
                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
123
                } else {
2797
1.16k
                    for (auto& c : curModifier) {
2798
1.16k
                        c++;
2799
1.16k
                    }
2800
123
                }
2801
149
            }
2802
421
        }
2803
2804
748
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
748
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
748
        const auto& result = results.back();
2811
2812
748
        if ( result.second != std::nullopt ) {
2813
119
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
119
        }
2820
2821
748
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
748
        if ( options.disableTests == false ) {
2830
748
            tests::test(op, result.second);
2831
748
        }
2832
2833
748
        postprocess(module, op, result);
2834
748
    }
2835
2836
385
    if ( options.noCompare == false ) {
2837
327
        compare(operations, results, data, size);
2838
327
    }
2839
385
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
527
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
527
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
527
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.14k
    do {
2725
1.14k
        auto op = getOp(&parentDs, data, size);
2726
1.14k
        auto module = getModule(parentDs);
2727
1.14k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.14k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.14k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
41
            break;
2736
41
        }
2737
1.14k
    } while ( parentDs.Get<bool>() == true );
2738
2739
527
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
527
#if 1
2745
527
    {
2746
527
        std::set<uint64_t> moduleIDs;
2747
527
        for (const auto& m : modules ) {
2748
435
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
435
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
435
            moduleIDs.insert(moduleID);
2756
435
        }
2757
2758
527
        std::set<uint64_t> operationModuleIDs;
2759
941
        for (const auto& op : operations) {
2760
941
            operationModuleIDs.insert(op.first->ID);
2761
941
        }
2762
2763
527
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
527
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
527
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
527
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
527
    }
2771
527
#endif
2772
2773
527
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
527
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.46k
    for (size_t i = 0; i < operations.size(); i++) {
2781
941
        auto& operation = operations[i];
2782
2783
941
        auto& module = operation.first;
2784
941
        auto& op = operation.second;
2785
2786
941
        if ( i > 0 ) {
2787
506
            auto& prevModule = operations[i-1].first;
2788
506
            auto& prevOp = operations[i-1].second;
2789
2790
506
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
123
                auto& curModifier = op.modifier.GetVectorPtr();
2792
123
                if ( curModifier.size() == 0 ) {
2793
22.5k
                    for (size_t j = 0; j < 512; j++) {
2794
22.5k
                        curModifier.push_back(1);
2795
22.5k
                    }
2796
79
                } else {
2797
2.65k
                    for (auto& c : curModifier) {
2798
2.65k
                        c++;
2799
2.65k
                    }
2800
79
                }
2801
123
            }
2802
506
        }
2803
2804
941
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
941
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
941
        const auto& result = results.back();
2811
2812
941
        if ( result.second != std::nullopt ) {
2813
187
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
187
        }
2820
2821
941
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
941
        if ( options.disableTests == false ) {
2830
941
            tests::test(op, result.second);
2831
941
        }
2832
2833
941
        postprocess(module, op, result);
2834
941
    }
2835
2836
527
    if ( options.noCompare == false ) {
2837
435
        compare(operations, results, data, size);
2838
435
    }
2839
527
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
486
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
486
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
486
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.11k
    do {
2725
1.11k
        auto op = getOp(&parentDs, data, size);
2726
1.11k
        auto module = getModule(parentDs);
2727
1.11k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.11k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.11k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
37
            break;
2736
37
        }
2737
1.11k
    } while ( parentDs.Get<bool>() == true );
2738
2739
486
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
486
#if 1
2745
486
    {
2746
486
        std::set<uint64_t> moduleIDs;
2747
486
        for (const auto& m : modules ) {
2748
385
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
385
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
385
            moduleIDs.insert(moduleID);
2756
385
        }
2757
2758
486
        std::set<uint64_t> operationModuleIDs;
2759
895
        for (const auto& op : operations) {
2760
895
            operationModuleIDs.insert(op.first->ID);
2761
895
        }
2762
2763
486
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
486
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
486
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
486
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
486
    }
2771
486
#endif
2772
2773
486
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
486
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.38k
    for (size_t i = 0; i < operations.size(); i++) {
2781
895
        auto& operation = operations[i];
2782
2783
895
        auto& module = operation.first;
2784
895
        auto& op = operation.second;
2785
2786
895
        if ( i > 0 ) {
2787
510
            auto& prevModule = operations[i-1].first;
2788
510
            auto& prevOp = operations[i-1].second;
2789
2790
510
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
130
                auto& curModifier = op.modifier.GetVectorPtr();
2792
130
                if ( curModifier.size() == 0 ) {
2793
25.6k
                    for (size_t j = 0; j < 512; j++) {
2794
25.6k
                        curModifier.push_back(1);
2795
25.6k
                    }
2796
80
                } else {
2797
2.22k
                    for (auto& c : curModifier) {
2798
2.22k
                        c++;
2799
2.22k
                    }
2800
80
                }
2801
130
            }
2802
510
        }
2803
2804
895
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
895
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
895
        const auto& result = results.back();
2811
2812
895
        if ( result.second != std::nullopt ) {
2813
10
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
10
        }
2820
2821
895
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
895
        if ( options.disableTests == false ) {
2830
895
            tests::test(op, result.second);
2831
895
        }
2832
2833
895
        postprocess(module, op, result);
2834
895
    }
2835
2836
486
    if ( options.noCompare == false ) {
2837
385
        compare(operations, results, data, size);
2838
385
    }
2839
486
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.99k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.99k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.99k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.50k
    do {
2725
3.50k
        auto op = getOp(&parentDs, data, size);
2726
3.50k
        auto module = getModule(parentDs);
2727
3.50k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
3.50k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.50k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
71
            break;
2736
71
        }
2737
3.50k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.99k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.99k
#if 1
2745
1.99k
    {
2746
1.99k
        std::set<uint64_t> moduleIDs;
2747
1.99k
        for (const auto& m : modules ) {
2748
1.86k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.86k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.86k
            moduleIDs.insert(moduleID);
2756
1.86k
        }
2757
2758
1.99k
        std::set<uint64_t> operationModuleIDs;
2759
3.24k
        for (const auto& op : operations) {
2760
3.24k
            operationModuleIDs.insert(op.first->ID);
2761
3.24k
        }
2762
2763
1.99k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.99k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.99k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.99k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1.99k
    }
2771
1.99k
#endif
2772
2773
1.99k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.99k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
5.24k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.24k
        auto& operation = operations[i];
2782
2783
3.24k
        auto& module = operation.first;
2784
3.24k
        auto& op = operation.second;
2785
2786
3.24k
        if ( i > 0 ) {
2787
1.38k
            auto& prevModule = operations[i-1].first;
2788
1.38k
            auto& prevOp = operations[i-1].second;
2789
2790
1.38k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
349
                auto& curModifier = op.modifier.GetVectorPtr();
2792
349
                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
286
                } else {
2797
29.4k
                    for (auto& c : curModifier) {
2798
29.4k
                        c++;
2799
29.4k
                    }
2800
286
                }
2801
349
            }
2802
1.38k
        }
2803
2804
3.24k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.24k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.24k
        const auto& result = results.back();
2811
2812
3.24k
        if ( result.second != std::nullopt ) {
2813
120
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
120
        }
2820
2821
3.24k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.24k
        if ( options.disableTests == false ) {
2830
3.24k
            tests::test(op, result.second);
2831
3.24k
        }
2832
2833
3.24k
        postprocess(module, op, result);
2834
3.24k
    }
2835
2836
1.99k
    if ( options.noCompare == false ) {
2837
1.86k
        compare(operations, results, data, size);
2838
1.86k
    }
2839
1.99k
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.98k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.98k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.98k
    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
64
            break;
2736
64
        }
2737
3.13k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.98k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.98k
#if 1
2745
1.98k
    {
2746
1.98k
        std::set<uint64_t> moduleIDs;
2747
1.98k
        for (const auto& m : modules ) {
2748
1.87k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.87k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.87k
            moduleIDs.insert(moduleID);
2756
1.87k
        }
2757
2758
1.98k
        std::set<uint64_t> operationModuleIDs;
2759
2.93k
        for (const auto& op : operations) {
2760
2.93k
            operationModuleIDs.insert(op.first->ID);
2761
2.93k
        }
2762
2763
1.98k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.98k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.98k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.98k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1.98k
    }
2771
1.98k
#endif
2772
2773
1.98k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.98k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
4.91k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.93k
        auto& operation = operations[i];
2782
2783
2.93k
        auto& module = operation.first;
2784
2.93k
        auto& op = operation.second;
2785
2786
2.93k
        if ( i > 0 ) {
2787
1.05k
            auto& prevModule = operations[i-1].first;
2788
1.05k
            auto& prevOp = operations[i-1].second;
2789
2790
1.05k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
290
                auto& curModifier = op.modifier.GetVectorPtr();
2792
290
                if ( curModifier.size() == 0 ) {
2793
31.2k
                    for (size_t j = 0; j < 512; j++) {
2794
31.2k
                        curModifier.push_back(1);
2795
31.2k
                    }
2796
229
                } else {
2797
17.2k
                    for (auto& c : curModifier) {
2798
17.2k
                        c++;
2799
17.2k
                    }
2800
229
                }
2801
290
            }
2802
1.05k
        }
2803
2804
2.93k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.93k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.93k
        const auto& result = results.back();
2811
2812
2.93k
        if ( result.second != std::nullopt ) {
2813
152
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
152
        }
2820
2821
2.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
2.93k
        if ( options.disableTests == false ) {
2830
2.93k
            tests::test(op, result.second);
2831
2.93k
        }
2832
2833
2.93k
        postprocess(module, op, result);
2834
2.93k
    }
2835
2836
1.98k
    if ( options.noCompare == false ) {
2837
1.87k
        compare(operations, results, data, size);
2838
1.87k
    }
2839
1.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::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
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
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
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
14
        std::set<uint64_t> operationModuleIDs;
2759
24
        for (const auto& op : operations) {
2760
24
            operationModuleIDs.insert(op.first->ID);
2761
24
        }
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
38
    for (size_t i = 0; i < operations.size(); i++) {
2781
24
        auto& operation = operations[i];
2782
2783
24
        auto& module = operation.first;
2784
24
        auto& op = operation.second;
2785
2786
24
        if ( i > 0 ) {
2787
12
            auto& prevModule = operations[i-1].first;
2788
12
            auto& prevOp = operations[i-1].second;
2789
2790
12
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
1
                    for (auto& c : curModifier) {
2798
1
                        c++;
2799
1
                    }
2800
1
                }
2801
1
            }
2802
12
        }
2803
2804
24
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
24
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
24
        const auto& result = results.back();
2811
2812
24
        if ( result.second != std::nullopt ) {
2813
3
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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
        }
2820
2821
24
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
24
        if ( options.disableTests == false ) {
2830
24
            tests::test(op, result.second);
2831
24
        }
2832
2833
24
        postprocess(module, op, result);
2834
24
    }
2835
2836
14
    if ( options.noCompare == false ) {
2837
12
        compare(operations, results, data, size);
2838
12
    }
2839
14
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.40k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.40k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.40k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.88k
    do {
2725
4.88k
        auto op = getOp(&parentDs, data, size);
2726
4.88k
        auto module = getModule(parentDs);
2727
4.88k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4.88k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.88k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
60
            break;
2736
60
        }
2737
4.88k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.40k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.40k
#if 1
2745
3.40k
    {
2746
3.40k
        std::set<uint64_t> moduleIDs;
2747
3.40k
        for (const auto& m : modules ) {
2748
3.25k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.25k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.25k
            moduleIDs.insert(moduleID);
2756
3.25k
        }
2757
2758
3.40k
        std::set<uint64_t> operationModuleIDs;
2759
4.63k
        for (const auto& op : operations) {
2760
4.63k
            operationModuleIDs.insert(op.first->ID);
2761
4.63k
        }
2762
2763
3.40k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.40k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.40k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.40k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3.40k
    }
2771
3.40k
#endif
2772
2773
3.40k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.40k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
8.03k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.63k
        auto& operation = operations[i];
2782
2783
4.63k
        auto& module = operation.first;
2784
4.63k
        auto& op = operation.second;
2785
2786
4.63k
        if ( i > 0 ) {
2787
1.37k
            auto& prevModule = operations[i-1].first;
2788
1.37k
            auto& prevOp = operations[i-1].second;
2789
2790
1.37k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
323
                auto& curModifier = op.modifier.GetVectorPtr();
2792
323
                if ( curModifier.size() == 0 ) {
2793
26.1k
                    for (size_t j = 0; j < 512; j++) {
2794
26.1k
                        curModifier.push_back(1);
2795
26.1k
                    }
2796
272
                } else {
2797
25.5k
                    for (auto& c : curModifier) {
2798
25.5k
                        c++;
2799
25.5k
                    }
2800
272
                }
2801
323
            }
2802
1.37k
        }
2803
2804
4.63k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.63k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.63k
        const auto& result = results.back();
2811
2812
4.63k
        if ( result.second != std::nullopt ) {
2813
117
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
117
        }
2820
2821
4.63k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.63k
        if ( options.disableTests == false ) {
2830
4.63k
            tests::test(op, result.second);
2831
4.63k
        }
2832
2833
4.63k
        postprocess(module, op, result);
2834
4.63k
    }
2835
2836
3.40k
    if ( options.noCompare == false ) {
2837
3.25k
        compare(operations, results, data, size);
2838
3.25k
    }
2839
3.40k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::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
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
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
16
        for (const auto& op : operations) {
2760
16
            operationModuleIDs.insert(op.first->ID);
2761
16
        }
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
24
    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
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
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
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
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
8
    if ( options.noCompare == false ) {
2837
8
        compare(operations, results, data, size);
2838
8
    }
2839
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.38k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.38k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.38k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.28k
    do {
2725
2.28k
        auto op = getOp(&parentDs, data, size);
2726
2.28k
        auto module = getModule(parentDs);
2727
2.28k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2.28k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.28k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
34
            break;
2736
34
        }
2737
2.28k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.38k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.38k
#if 1
2745
1.38k
    {
2746
1.38k
        std::set<uint64_t> moduleIDs;
2747
1.38k
        for (const auto& m : modules ) {
2748
1.20k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.20k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.20k
            moduleIDs.insert(moduleID);
2756
1.20k
        }
2757
2758
1.38k
        std::set<uint64_t> operationModuleIDs;
2759
2.00k
        for (const auto& op : operations) {
2760
2.00k
            operationModuleIDs.insert(op.first->ID);
2761
2.00k
        }
2762
2763
1.38k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.38k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.38k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.38k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1.38k
    }
2771
1.38k
#endif
2772
2773
1.38k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.38k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.39k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.00k
        auto& operation = operations[i];
2782
2783
2.00k
        auto& module = operation.first;
2784
2.00k
        auto& op = operation.second;
2785
2786
2.00k
        if ( i > 0 ) {
2787
796
            auto& prevModule = operations[i-1].first;
2788
796
            auto& prevOp = operations[i-1].second;
2789
2790
796
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
317
                auto& curModifier = op.modifier.GetVectorPtr();
2792
317
                if ( curModifier.size() == 0 ) {
2793
50.7k
                    for (size_t j = 0; j < 512; j++) {
2794
50.6k
                        curModifier.push_back(1);
2795
50.6k
                    }
2796
218
                } else {
2797
7.12k
                    for (auto& c : curModifier) {
2798
7.12k
                        c++;
2799
7.12k
                    }
2800
218
                }
2801
317
            }
2802
796
        }
2803
2804
2.00k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.00k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.00k
        const auto& result = results.back();
2811
2812
2.00k
        if ( result.second != std::nullopt ) {
2813
146
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
146
        }
2820
2821
2.00k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2.00k
        if ( options.disableTests == false ) {
2830
2.00k
            tests::test(op, result.second);
2831
2.00k
        }
2832
2833
2.00k
        postprocess(module, op, result);
2834
2.00k
    }
2835
2836
1.38k
    if ( options.noCompare == false ) {
2837
1.20k
        compare(operations, results, data, size);
2838
1.20k
    }
2839
1.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
845
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
845
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
845
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.74k
    do {
2725
1.74k
        auto op = getOp(&parentDs, data, size);
2726
1.74k
        auto module = getModule(parentDs);
2727
1.74k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.74k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.74k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
38
            break;
2736
38
        }
2737
1.74k
    } while ( parentDs.Get<bool>() == true );
2738
2739
845
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
845
#if 1
2745
845
    {
2746
845
        std::set<uint64_t> moduleIDs;
2747
845
        for (const auto& m : modules ) {
2748
717
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
717
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
717
            moduleIDs.insert(moduleID);
2756
717
        }
2757
2758
845
        std::set<uint64_t> operationModuleIDs;
2759
1.51k
        for (const auto& op : operations) {
2760
1.51k
            operationModuleIDs.insert(op.first->ID);
2761
1.51k
        }
2762
2763
845
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
845
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
845
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
845
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
845
    }
2771
845
#endif
2772
2773
845
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
845
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.36k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.51k
        auto& operation = operations[i];
2782
2783
1.51k
        auto& module = operation.first;
2784
1.51k
        auto& op = operation.second;
2785
2786
1.51k
        if ( i > 0 ) {
2787
802
            auto& prevModule = operations[i-1].first;
2788
802
            auto& prevOp = operations[i-1].second;
2789
2790
802
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
330
                auto& curModifier = op.modifier.GetVectorPtr();
2792
330
                if ( curModifier.size() == 0 ) {
2793
82.0k
                    for (size_t j = 0; j < 512; j++) {
2794
81.9k
                        curModifier.push_back(1);
2795
81.9k
                    }
2796
170
                } else {
2797
28.7k
                    for (auto& c : curModifier) {
2798
28.7k
                        c++;
2799
28.7k
                    }
2800
170
                }
2801
330
            }
2802
802
        }
2803
2804
1.51k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.51k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.51k
        const auto& result = results.back();
2811
2812
1.51k
        if ( result.second != std::nullopt ) {
2813
156
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
156
        }
2820
2821
1.51k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.51k
        if ( options.disableTests == false ) {
2830
1.51k
            tests::test(op, result.second);
2831
1.51k
        }
2832
2833
1.51k
        postprocess(module, op, result);
2834
1.51k
    }
2835
2836
845
    if ( options.noCompare == false ) {
2837
717
        compare(operations, results, data, size);
2838
717
    }
2839
845
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
26.4k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
26.4k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
26.4k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
37.0k
    do {
2725
37.0k
        auto op = getOp(&parentDs, data, size);
2726
37.0k
        auto module = getModule(parentDs);
2727
37.0k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
37.0k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
37.0k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
430
            break;
2736
430
        }
2737
37.0k
    } while ( parentDs.Get<bool>() == true );
2738
2739
26.4k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
26.4k
#if 1
2745
26.4k
    {
2746
26.4k
        std::set<uint64_t> moduleIDs;
2747
26.4k
        for (const auto& m : modules ) {
2748
26.3k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
26.3k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
26.3k
            moduleIDs.insert(moduleID);
2756
26.3k
        }
2757
2758
26.4k
        std::set<uint64_t> operationModuleIDs;
2759
36.8k
        for (const auto& op : operations) {
2760
36.8k
            operationModuleIDs.insert(op.first->ID);
2761
36.8k
        }
2762
2763
26.4k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
26.4k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
26.4k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
26.4k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
26.4k
    }
2771
26.4k
#endif
2772
2773
26.4k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
26.4k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
63.3k
    for (size_t i = 0; i < operations.size(); i++) {
2781
36.8k
        auto& operation = operations[i];
2782
2783
36.8k
        auto& module = operation.first;
2784
36.8k
        auto& op = operation.second;
2785
2786
36.8k
        if ( i > 0 ) {
2787
10.4k
            auto& prevModule = operations[i-1].first;
2788
10.4k
            auto& prevOp = operations[i-1].second;
2789
2790
10.4k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
3.12k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
3.12k
                if ( curModifier.size() == 0 ) {
2793
975k
                    for (size_t j = 0; j < 512; j++) {
2794
973k
                        curModifier.push_back(1);
2795
973k
                    }
2796
1.90k
                } else {
2797
413k
                    for (auto& c : curModifier) {
2798
413k
                        c++;
2799
413k
                    }
2800
1.22k
                }
2801
3.12k
            }
2802
10.4k
        }
2803
2804
36.8k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
36.8k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
36.8k
        const auto& result = results.back();
2811
2812
36.8k
        if ( result.second != std::nullopt ) {
2813
15.1k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
15.1k
        }
2820
2821
36.8k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
36.8k
        if ( options.disableTests == false ) {
2830
36.8k
            tests::test(op, result.second);
2831
36.8k
        }
2832
2833
36.8k
        postprocess(module, op, result);
2834
36.8k
    }
2835
2836
26.4k
    if ( options.noCompare == false ) {
2837
26.3k
        compare(operations, results, data, size);
2838
26.3k
    }
2839
26.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
53
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
53
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
53
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
105
    do {
2725
105
        auto op = getOp(&parentDs, data, size);
2726
105
        auto module = getModule(parentDs);
2727
105
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
105
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
105
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
105
    } while ( parentDs.Get<bool>() == true );
2738
2739
53
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
53
#if 1
2745
53
    {
2746
53
        std::set<uint64_t> moduleIDs;
2747
53
        for (const auto& m : modules ) {
2748
53
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
53
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
53
            moduleIDs.insert(moduleID);
2756
53
        }
2757
2758
53
        std::set<uint64_t> operationModuleIDs;
2759
105
        for (const auto& op : operations) {
2760
105
            operationModuleIDs.insert(op.first->ID);
2761
105
        }
2762
2763
53
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
53
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
53
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
53
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
53
    }
2771
53
#endif
2772
2773
53
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
53
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
158
    for (size_t i = 0; i < operations.size(); i++) {
2781
105
        auto& operation = operations[i];
2782
2783
105
        auto& module = operation.first;
2784
105
        auto& op = operation.second;
2785
2786
105
        if ( i > 0 ) {
2787
52
            auto& prevModule = operations[i-1].first;
2788
52
            auto& prevOp = operations[i-1].second;
2789
2790
52
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
28
                auto& curModifier = op.modifier.GetVectorPtr();
2792
28
                if ( curModifier.size() == 0 ) {
2793
11.2k
                    for (size_t j = 0; j < 512; j++) {
2794
11.2k
                        curModifier.push_back(1);
2795
11.2k
                    }
2796
22
                } else {
2797
195
                    for (auto& c : curModifier) {
2798
195
                        c++;
2799
195
                    }
2800
6
                }
2801
28
            }
2802
52
        }
2803
2804
105
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
105
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
105
        const auto& result = results.back();
2811
2812
105
        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
105
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
105
        if ( options.disableTests == false ) {
2830
105
            tests::test(op, result.second);
2831
105
        }
2832
2833
105
        postprocess(module, op, result);
2834
105
    }
2835
2836
53
    if ( options.noCompare == false ) {
2837
53
        compare(operations, results, data, size);
2838
53
    }
2839
53
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
304
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
304
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
304
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
653
    do {
2725
653
        auto op = getOp(&parentDs, data, size);
2726
653
        auto module = getModule(parentDs);
2727
653
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
653
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
653
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
653
    } while ( parentDs.Get<bool>() == true );
2738
2739
304
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
304
#if 1
2745
304
    {
2746
304
        std::set<uint64_t> moduleIDs;
2747
304
        for (const auto& m : modules ) {
2748
303
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
303
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
303
            moduleIDs.insert(moduleID);
2756
303
        }
2757
2758
304
        std::set<uint64_t> operationModuleIDs;
2759
650
        for (const auto& op : operations) {
2760
650
            operationModuleIDs.insert(op.first->ID);
2761
650
        }
2762
2763
304
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
304
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
304
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
304
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
304
    }
2771
304
#endif
2772
2773
304
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
304
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
954
    for (size_t i = 0; i < operations.size(); i++) {
2781
650
        auto& operation = operations[i];
2782
2783
650
        auto& module = operation.first;
2784
650
        auto& op = operation.second;
2785
2786
650
        if ( i > 0 ) {
2787
347
            auto& prevModule = operations[i-1].first;
2788
347
            auto& prevOp = operations[i-1].second;
2789
2790
347
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
177
                auto& curModifier = op.modifier.GetVectorPtr();
2792
177
                if ( curModifier.size() == 0 ) {
2793
75.4k
                    for (size_t j = 0; j < 512; j++) {
2794
75.2k
                        curModifier.push_back(1);
2795
75.2k
                    }
2796
147
                } else {
2797
19.8k
                    for (auto& c : curModifier) {
2798
19.8k
                        c++;
2799
19.8k
                    }
2800
30
                }
2801
177
            }
2802
347
        }
2803
2804
650
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
650
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
650
        const auto& result = results.back();
2811
2812
650
        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
650
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
650
        if ( options.disableTests == false ) {
2830
650
            tests::test(op, result.second);
2831
650
        }
2832
2833
650
        postprocess(module, op, result);
2834
650
    }
2835
2836
304
    if ( options.noCompare == false ) {
2837
303
        compare(operations, results, data, size);
2838
303
    }
2839
304
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
9
    do {
2725
9
        auto op = getOp(&parentDs, data, size);
2726
9
        auto module = getModule(parentDs);
2727
9
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
9
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
9
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
9
    } while ( parentDs.Get<bool>() == true );
2738
2739
4
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4
#if 1
2745
4
    {
2746
4
        std::set<uint64_t> moduleIDs;
2747
4
        for (const auto& m : modules ) {
2748
3
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3
            moduleIDs.insert(moduleID);
2756
3
        }
2757
2758
4
        std::set<uint64_t> operationModuleIDs;
2759
8
        for (const auto& op : operations) {
2760
8
            operationModuleIDs.insert(op.first->ID);
2761
8
        }
2762
2763
4
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
4
    }
2771
4
#endif
2772
2773
4
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
12
    for (size_t i = 0; i < operations.size(); i++) {
2781
8
        auto& operation = operations[i];
2782
2783
8
        auto& module = operation.first;
2784
8
        auto& op = operation.second;
2785
2786
8
        if ( i > 0 ) {
2787
5
            auto& prevModule = operations[i-1].first;
2788
5
            auto& prevOp = operations[i-1].second;
2789
2790
5
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
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
4
    if ( options.noCompare == false ) {
2837
3
        compare(operations, results, data, size);
2838
3
    }
2839
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
10
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
10
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
10
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
12
    do {
2725
12
        auto op = getOp(&parentDs, data, size);
2726
12
        auto module = getModule(parentDs);
2727
12
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
12
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
12
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
12
    } 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
12
        for (const auto& op : operations) {
2760
12
            operationModuleIDs.insert(op.first->ID);
2761
12
        }
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
22
    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
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
18
                    for (auto& c : curModifier) {
2798
18
                        c++;
2799
18
                    }
2800
2
                }
2801
2
            }
2802
2
        }
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
10
    if ( options.noCompare == false ) {
2837
10
        compare(operations, results, data, size);
2838
10
    }
2839
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
10
    do {
2725
10
        auto op = getOp(&parentDs, data, size);
2726
10
        auto module = getModule(parentDs);
2727
10
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
10
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
10
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
10
    } 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
10
        for (const auto& op : operations) {
2760
10
            operationModuleIDs.insert(op.first->ID);
2761
10
        }
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
14
    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
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
133
                    for (auto& c : curModifier) {
2798
133
                        c++;
2799
133
                    }
2800
1
                }
2801
1
            }
2802
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
4
    if ( options.noCompare == false ) {
2837
4
        compare(operations, results, data, size);
2838
4
    }
2839
4
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
8
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
8
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
8
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
18
    do {
2725
18
        auto op = getOp(&parentDs, data, size);
2726
18
        auto module = getModule(parentDs);
2727
18
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
18
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
18
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
18
    } while ( parentDs.Get<bool>() == true );
2738
2739
8
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
8
#if 1
2745
8
    {
2746
8
        std::set<uint64_t> moduleIDs;
2747
8
        for (const auto& m : modules ) {
2748
8
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
8
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
8
            moduleIDs.insert(moduleID);
2756
8
        }
2757
2758
8
        std::set<uint64_t> operationModuleIDs;
2759
18
        for (const auto& op : operations) {
2760
18
            operationModuleIDs.insert(op.first->ID);
2761
18
        }
2762
2763
8
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
8
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
8
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
8
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
8
    }
2771
8
#endif
2772
2773
8
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
8
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
26
    for (size_t i = 0; i < operations.size(); i++) {
2781
18
        auto& operation = operations[i];
2782
2783
18
        auto& module = operation.first;
2784
18
        auto& op = operation.second;
2785
2786
18
        if ( i > 0 ) {
2787
10
            auto& prevModule = operations[i-1].first;
2788
10
            auto& prevOp = operations[i-1].second;
2789
2790
10
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
9
                auto& curModifier = op.modifier.GetVectorPtr();
2792
9
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
9
                } else {
2797
683
                    for (auto& c : curModifier) {
2798
683
                        c++;
2799
683
                    }
2800
9
                }
2801
9
            }
2802
10
        }
2803
2804
18
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
18
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
18
        const auto& result = results.back();
2811
2812
18
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
18
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
18
        if ( options.disableTests == false ) {
2830
18
            tests::test(op, result.second);
2831
18
        }
2832
2833
18
        postprocess(module, op, result);
2834
18
    }
2835
2836
8
    if ( options.noCompare == false ) {
2837
8
        compare(operations, results, data, size);
2838
8
    }
2839
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
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
19
    do {
2725
19
        auto op = getOp(&parentDs, data, size);
2726
19
        auto module = getModule(parentDs);
2727
19
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
19
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
19
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
19
    } 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
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
7
        std::set<uint64_t> operationModuleIDs;
2759
10
        for (const auto& op : operations) {
2760
10
            operationModuleIDs.insert(op.first->ID);
2761
10
        }
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
17
    for (size_t i = 0; i < operations.size(); i++) {
2781
10
        auto& operation = operations[i];
2782
2783
10
        auto& module = operation.first;
2784
10
        auto& op = operation.second;
2785
2786
10
        if ( i > 0 ) {
2787
7
            auto& prevModule = operations[i-1].first;
2788
7
            auto& prevOp = operations[i-1].second;
2789
2790
7
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2
                if ( curModifier.size() == 0 ) {
2793
1.02k
                    for (size_t j = 0; j < 512; j++) {
2794
1.02k
                        curModifier.push_back(1);
2795
1.02k
                    }
2796
2
                } else {
2797
0
                    for (auto& c : curModifier) {
2798
0
                        c++;
2799
0
                    }
2800
0
                }
2801
2
            }
2802
7
        }
2803
2804
10
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
10
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
10
        const auto& result = results.back();
2811
2812
10
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
10
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
10
        if ( options.disableTests == false ) {
2830
10
            tests::test(op, result.second);
2831
10
        }
2832
2833
10
        postprocess(module, op, result);
2834
10
    }
2835
2836
7
    if ( options.noCompare == false ) {
2837
3
        compare(operations, results, data, size);
2838
3
    }
2839
7
}
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
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
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
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
10
        std::set<uint64_t> operationModuleIDs;
2759
12
        for (const auto& op : operations) {
2760
12
            operationModuleIDs.insert(op.first->ID);
2761
12
        }
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
22
    for (size_t i = 0; i < operations.size(); i++) {
2781
12
        auto& operation = operations[i];
2782
2783
12
        auto& module = operation.first;
2784
12
        auto& op = operation.second;
2785
2786
12
        if ( i > 0 ) {
2787
8
            auto& prevModule = operations[i-1].first;
2788
8
            auto& prevOp = operations[i-1].second;
2789
2790
8
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
5
                auto& curModifier = op.modifier.GetVectorPtr();
2792
5
                if ( curModifier.size() == 0 ) {
2793
1.53k
                    for (size_t j = 0; j < 512; j++) {
2794
1.53k
                        curModifier.push_back(1);
2795
1.53k
                    }
2796
3
                } else {
2797
474
                    for (auto& c : curModifier) {
2798
474
                        c++;
2799
474
                    }
2800
2
                }
2801
5
            }
2802
8
        }
2803
2804
12
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
12
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
12
        const auto& result = results.back();
2811
2812
12
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
12
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
12
        if ( options.disableTests == false ) {
2830
12
            tests::test(op, result.second);
2831
12
        }
2832
2833
12
        postprocess(module, op, result);
2834
12
    }
2835
2836
10
    if ( options.noCompare == false ) {
2837
4
        compare(operations, results, data, size);
2838
4
    }
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
4
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
9
    do {
2725
9
        auto op = getOp(&parentDs, data, size);
2726
9
        auto module = getModule(parentDs);
2727
9
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
9
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
9
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
9
    } while ( parentDs.Get<bool>() == true );
2738
2739
4
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4
#if 1
2745
4
    {
2746
4
        std::set<uint64_t> moduleIDs;
2747
4
        for (const auto& m : modules ) {
2748
3
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3
            moduleIDs.insert(moduleID);
2756
3
        }
2757
2758
4
        std::set<uint64_t> operationModuleIDs;
2759
8
        for (const auto& op : operations) {
2760
8
            operationModuleIDs.insert(op.first->ID);
2761
8
        }
2762
2763
4
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
4
    }
2771
4
#endif
2772
2773
4
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
12
    for (size_t i = 0; i < operations.size(); i++) {
2781
8
        auto& operation = operations[i];
2782
2783
8
        auto& module = operation.first;
2784
8
        auto& op = operation.second;
2785
2786
8
        if ( i > 0 ) {
2787
5
            auto& prevModule = operations[i-1].first;
2788
5
            auto& prevOp = operations[i-1].second;
2789
2790
5
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
3
                auto& curModifier = op.modifier.GetVectorPtr();
2792
3
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
3
                } else {
2797
1.07k
                    for (auto& c : curModifier) {
2798
1.07k
                        c++;
2799
1.07k
                    }
2800
3
                }
2801
3
            }
2802
5
        }
2803
2804
8
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
8
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
8
        const auto& result = results.back();
2811
2812
8
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
8
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
8
        if ( options.disableTests == false ) {
2830
8
            tests::test(op, result.second);
2831
8
        }
2832
2833
8
        postprocess(module, op, result);
2834
8
    }
2835
2836
4
    if ( options.noCompare == false ) {
2837
3
        compare(operations, results, data, size);
2838
3
    }
2839
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
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
27
    do {
2725
27
        auto op = getOp(&parentDs, data, size);
2726
27
        auto module = getModule(parentDs);
2727
27
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
27
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
27
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
27
    } 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
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
9
        std::set<uint64_t> operationModuleIDs;
2759
10
        for (const auto& op : operations) {
2760
10
            operationModuleIDs.insert(op.first->ID);
2761
10
        }
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
19
    for (size_t i = 0; i < operations.size(); i++) {
2781
10
        auto& operation = operations[i];
2782
2783
10
        auto& module = operation.first;
2784
10
        auto& op = operation.second;
2785
2786
10
        if ( i > 0 ) {
2787
7
            auto& prevModule = operations[i-1].first;
2788
7
            auto& prevOp = operations[i-1].second;
2789
2790
7
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
4
                auto& curModifier = op.modifier.GetVectorPtr();
2792
4
                if ( curModifier.size() == 0 ) {
2793
1.53k
                    for (size_t j = 0; j < 512; j++) {
2794
1.53k
                        curModifier.push_back(1);
2795
1.53k
                    }
2796
3
                } else {
2797
616
                    for (auto& c : curModifier) {
2798
616
                        c++;
2799
616
                    }
2800
1
                }
2801
4
            }
2802
7
        }
2803
2804
10
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
10
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
10
        const auto& result = results.back();
2811
2812
10
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
10
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
10
        if ( options.disableTests == false ) {
2830
10
            tests::test(op, result.second);
2831
10
        }
2832
2833
10
        postprocess(module, op, result);
2834
10
    }
2835
2836
9
    if ( options.noCompare == false ) {
2837
3
        compare(operations, results, data, size);
2838
3
    }
2839
9
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
141
                    for (auto& c : curModifier) {
2798
141
                        c++;
2799
141
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
9
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
9
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
9
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
21
    do {
2725
21
        auto op = getOp(&parentDs, data, size);
2726
21
        auto module = getModule(parentDs);
2727
21
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
21
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
21
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
21
    } while ( parentDs.Get<bool>() == true );
2738
2739
9
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
9
#if 1
2745
9
    {
2746
9
        std::set<uint64_t> moduleIDs;
2747
9
        for (const auto& m : modules ) {
2748
8
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
8
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
8
            moduleIDs.insert(moduleID);
2756
8
        }
2757
2758
9
        std::set<uint64_t> operationModuleIDs;
2759
16
        for (const auto& op : operations) {
2760
16
            operationModuleIDs.insert(op.first->ID);
2761
16
        }
2762
2763
9
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
9
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
9
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
9
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
9
    }
2771
9
#endif
2772
2773
9
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
9
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
25
    for (size_t i = 0; i < operations.size(); i++) {
2781
16
        auto& operation = operations[i];
2782
2783
16
        auto& module = operation.first;
2784
16
        auto& op = operation.second;
2785
2786
16
        if ( i > 0 ) {
2787
8
            auto& prevModule = operations[i-1].first;
2788
8
            auto& prevOp = operations[i-1].second;
2789
2790
8
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
8
                auto& curModifier = op.modifier.GetVectorPtr();
2792
8
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
8
                } else {
2797
555
                    for (auto& c : curModifier) {
2798
555
                        c++;
2799
555
                    }
2800
8
                }
2801
8
            }
2802
8
        }
2803
2804
16
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
16
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
16
        const auto& result = results.back();
2811
2812
16
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
16
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
16
        if ( options.disableTests == false ) {
2830
16
            tests::test(op, result.second);
2831
16
        }
2832
2833
16
        postprocess(module, op, result);
2834
16
    }
2835
2836
9
    if ( options.noCompare == false ) {
2837
8
        compare(operations, results, data, size);
2838
8
    }
2839
9
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
133
                    for (auto& c : curModifier) {
2798
133
                        c++;
2799
133
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
7
    do {
2725
7
        auto op = getOp(&parentDs, data, size);
2726
7
        auto module = getModule(parentDs);
2727
7
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
7
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
7
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
7
    } while ( parentDs.Get<bool>() == true );
2738
2739
2
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2
#if 1
2745
2
    {
2746
2
        std::set<uint64_t> moduleIDs;
2747
2
        for (const auto& m : modules ) {
2748
2
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2
            moduleIDs.insert(moduleID);
2756
2
        }
2757
2758
2
        std::set<uint64_t> operationModuleIDs;
2759
7
        for (const auto& op : operations) {
2760
7
            operationModuleIDs.insert(op.first->ID);
2761
7
        }
2762
2763
2
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2
    }
2771
2
#endif
2772
2773
2
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
9
    for (size_t i = 0; i < operations.size(); i++) {
2781
7
        auto& operation = operations[i];
2782
2783
7
        auto& module = operation.first;
2784
7
        auto& op = operation.second;
2785
2786
7
        if ( i > 0 ) {
2787
5
            auto& prevModule = operations[i-1].first;
2788
5
            auto& prevOp = operations[i-1].second;
2789
2790
5
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
3
                auto& curModifier = op.modifier.GetVectorPtr();
2792
3
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
3
                } else {
2797
164
                    for (auto& c : curModifier) {
2798
164
                        c++;
2799
164
                    }
2800
3
                }
2801
3
            }
2802
5
        }
2803
2804
7
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
7
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
7
        const auto& result = results.back();
2811
2812
7
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
7
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
7
        if ( options.disableTests == false ) {
2830
7
            tests::test(op, result.second);
2831
7
        }
2832
2833
7
        postprocess(module, op, result);
2834
7
    }
2835
2836
2
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
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
160
                    for (auto& c : curModifier) {
2798
160
                        c++;
2799
160
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
168
                    for (auto& c : curModifier) {
2798
168
                        c++;
2799
168
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
18
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
18
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
18
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
32
    do {
2725
32
        auto op = getOp(&parentDs, data, size);
2726
32
        auto module = getModule(parentDs);
2727
32
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
32
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
32
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
32
    } while ( parentDs.Get<bool>() == true );
2738
2739
18
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
18
#if 1
2745
18
    {
2746
18
        std::set<uint64_t> moduleIDs;
2747
18
        for (const auto& m : modules ) {
2748
18
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
18
            moduleIDs.insert(moduleID);
2756
18
        }
2757
2758
18
        std::set<uint64_t> operationModuleIDs;
2759
32
        for (const auto& op : operations) {
2760
32
            operationModuleIDs.insert(op.first->ID);
2761
32
        }
2762
2763
18
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
18
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
18
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
18
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
18
    }
2771
18
#endif
2772
2773
18
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
18
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
50
    for (size_t i = 0; i < operations.size(); i++) {
2781
32
        auto& operation = operations[i];
2782
2783
32
        auto& module = operation.first;
2784
32
        auto& op = operation.second;
2785
2786
32
        if ( i > 0 ) {
2787
14
            auto& prevModule = operations[i-1].first;
2788
14
            auto& prevOp = operations[i-1].second;
2789
2790
14
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
6
                auto& curModifier = op.modifier.GetVectorPtr();
2792
6
                if ( curModifier.size() == 0 ) {
2793
1.53k
                    for (size_t j = 0; j < 512; j++) {
2794
1.53k
                        curModifier.push_back(1);
2795
1.53k
                    }
2796
3
                } else {
2797
1.12k
                    for (auto& c : curModifier) {
2798
1.12k
                        c++;
2799
1.12k
                    }
2800
3
                }
2801
6
            }
2802
14
        }
2803
2804
32
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
32
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
32
        const auto& result = results.back();
2811
2812
32
        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
32
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
32
        if ( options.disableTests == false ) {
2830
32
            tests::test(op, result.second);
2831
32
        }
2832
2833
32
        postprocess(module, op, result);
2834
32
    }
2835
2836
18
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
18
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
20
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
20
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
20
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
51
    do {
2725
51
        auto op = getOp(&parentDs, data, size);
2726
51
        auto module = getModule(parentDs);
2727
51
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
51
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
51
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
51
    } while ( parentDs.Get<bool>() == true );
2738
2739
20
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
20
#if 1
2745
20
    {
2746
20
        std::set<uint64_t> moduleIDs;
2747
20
        for (const auto& m : modules ) {
2748
20
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
20
            moduleIDs.insert(moduleID);
2756
20
        }
2757
2758
20
        std::set<uint64_t> operationModuleIDs;
2759
51
        for (const auto& op : operations) {
2760
51
            operationModuleIDs.insert(op.first->ID);
2761
51
        }
2762
2763
20
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
20
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
20
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
20
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
20
    }
2771
20
#endif
2772
2773
20
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
20
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
71
    for (size_t i = 0; i < operations.size(); i++) {
2781
51
        auto& operation = operations[i];
2782
2783
51
        auto& module = operation.first;
2784
51
        auto& op = operation.second;
2785
2786
51
        if ( i > 0 ) {
2787
31
            auto& prevModule = operations[i-1].first;
2788
31
            auto& prevOp = operations[i-1].second;
2789
2790
31
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
15
                auto& curModifier = op.modifier.GetVectorPtr();
2792
15
                if ( curModifier.size() == 0 ) {
2793
5.64k
                    for (size_t j = 0; j < 512; j++) {
2794
5.63k
                        curModifier.push_back(1);
2795
5.63k
                    }
2796
11
                } else {
2797
590
                    for (auto& c : curModifier) {
2798
590
                        c++;
2799
590
                    }
2800
4
                }
2801
15
            }
2802
31
        }
2803
2804
51
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
51
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
51
        const auto& result = results.back();
2811
2812
51
        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
51
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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
        if ( options.disableTests == false ) {
2830
51
            tests::test(op, result.second);
2831
51
        }
2832
2833
51
        postprocess(module, op, result);
2834
51
    }
2835
2836
20
    if ( options.noCompare == false ) {
2837
20
        compare(operations, results, data, size);
2838
20
    }
2839
20
}
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
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::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
1
    do {
2725
1
        auto op = getOp(&parentDs, data, size);
2726
1
        auto module = getModule(parentDs);
2727
1
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
1
    } 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
1
        for (const auto& op : operations) {
2760
1
            operationModuleIDs.insert(op.first->ID);
2761
1
        }
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
2
    for (size_t i = 0; i < operations.size(); i++) {
2781
1
        auto& operation = operations[i];
2782
2783
1
        auto& module = operation.first;
2784
1
        auto& op = operation.second;
2785
2786
1
        if ( i > 0 ) {
2787
0
            auto& prevModule = operations[i-1].first;
2788
0
            auto& prevOp = operations[i-1].second;
2789
2790
0
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
0
                auto& curModifier = op.modifier.GetVectorPtr();
2792
0
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
0
                } else {
2797
0
                    for (auto& c : curModifier) {
2798
0
                        c++;
2799
0
                    }
2800
0
                }
2801
0
            }
2802
0
        }
2803
2804
1
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1
        const auto& result = results.back();
2811
2812
1
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
1
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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
        if ( options.disableTests == false ) {
2830
1
            tests::test(op, result.second);
2831
1
        }
2832
2833
1
        postprocess(module, op, result);
2834
1
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
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
1
    do {
2725
1
        auto op = getOp(&parentDs, data, size);
2726
1
        auto module = getModule(parentDs);
2727
1
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
1
    } 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
0
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
0
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
0
            moduleIDs.insert(moduleID);
2756
0
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
1
        for (const auto& op : operations) {
2760
0
            operationModuleIDs.insert(op.first->ID);
2761
0
        }
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
1
    for (size_t i = 0; i < operations.size(); i++) {
2781
0
        auto& operation = operations[i];
2782
2783
0
        auto& module = operation.first;
2784
0
        auto& op = operation.second;
2785
2786
0
        if ( i > 0 ) {
2787
0
            auto& prevModule = operations[i-1].first;
2788
0
            auto& prevOp = operations[i-1].second;
2789
2790
0
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
0
                auto& curModifier = op.modifier.GetVectorPtr();
2792
0
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
0
                } else {
2797
0
                    for (auto& c : curModifier) {
2798
0
                        c++;
2799
0
                    }
2800
0
                }
2801
0
            }
2802
0
        }
2803
2804
0
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
0
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
0
        const auto& result = results.back();
2811
2812
0
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
0
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
0
        if ( options.disableTests == false ) {
2830
0
            tests::test(op, result.second);
2831
0
        }
2832
2833
0
        postprocess(module, op, result);
2834
0
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
0
        compare(operations, results, data, size);
2838
0
    }
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
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
152
                    for (auto& c : curModifier) {
2798
152
                        c++;
2799
152
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
3
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3
        const auto& result = results.back();
2811
2812
3
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
3
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
3
        if ( options.disableTests == false ) {
2830
3
            tests::test(op, result.second);
2831
3
        }
2832
2833
3
        postprocess(module, op, result);
2834
3
    }
2835
2836
2
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
34
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
34
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
34
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
62
    do {
2725
62
        auto op = getOp(&parentDs, data, size);
2726
62
        auto module = getModule(parentDs);
2727
62
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
62
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
62
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
62
    } while ( parentDs.Get<bool>() == true );
2738
2739
34
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
34
#if 1
2745
34
    {
2746
34
        std::set<uint64_t> moduleIDs;
2747
34
        for (const auto& m : modules ) {
2748
33
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
33
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
33
            moduleIDs.insert(moduleID);
2756
33
        }
2757
2758
34
        std::set<uint64_t> operationModuleIDs;
2759
60
        for (const auto& op : operations) {
2760
60
            operationModuleIDs.insert(op.first->ID);
2761
60
        }
2762
2763
34
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
34
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
34
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
34
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
34
    }
2771
34
#endif
2772
2773
34
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
34
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
94
    for (size_t i = 0; i < operations.size(); i++) {
2781
60
        auto& operation = operations[i];
2782
2783
60
        auto& module = operation.first;
2784
60
        auto& op = operation.second;
2785
2786
60
        if ( i > 0 ) {
2787
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
16
                auto& curModifier = op.modifier.GetVectorPtr();
2792
16
                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
1.21k
                    for (auto& c : curModifier) {
2798
1.21k
                        c++;
2799
1.21k
                    }
2800
1
                }
2801
16
            }
2802
27
        }
2803
2804
60
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
60
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
60
        const auto& result = results.back();
2811
2812
60
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
60
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
60
        if ( options.disableTests == false ) {
2830
60
            tests::test(op, result.second);
2831
60
        }
2832
2833
60
        postprocess(module, op, result);
2834
60
    }
2835
2836
34
    if ( options.noCompare == false ) {
2837
33
        compare(operations, results, data, size);
2838
33
    }
2839
34
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
26
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
26
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
26
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
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
0
            break;
2736
0
        }
2737
48
    } 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
48
        for (const auto& op : operations) {
2760
48
            operationModuleIDs.insert(op.first->ID);
2761
48
        }
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
74
    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
22
            auto& prevModule = operations[i-1].first;
2788
22
            auto& prevOp = operations[i-1].second;
2789
2790
22
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
11
                auto& curModifier = op.modifier.GetVectorPtr();
2792
11
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
6
                } else {
2797
6.90k
                    for (auto& c : curModifier) {
2798
6.90k
                        c++;
2799
6.90k
                    }
2800
5
                }
2801
11
            }
2802
22
        }
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
26
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
26
}
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
47
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
47
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
47
            moduleIDs.insert(moduleID);
2756
47
        }
2757
2758
47
        std::set<uint64_t> operationModuleIDs;
2759
87
        for (const auto& op : operations) {
2760
87
            operationModuleIDs.insert(op.first->ID);
2761
87
        }
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
134
    for (size_t i = 0; i < operations.size(); i++) {
2781
87
        auto& operation = operations[i];
2782
2783
87
        auto& module = operation.first;
2784
87
        auto& op = operation.second;
2785
2786
87
        if ( i > 0 ) {
2787
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
20
                auto& curModifier = op.modifier.GetVectorPtr();
2792
20
                if ( curModifier.size() == 0 ) {
2793
7.18k
                    for (size_t j = 0; j < 512; j++) {
2794
7.16k
                        curModifier.push_back(1);
2795
7.16k
                    }
2796
14
                } else {
2797
1.06k
                    for (auto& c : curModifier) {
2798
1.06k
                        c++;
2799
1.06k
                    }
2800
6
                }
2801
20
            }
2802
40
        }
2803
2804
87
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
87
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
87
        const auto& result = results.back();
2811
2812
87
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
87
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
87
        if ( options.disableTests == false ) {
2830
87
            tests::test(op, result.second);
2831
87
        }
2832
2833
87
        postprocess(module, op, result);
2834
87
    }
2835
2836
47
    if ( options.noCompare == false ) {
2837
47
        compare(operations, results, data, size);
2838
47
    }
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
24
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
24
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
24
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
37
    do {
2725
37
        auto op = getOp(&parentDs, data, size);
2726
37
        auto module = getModule(parentDs);
2727
37
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
37
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
37
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
37
    } while ( parentDs.Get<bool>() == true );
2738
2739
24
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
24
#if 1
2745
24
    {
2746
24
        std::set<uint64_t> moduleIDs;
2747
24
        for (const auto& m : modules ) {
2748
24
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
24
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
24
            moduleIDs.insert(moduleID);
2756
24
        }
2757
2758
24
        std::set<uint64_t> operationModuleIDs;
2759
37
        for (const auto& op : operations) {
2760
37
            operationModuleIDs.insert(op.first->ID);
2761
37
        }
2762
2763
24
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
24
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
24
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
24
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
24
    }
2771
24
#endif
2772
2773
24
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
24
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
61
    for (size_t i = 0; i < operations.size(); i++) {
2781
37
        auto& operation = operations[i];
2782
2783
37
        auto& module = operation.first;
2784
37
        auto& op = operation.second;
2785
2786
37
        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
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
901
                    for (auto& c : curModifier) {
2798
901
                        c++;
2799
901
                    }
2800
4
                }
2801
4
            }
2802
13
        }
2803
2804
37
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
37
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
37
        const auto& result = results.back();
2811
2812
37
        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
37
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
37
        if ( options.disableTests == false ) {
2830
37
            tests::test(op, result.second);
2831
37
        }
2832
2833
37
        postprocess(module, op, result);
2834
37
    }
2835
2836
24
    if ( options.noCompare == false ) {
2837
24
        compare(operations, results, data, size);
2838
24
    }
2839
24
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
70
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
70
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
70
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
144
    do {
2725
144
        auto op = getOp(&parentDs, data, size);
2726
144
        auto module = getModule(parentDs);
2727
144
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
144
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
144
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
144
    } while ( parentDs.Get<bool>() == true );
2738
2739
70
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
70
#if 1
2745
70
    {
2746
70
        std::set<uint64_t> moduleIDs;
2747
70
        for (const auto& m : modules ) {
2748
70
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
70
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
70
            moduleIDs.insert(moduleID);
2756
70
        }
2757
2758
70
        std::set<uint64_t> operationModuleIDs;
2759
144
        for (const auto& op : operations) {
2760
144
            operationModuleIDs.insert(op.first->ID);
2761
144
        }
2762
2763
70
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
70
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
70
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
70
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
70
    }
2771
70
#endif
2772
2773
70
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
70
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
214
    for (size_t i = 0; i < operations.size(); i++) {
2781
144
        auto& operation = operations[i];
2782
2783
144
        auto& module = operation.first;
2784
144
        auto& op = operation.second;
2785
2786
144
        if ( i > 0 ) {
2787
74
            auto& prevModule = operations[i-1].first;
2788
74
            auto& prevOp = operations[i-1].second;
2789
2790
74
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
39
                auto& curModifier = op.modifier.GetVectorPtr();
2792
39
                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
612
                    for (auto& c : curModifier) {
2798
612
                        c++;
2799
612
                    }
2800
11
                }
2801
39
            }
2802
74
        }
2803
2804
144
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
144
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
144
        const auto& result = results.back();
2811
2812
144
        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
144
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
144
        if ( options.disableTests == false ) {
2830
144
            tests::test(op, result.second);
2831
144
        }
2832
2833
144
        postprocess(module, op, result);
2834
144
    }
2835
2836
70
    if ( options.noCompare == false ) {
2837
70
        compare(operations, results, data, size);
2838
70
    }
2839
70
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
44
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
44
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
44
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
78
    do {
2725
78
        auto op = getOp(&parentDs, data, size);
2726
78
        auto module = getModule(parentDs);
2727
78
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
78
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
78
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
78
    } while ( parentDs.Get<bool>() == true );
2738
2739
44
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
44
#if 1
2745
44
    {
2746
44
        std::set<uint64_t> moduleIDs;
2747
44
        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
44
        std::set<uint64_t> operationModuleIDs;
2759
78
        for (const auto& op : operations) {
2760
78
            operationModuleIDs.insert(op.first->ID);
2761
78
        }
2762
2763
44
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
44
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
44
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
44
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
44
    }
2771
44
#endif
2772
2773
44
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
44
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
122
    for (size_t i = 0; i < operations.size(); i++) {
2781
78
        auto& operation = operations[i];
2782
2783
78
        auto& module = operation.first;
2784
78
        auto& op = operation.second;
2785
2786
78
        if ( i > 0 ) {
2787
34
            auto& prevModule = operations[i-1].first;
2788
34
            auto& prevOp = operations[i-1].second;
2789
2790
34
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
16
                auto& curModifier = op.modifier.GetVectorPtr();
2792
16
                if ( curModifier.size() == 0 ) {
2793
5.13k
                    for (size_t j = 0; j < 512; j++) {
2794
5.12k
                        curModifier.push_back(1);
2795
5.12k
                    }
2796
10
                } else {
2797
1.37k
                    for (auto& c : curModifier) {
2798
1.37k
                        c++;
2799
1.37k
                    }
2800
6
                }
2801
16
            }
2802
34
        }
2803
2804
78
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
78
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
78
        const auto& result = results.back();
2811
2812
78
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
78
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
78
        if ( options.disableTests == false ) {
2830
78
            tests::test(op, result.second);
2831
78
        }
2832
2833
78
        postprocess(module, op, result);
2834
78
    }
2835
2836
44
    if ( options.noCompare == false ) {
2837
44
        compare(operations, results, data, size);
2838
44
    }
2839
44
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
70
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
70
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
70
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
138
    do {
2725
138
        auto op = getOp(&parentDs, data, size);
2726
138
        auto module = getModule(parentDs);
2727
138
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
138
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
138
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
138
    } while ( parentDs.Get<bool>() == true );
2738
2739
70
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
70
#if 1
2745
70
    {
2746
70
        std::set<uint64_t> moduleIDs;
2747
70
        for (const auto& m : modules ) {
2748
69
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
69
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
69
            moduleIDs.insert(moduleID);
2756
69
        }
2757
2758
70
        std::set<uint64_t> operationModuleIDs;
2759
134
        for (const auto& op : operations) {
2760
134
            operationModuleIDs.insert(op.first->ID);
2761
134
        }
2762
2763
70
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
70
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
70
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
70
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
70
    }
2771
70
#endif
2772
2773
70
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
70
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
204
    for (size_t i = 0; i < operations.size(); i++) {
2781
134
        auto& operation = operations[i];
2782
2783
134
        auto& module = operation.first;
2784
134
        auto& op = operation.second;
2785
2786
134
        if ( i > 0 ) {
2787
65
            auto& prevModule = operations[i-1].first;
2788
65
            auto& prevOp = operations[i-1].second;
2789
2790
65
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
30
                auto& curModifier = op.modifier.GetVectorPtr();
2792
30
                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
6.14k
                    for (auto& c : curModifier) {
2798
6.14k
                        c++;
2799
6.14k
                    }
2800
15
                }
2801
30
            }
2802
65
        }
2803
2804
134
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
134
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
134
        const auto& result = results.back();
2811
2812
134
        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
134
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
134
        if ( options.disableTests == false ) {
2830
134
            tests::test(op, result.second);
2831
134
        }
2832
2833
134
        postprocess(module, op, result);
2834
134
    }
2835
2836
70
    if ( options.noCompare == false ) {
2837
69
        compare(operations, results, data, size);
2838
69
    }
2839
70
}
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
77
    do {
2725
77
        auto op = getOp(&parentDs, data, size);
2726
77
        auto module = getModule(parentDs);
2727
77
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
77
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
77
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
77
    } 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
45
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
45
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
45
            moduleIDs.insert(moduleID);
2756
45
        }
2757
2758
45
        std::set<uint64_t> operationModuleIDs;
2759
77
        for (const auto& op : operations) {
2760
77
            operationModuleIDs.insert(op.first->ID);
2761
77
        }
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
122
    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
32
            auto& prevModule = operations[i-1].first;
2788
32
            auto& prevOp = operations[i-1].second;
2789
2790
32
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
12
                auto& curModifier = op.modifier.GetVectorPtr();
2792
12
                if ( curModifier.size() == 0 ) {
2793
3.59k
                    for (size_t j = 0; j < 512; j++) {
2794
3.58k
                        curModifier.push_back(1);
2795
3.58k
                    }
2796
7
                } else {
2797
3.98k
                    for (auto& c : curModifier) {
2798
3.98k
                        c++;
2799
3.98k
                    }
2800
5
                }
2801
12
            }
2802
32
        }
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
45
    if ( options.noCompare == false ) {
2837
45
        compare(operations, results, data, size);
2838
45
    }
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
36
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
36
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
36
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
84
    do {
2725
84
        auto op = getOp(&parentDs, data, size);
2726
84
        auto module = getModule(parentDs);
2727
84
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
84
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
84
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
84
    } while ( parentDs.Get<bool>() == true );
2738
2739
36
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
36
#if 1
2745
36
    {
2746
36
        std::set<uint64_t> moduleIDs;
2747
36
        for (const auto& m : modules ) {
2748
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
36
        std::set<uint64_t> operationModuleIDs;
2759
58
        for (const auto& op : operations) {
2760
58
            operationModuleIDs.insert(op.first->ID);
2761
58
        }
2762
2763
36
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
36
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
36
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
36
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
36
    }
2771
36
#endif
2772
2773
36
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
36
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
94
    for (size_t i = 0; i < operations.size(); i++) {
2781
58
        auto& operation = operations[i];
2782
2783
58
        auto& module = operation.first;
2784
58
        auto& op = operation.second;
2785
2786
58
        if ( i > 0 ) {
2787
31
            auto& prevModule = operations[i-1].first;
2788
31
            auto& prevOp = operations[i-1].second;
2789
2790
31
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
15
                auto& curModifier = op.modifier.GetVectorPtr();
2792
15
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
9
                } else {
2797
3.84k
                    for (auto& c : curModifier) {
2798
3.84k
                        c++;
2799
3.84k
                    }
2800
9
                }
2801
15
            }
2802
31
        }
2803
2804
58
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
58
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
58
        const auto& result = results.back();
2811
2812
58
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
58
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
58
        if ( options.disableTests == false ) {
2830
58
            tests::test(op, result.second);
2831
58
        }
2832
2833
58
        postprocess(module, op, result);
2834
58
    }
2835
2836
36
    if ( options.noCompare == false ) {
2837
27
        compare(operations, results, data, size);
2838
27
    }
2839
36
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
6
    do {
2725
6
        auto op = getOp(&parentDs, data, size);
2726
6
        auto module = getModule(parentDs);
2727
6
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
6
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
6
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
6
    } while ( parentDs.Get<bool>() == true );
2738
2739
3
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3
#if 1
2745
3
    {
2746
3
        std::set<uint64_t> moduleIDs;
2747
3
        for (const auto& m : modules ) {
2748
3
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3
            moduleIDs.insert(moduleID);
2756
3
        }
2757
2758
3
        std::set<uint64_t> operationModuleIDs;
2759
6
        for (const auto& op : operations) {
2760
6
            operationModuleIDs.insert(op.first->ID);
2761
6
        }
2762
2763
3
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3
    }
2771
3
#endif
2772
2773
3
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
9
    for (size_t i = 0; i < operations.size(); i++) {
2781
6
        auto& operation = operations[i];
2782
2783
6
        auto& module = operation.first;
2784
6
        auto& op = operation.second;
2785
2786
6
        if ( i > 0 ) {
2787
3
            auto& prevModule = operations[i-1].first;
2788
3
            auto& prevOp = operations[i-1].second;
2789
2790
3
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
3
                auto& curModifier = op.modifier.GetVectorPtr();
2792
3
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
3
                } else {
2797
400
                    for (auto& c : curModifier) {
2798
400
                        c++;
2799
400
                    }
2800
3
                }
2801
3
            }
2802
3
        }
2803
2804
6
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
6
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
6
        const auto& result = results.back();
2811
2812
6
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
6
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
6
        if ( options.disableTests == false ) {
2830
6
            tests::test(op, result.second);
2831
6
        }
2832
2833
6
        postprocess(module, op, result);
2834
6
    }
2835
2836
3
    if ( options.noCompare == false ) {
2837
3
        compare(operations, results, data, size);
2838
3
    }
2839
3
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
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
4
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4
#if 1
2745
4
    {
2746
4
        std::set<uint64_t> moduleIDs;
2747
4
        for (const auto& m : modules ) {
2748
3
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3
            moduleIDs.insert(moduleID);
2756
3
        }
2757
2758
4
        std::set<uint64_t> operationModuleIDs;
2759
5
        for (const auto& op : operations) {
2760
5
            operationModuleIDs.insert(op.first->ID);
2761
5
        }
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
9
    for (size_t i = 0; i < operations.size(); i++) {
2781
5
        auto& operation = operations[i];
2782
2783
5
        auto& module = operation.first;
2784
5
        auto& op = operation.second;
2785
2786
5
        if ( i > 0 ) {
2787
2
            auto& prevModule = operations[i-1].first;
2788
2
            auto& prevOp = operations[i-1].second;
2789
2790
2
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
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
156
                    for (auto& c : curModifier) {
2798
156
                        c++;
2799
156
                    }
2800
2
                }
2801
2
            }
2802
2
        }
2803
2804
5
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5
        const auto& result = results.back();
2811
2812
5
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
5
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
5
        if ( options.disableTests == false ) {
2830
5
            tests::test(op, result.second);
2831
5
        }
2832
2833
5
        postprocess(module, op, result);
2834
5
    }
2835
2836
4
    if ( options.noCompare == false ) {
2837
3
        compare(operations, results, data, size);
2838
3
    }
2839
4
}
2840
2841
/* Explicit template instantiation */
2842
template class ExecutorBase<component::Digest, operation::Digest>;
2843
template class ExecutorBase<component::MAC, operation::HMAC>;
2844
template class ExecutorBase<component::MAC, operation::UMAC>;
2845
template class ExecutorBase<component::MAC, operation::CMAC>;
2846
template class ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>;
2847
template class ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>;
2848
template class ExecutorBase<component::Key, operation::KDF_SCRYPT>;
2849
template class ExecutorBase<component::Key, operation::KDF_HKDF>;
2850
template class ExecutorBase<component::Key, operation::KDF_TLS1_PRF>;
2851
template class ExecutorBase<component::Key, operation::KDF_PBKDF>;
2852
template class ExecutorBase<component::Key, operation::KDF_PBKDF1>;
2853
template class ExecutorBase<component::Key, operation::KDF_PBKDF2>;
2854
template class ExecutorBase<component::Key, operation::KDF_ARGON2>;
2855
template class ExecutorBase<component::Key, operation::KDF_SSH>;
2856
template class ExecutorBase<component::Key, operation::KDF_X963>;
2857
template class ExecutorBase<component::Key, operation::KDF_BCRYPT>;
2858
template class ExecutorBase<component::Key, operation::KDF_SP_800_108>;
2859
template class ExecutorBase<component::Key3, operation::KDF_SRTP>;
2860
template class ExecutorBase<component::Key3, operation::KDF_SRTCP>;
2861
template class ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>;
2862
template class ExecutorBase<bool, operation::ECC_ValidatePubkey>;
2863
template class ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>;
2864
template class ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>;
2865
template class ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>;
2866
template class ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>;
2867
template class ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>;
2868
template class ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>;
2869
template class ExecutorBase<bool, operation::ECCSI_Verify>;
2870
template class ExecutorBase<bool, operation::ECDSA_Verify>;
2871
template class ExecutorBase<bool, operation::ECGDSA_Verify>;
2872
template class ExecutorBase<bool, operation::ECRDSA_Verify>;
2873
template class ExecutorBase<bool, operation::Schnorr_Verify>;
2874
template class ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>;
2875
template class ExecutorBase<bool, operation::DSA_Verify>;
2876
template class ExecutorBase<component::DSA_Signature, operation::DSA_Sign>;
2877
template class ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>;
2878
template class ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>;
2879
template class ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>;
2880
template class ExecutorBase<component::Secret, operation::ECDH_Derive>;
2881
template class ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>;
2882
template class ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>;
2883
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>;
2884
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>;
2885
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>;
2886
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>;
2887
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>;
2888
template class ExecutorBase<bool, operation::ECC_Point_Cmp>;
2889
template class ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>;
2890
template class ExecutorBase<component::Bignum, operation::DH_Derive>;
2891
template class ExecutorBase<component::Bignum, operation::BignumCalc>;
2892
template class ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>;
2893
template class ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>;
2894
template class ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>;
2895
template class ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>;
2896
template class ExecutorBase<component::BLS_Signature, operation::BLS_Sign>;
2897
template class ExecutorBase<bool, operation::BLS_Verify>;
2898
template class ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>;
2899
template class ExecutorBase<bool, operation::BLS_BatchVerify>;
2900
template class ExecutorBase<component::G1, operation::BLS_Aggregate_G1>;
2901
template class ExecutorBase<component::G2, operation::BLS_Aggregate_G2>;
2902
template class ExecutorBase<component::Fp12, operation::BLS_Pairing>;
2903
template class ExecutorBase<component::Fp12, operation::BLS_MillerLoop>;
2904
template class ExecutorBase<component::Fp12, operation::BLS_FinalExp>;
2905
template class ExecutorBase<component::G1, operation::BLS_HashToG1>;
2906
template class ExecutorBase<component::G2, operation::BLS_HashToG2>;
2907
template class ExecutorBase<component::G1, operation::BLS_MapToG1>;
2908
template class ExecutorBase<component::G2, operation::BLS_MapToG2>;
2909
template class ExecutorBase<bool, operation::BLS_IsG1OnCurve>;
2910
template class ExecutorBase<bool, operation::BLS_IsG2OnCurve>;
2911
template class ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>;
2912
template class ExecutorBase<component::G1, operation::BLS_Decompress_G1>;
2913
template class ExecutorBase<component::Bignum, operation::BLS_Compress_G1>;
2914
template class ExecutorBase<component::G2, operation::BLS_Decompress_G2>;
2915
template class ExecutorBase<component::G1, operation::BLS_Compress_G2>;
2916
template class ExecutorBase<component::G1, operation::BLS_G1_Add>;
2917
template class ExecutorBase<component::G1, operation::BLS_G1_Mul>;
2918
template class ExecutorBase<bool, operation::BLS_G1_IsEq>;
2919
template class ExecutorBase<component::G1, operation::BLS_G1_Neg>;
2920
template class ExecutorBase<component::G2, operation::BLS_G2_Add>;
2921
template class ExecutorBase<component::G2, operation::BLS_G2_Mul>;
2922
template class ExecutorBase<bool, operation::BLS_G2_IsEq>;
2923
template class ExecutorBase<component::G2, operation::BLS_G2_Neg>;
2924
template class ExecutorBase<component::G1, operation::BLS_G1_MultiExp>;
2925
template class ExecutorBase<Buffer, operation::Misc>;
2926
template class ExecutorBase<bool, operation::SR25519_Verify>;
2927
2928
} /* namespace cryptofuzz */