Coverage Report

Created: 2024-06-28 06:39

/src/cryptofuzz/executor.cpp
Line
Count
Source (jump to first uncovered line)
1
#include "executor.h"
2
#include "tests.h"
3
#include "mutatorpool.h"
4
#include "config.h"
5
#include <cryptofuzz/util.h>
6
#include <fuzzing/memory.hpp>
7
#include <algorithm>
8
#include <set>
9
#include <boost/multiprecision/cpp_int.hpp>
10
11
uint32_t PRNG(void);
12
13
76.5k
#define RETURN_IF_DISABLED(option, id) if ( !option.Have(id) ) return std::nullopt;
14
15
namespace cryptofuzz {
16
17
0
static std::string GxCoordMutate(const uint64_t curveID, std::string coord) {
18
0
    if ( (PRNG()%10) != 0 ) {
19
0
        return coord;
20
0
    }
21
22
0
    if ( curveID == CF_ECC_CURVE("BLS12_381") ) {
23
0
        const static auto prime = boost::multiprecision::cpp_int("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787");
24
0
        return boost::multiprecision::cpp_int(boost::multiprecision::cpp_int(coord) + prime).str();
25
0
    } else if ( curveID == CF_ECC_CURVE("alt_bn128") ) {
26
0
        const static auto prime = boost::multiprecision::cpp_int("21888242871839275222246405745257275088696311157297823662689037894645226208583");
27
0
        return boost::multiprecision::cpp_int(boost::multiprecision::cpp_int(coord) + prime).str();
28
0
    } else {
29
0
        return coord;
30
0
    }
31
0
}
32
0
static void G1AddToPool(const uint64_t curveID, const std::string& g1_x, const std::string& g1_y) {
33
0
    Pool_CurveBLSG1.Set({ curveID, GxCoordMutate(curveID, g1_x), GxCoordMutate(curveID, g1_y) });
34
0
}
35
36
static void G2AddToPool(const uint64_t curveID,
37
                        const std::string& g2_v,
38
                        const std::string& g2_w,
39
                        const std::string& g2_x,
40
0
                        const std::string& g2_y) {
41
42
0
    Pool_CurveBLSG2.Set({ curveID,
43
0
                                    GxCoordMutate(curveID, g2_v),
44
0
                                    GxCoordMutate(curveID, g2_w),
45
0
                                    GxCoordMutate(curveID, g2_x),
46
0
                                    GxCoordMutate(curveID, g2_y)
47
0
    });
48
0
}
49
50
/* Specialization for operation::Digest */
51
4.95k
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
4.95k
    (void)module;
53
4.95k
    (void)op;
54
55
4.95k
    if ( result.second != std::nullopt ) {
56
2.17k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
2.17k
    }
58
4.95k
}
59
60
4.95k
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
4.95k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
4.95k
    return module->OpDigest(op);
64
4.95k
}
65
66
/* Specialization for operation::HMAC */
67
1.75k
template<> void ExecutorBase<component::MAC, operation::HMAC>::postprocess(std::shared_ptr<Module> module, operation::HMAC& op, const ExecutorBase<component::MAC, operation::HMAC>::ResultPair& result) const {
68
1.75k
    (void)module;
69
1.75k
    (void)op;
70
71
1.75k
    if ( result.second != std::nullopt ) {
72
1.16k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
1.16k
    }
74
1.75k
}
75
76
1.75k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
1.75k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
1.75k
    return module->OpHMAC(op);
80
1.75k
}
81
82
/* Specialization for operation::UMAC */
83
2.80k
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
2.80k
    (void)module;
85
2.80k
    (void)op;
86
87
2.80k
    if ( result.second != std::nullopt ) {
88
1.38k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
1.38k
    }
90
2.80k
}
91
92
2.80k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
2.80k
    return module->OpUMAC(op);
94
2.80k
}
95
96
/* Specialization for operation::CMAC */
97
3.00k
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
3.00k
    (void)module;
99
3.00k
    (void)op;
100
101
3.00k
    if ( result.second != std::nullopt ) {
102
1.29k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
1.29k
    }
104
3.00k
}
105
106
3.00k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
3.00k
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
3.00k
    return module->OpCMAC(op);
110
3.00k
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
14.1k
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
14.1k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
14.1k
    if ( result.second != std::nullopt ) {
119
4.52k
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
4.52k
        if ( result.second->tag != std::nullopt ) {
121
2.22k
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
2.22k
        }
123
4.52k
    }
124
125
14.1k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
4.14k
        using fuzzing::datasource::ID;
127
128
4.14k
        bool tryDecrypt = true;
129
130
4.14k
        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
4.14k
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
4.14k
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
4.14k
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
4.14k
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
4.14k
                    op.cleartext.GetSize() + 32,
171
172
4.14k
                    op.aad,
173
174
                    /* Empty modifier */
175
4.14k
                    {});
176
177
4.14k
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
4.14k
            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
4.14k
            } 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
4.14k
        }
208
4.14k
    }
209
14.1k
}
210
211
14.1k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
14.1k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
14.1k
    return module->OpSymmetricEncrypt(op);
215
14.1k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
9.11k
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
9.11k
    (void)module;
220
9.11k
    (void)op;
221
222
9.11k
    if ( result.second != std::nullopt ) {
223
626
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
626
    }
225
9.11k
}
226
227
9.11k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
9.11k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
9.11k
    return module->OpSymmetricDecrypt(op);
231
9.11k
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
773
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
773
    (void)module;
236
773
    (void)op;
237
238
773
    if ( result.second != std::nullopt ) {
239
268
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
268
    }
241
773
}
242
243
773
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
773
    return module->OpKDF_SCRYPT(op);
245
773
}
246
247
/* Specialization for operation::KDF_HKDF */
248
5.43k
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
5.43k
    (void)module;
250
5.43k
    (void)op;
251
252
5.43k
    if ( result.second != std::nullopt ) {
253
2.71k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
2.71k
    }
255
5.43k
}
256
257
5.43k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
5.43k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
5.43k
    return module->OpKDF_HKDF(op);
261
5.43k
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
425
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
425
    (void)module;
266
425
    (void)op;
267
268
425
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
425
}
272
273
425
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
425
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
425
    return module->OpKDF_PBKDF(op);
277
425
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
358
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
358
    (void)module;
282
358
    (void)op;
283
284
358
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
358
}
288
289
358
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
358
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
358
    return module->OpKDF_PBKDF1(op);
293
358
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
1.89k
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
1.89k
    (void)module;
298
1.89k
    (void)op;
299
300
1.89k
    if ( result.second != std::nullopt ) {
301
859
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
859
    }
303
1.89k
}
304
305
1.89k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
1.89k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
1.89k
    return module->OpKDF_PBKDF2(op);
309
1.89k
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
588
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
588
    (void)module;
314
588
    (void)op;
315
316
588
    if ( result.second != std::nullopt ) {
317
268
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
268
    }
319
588
}
320
321
588
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
588
    return module->OpKDF_ARGON2(op);
323
588
}
324
325
/* Specialization for operation::KDF_SSH */
326
292
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
292
    (void)module;
328
292
    (void)op;
329
330
292
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
292
}
334
335
292
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
292
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
292
    return module->OpKDF_SSH(op);
339
292
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
437
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
437
    (void)module;
344
437
    (void)op;
345
346
437
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
437
}
350
351
437
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
437
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
437
    return module->OpKDF_TLS1_PRF(op);
355
437
}
356
357
/* Specialization for operation::KDF_X963 */
358
427
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
427
    (void)module;
360
427
    (void)op;
361
362
427
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
427
}
366
367
427
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
427
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
427
    return module->OpKDF_X963(op);
371
427
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
110
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
110
    (void)module;
376
110
    (void)op;
377
378
110
    if ( result.second != std::nullopt ) {
379
35
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
35
    }
381
110
}
382
383
110
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
110
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
110
    return module->OpKDF_BCRYPT(op);
387
110
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
1.67k
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
1.67k
    (void)module;
392
1.67k
    (void)op;
393
394
1.67k
    if ( result.second != std::nullopt ) {
395
795
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
795
    }
397
1.67k
}
398
399
1.67k
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
1.67k
    if ( op.mech.mode == true ) {
401
990
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
990
    }
403
404
1.67k
    return module->OpKDF_SP_800_108(op);
405
1.67k
}
406
407
/* Specialization for operation::KDF_SRTP */
408
428
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
428
    (void)module;
410
428
    (void)op;
411
428
    (void)result;
412
428
}
413
414
428
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const {
415
428
    return module->OpKDF_SRTP(op);
416
428
}
417
418
/* Specialization for operation::KDF_SRTCP */
419
374
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
374
    (void)module;
421
374
    (void)op;
422
374
    (void)result;
423
374
}
424
425
374
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const {
426
374
    return module->OpKDF_SRTCP(op);
427
374
}
428
429
/* Specialization for operation::ECC_PrivateToPublic */
430
1.55k
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
1.55k
    (void)module;
432
433
1.55k
    if ( result.second != std::nullopt  ) {
434
391
        const auto curveID = op.curveType.Get();
435
391
        const auto privkey = op.priv.ToTrimmedString();
436
391
        const auto pub_x = result.second->first.ToTrimmedString();
437
391
        const auto pub_y = result.second->second.ToTrimmedString();
438
439
391
        Pool_CurvePrivkey.Set({ curveID, privkey });
440
391
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
441
391
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
442
443
391
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
444
391
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
445
391
    }
446
1.55k
}
447
448
1.55k
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
1.55k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
450
451
1.55k
    const size_t size = op.priv.ToTrimmedString().size();
452
453
1.55k
    if ( size == 0 || size > 4096 ) {
454
0
        return std::nullopt;
455
0
    }
456
457
1.55k
    return module->OpECC_PrivateToPublic(op);
458
1.55k
}
459
460
/* Specialization for operation::ECC_ValidatePubkey */
461
747
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
747
    (void)module;
463
747
    (void)op;
464
747
    (void)result;
465
747
}
466
467
747
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
468
747
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
469
470
747
    return module->OpECC_ValidatePubkey(op);
471
747
}
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
40
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
40
    (void)operations;
479
40
    (void)results;
480
40
    (void)data;
481
40
    (void)size;
482
40
}
483
484
1.18k
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
1.18k
    (void)module;
486
487
1.18k
    if ( result.second != std::nullopt  ) {
488
325
        const auto curveID = op.curveType.Get();
489
325
        const auto privkey = result.second->priv.ToTrimmedString();
490
325
        const auto pub_x = result.second->pub.first.ToTrimmedString();
491
325
        const auto pub_y = result.second->pub.second.ToTrimmedString();
492
493
325
        Pool_CurvePrivkey.Set({ curveID, privkey });
494
325
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
495
325
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
496
497
325
        {
498
325
            auto opValidate = operation::ECC_ValidatePubkey(
499
325
                    op.curveType,
500
325
                    result.second->pub,
501
325
                    op.modifier);
502
503
325
            const auto validateResult = module->OpECC_ValidatePubkey(opValidate);
504
325
            CF_ASSERT(
505
325
                    validateResult == std::nullopt ||
506
325
                    *validateResult == true,
507
325
                    "Cannot validate generated public key");
508
325
        }
509
325
    }
510
1.18k
}
511
512
1.18k
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
1.18k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
514
515
1.18k
    return module->OpECC_GenerateKeyPair(op);
516
1.18k
}
517
518
/* Specialization for operation::ECCSI_Sign */
519
139
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
139
    (void)module;
521
522
139
    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
139
}
565
566
139
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
139
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
568
139
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
569
570
139
    const size_t size = op.priv.ToTrimmedString().size();
571
572
139
    if ( size == 0 || size > 4096 ) {
573
2
        return std::nullopt;
574
2
    }
575
576
137
    return module->OpECCSI_Sign(op);
577
139
}
578
579
/* Specialization for operation::ECDSA_Sign */
580
1.38k
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
1.38k
    (void)module;
582
583
1.38k
    if ( result.second != std::nullopt  ) {
584
644
        const auto curveID = op.curveType.Get();
585
644
        const auto cleartext = op.cleartext.ToHex();
586
644
        const auto pub_x = result.second->pub.first.ToTrimmedString();
587
644
        const auto pub_y = result.second->pub.second.ToTrimmedString();
588
644
        const auto sig_r = result.second->signature.first.ToTrimmedString();
589
644
        const auto sig_s = result.second->signature.second.ToTrimmedString();
590
591
644
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
592
644
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
593
644
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
594
595
644
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
596
644
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
597
644
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
598
644
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
599
600
644
        {
601
644
            auto opVerify = operation::ECDSA_Verify(
602
644
                    op,
603
644
                    *(result.second),
604
644
                    op.modifier);
605
606
644
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
607
644
            CF_ASSERT(
608
644
                    verifyResult == std::nullopt ||
609
644
                    *verifyResult == true,
610
644
                    "Cannot verify generated signature");
611
644
        }
612
644
    }
613
1.38k
}
614
615
1.38k
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
1.38k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
617
1.38k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
618
619
1.38k
    const size_t size = op.priv.ToTrimmedString().size();
620
621
1.38k
    if ( size == 0 || size > 4096 ) {
622
2
        return std::nullopt;
623
2
    }
624
625
1.38k
    return module->OpECDSA_Sign(op);
626
1.38k
}
627
628
/* Specialization for operation::ECGDSA_Sign */
629
210
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
210
    (void)module;
631
632
210
    if ( result.second != std::nullopt  ) {
633
14
        const auto curveID = op.curveType.Get();
634
14
        const auto cleartext = op.cleartext.ToHex();
635
14
        const auto pub_x = result.second->pub.first.ToTrimmedString();
636
14
        const auto pub_y = result.second->pub.second.ToTrimmedString();
637
14
        const auto sig_r = result.second->signature.first.ToTrimmedString();
638
14
        const auto sig_s = result.second->signature.second.ToTrimmedString();
639
640
14
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
641
14
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
642
14
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
643
644
14
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
645
14
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
646
14
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
647
14
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
648
14
    }
649
210
}
650
651
210
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
210
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
653
210
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
654
655
210
    const size_t size = op.priv.ToTrimmedString().size();
656
657
210
    if ( size == 0 || size > 4096 ) {
658
0
        return std::nullopt;
659
0
    }
660
661
210
    return module->OpECGDSA_Sign(op);
662
210
}
663
664
/* Specialization for operation::ECRDSA_Sign */
665
136
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
136
    (void)module;
667
668
136
    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
136
}
686
687
136
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
136
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
689
136
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
690
691
136
    const size_t size = op.priv.ToTrimmedString().size();
692
693
136
    if ( size == 0 || size > 4096 ) {
694
0
        return std::nullopt;
695
0
    }
696
697
136
    return module->OpECRDSA_Sign(op);
698
136
}
699
700
/* Specialization for operation::Schnorr_Sign */
701
133
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
133
    (void)module;
703
704
133
    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
133
}
722
723
133
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
133
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
133
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
726
727
133
    const size_t size = op.priv.ToTrimmedString().size();
728
729
133
    if ( size == 0 || size > 4096 ) {
730
0
        return std::nullopt;
731
0
    }
732
733
133
    return module->OpSchnorr_Sign(op);
734
133
}
735
736
/* Specialization for operation::ECCSI_Verify */
737
101
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
101
    (void)module;
739
101
    (void)op;
740
101
    (void)result;
741
101
}
742
743
101
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
744
101
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
745
101
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
746
747
101
    return module->OpECCSI_Verify(op);
748
101
}
749
750
/* Specialization for operation::ECDSA_Verify */
751
823
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
823
    (void)module;
753
823
    (void)op;
754
823
    (void)result;
755
823
}
756
757
823
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
758
823
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
759
823
    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
823
    return module->OpECDSA_Verify(op);
772
823
}
773
774
/* Specialization for operation::ECGDSA_Verify */
775
413
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
413
    (void)module;
777
413
    (void)op;
778
413
    (void)result;
779
413
}
780
781
413
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
782
413
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
783
413
    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
413
    return module->OpECGDSA_Verify(op);
796
413
}
797
798
/* Specialization for operation::ECRDSA_Verify */
799
141
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
141
    (void)module;
801
141
    (void)op;
802
141
    (void)result;
803
141
}
804
805
141
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
806
141
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
807
141
    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
141
    return module->OpECRDSA_Verify(op);
820
141
}
821
822
/* Specialization for operation::Schnorr_Verify */
823
143
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
143
    (void)module;
825
143
    (void)op;
826
143
    (void)result;
827
143
}
828
829
143
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
830
143
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
831
143
    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
143
    return module->OpSchnorr_Verify(op);
844
143
}
845
846
1.15k
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
1.15k
    (void)module;
848
1.15k
    (void)op;
849
1.15k
    (void)result;
850
1.15k
}
851
852
1.15k
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
1.15k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
854
1.15k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
855
856
1.15k
    return module->OpECDSA_Recover(op);
857
1.15k
}
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
583
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
583
    (void)module;
869
583
    (void)op;
870
583
    (void)result;
871
583
}
872
873
583
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
874
583
    const std::vector<size_t> sizes = {
875
583
        op.parameters.p.ToTrimmedString().size(),
876
583
        op.parameters.q.ToTrimmedString().size(),
877
583
        op.parameters.g.ToTrimmedString().size(),
878
583
        op.pub.ToTrimmedString().size(),
879
583
        op.signature.first.ToTrimmedString().size(),
880
583
        op.signature.second.ToTrimmedString().size(),
881
583
    };
882
883
3.49k
    for (const auto& size : sizes) {
884
3.49k
        if ( size == 0 || size > 4096 ) {
885
0
            return std::nullopt;
886
0
        }
887
3.49k
    }
888
889
583
    return module->OpDSA_Verify(op);
890
583
}
891
892
/* Specialization for operation::DSA_Sign */
893
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
894
template <>
895
46
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
46
    (void)operations;
897
46
    (void)results;
898
46
    (void)data;
899
46
    (void)size;
900
46
}
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
169
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
169
    (void)module;
910
169
    (void)op;
911
169
    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
169
}
934
935
169
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
169
    const std::vector<size_t> sizes = {
937
169
        op.parameters.p.ToTrimmedString().size(),
938
169
        op.parameters.q.ToTrimmedString().size(),
939
169
        op.parameters.g.ToTrimmedString().size(),
940
169
        op.priv.ToTrimmedString().size(),
941
169
    };
942
943
676
    for (const auto& size : sizes) {
944
676
        if ( size == 0 || size > 4096 ) {
945
0
            return std::nullopt;
946
0
        }
947
676
    }
948
949
169
    return module->OpDSA_Sign(op);
950
169
}
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
123
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
123
    (void)result;
963
123
    (void)module;
964
123
    (void)op;
965
123
    if ( result.second != std::nullopt ) {
966
        //Pool_DSA_PubPriv.Set({pub, priv});
967
0
    }
968
123
}
969
970
123
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
971
123
    return module->OpDSA_PrivateToPublic(op);
972
123
}
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
41
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
41
    (void)operations;
980
41
    (void)results;
981
41
    (void)data;
982
41
    (void)size;
983
41
}
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
137
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
137
    (void)result;
994
137
    (void)module;
995
137
    (void)op;
996
137
    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
137
}
1003
1004
137
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
137
    const std::vector<size_t> sizes = {
1006
137
        op.p.ToTrimmedString().size(),
1007
137
        op.q.ToTrimmedString().size(),
1008
137
        op.g.ToTrimmedString().size(),
1009
137
    };
1010
1011
411
    for (const auto& size : sizes) {
1012
411
        if ( size == 0 || size > 4096 ) {
1013
0
            return std::nullopt;
1014
0
        }
1015
411
    }
1016
1017
137
    return module->OpDSA_GenerateKeyPair(op);
1018
137
}
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
37
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
37
    (void)operations;
1026
37
    (void)results;
1027
37
    (void)data;
1028
37
    (void)size;
1029
37
}
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
131
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
131
    (void)result;
1040
131
    (void)module;
1041
131
    (void)op;
1042
131
    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
131
}
1054
1055
131
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
131
    return module->OpDSA_GenerateParameters(op);
1057
131
}
1058
1059
/* Specialization for operation::ECDH_Derive */
1060
105
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
105
    (void)module;
1062
105
    (void)op;
1063
105
    (void)result;
1064
105
}
1065
1066
105
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1067
105
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1068
1069
105
    return module->OpECDH_Derive(op);
1070
105
}
1071
1072
/* Specialization for operation::ECIES_Encrypt */
1073
template <>
1074
38
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
38
    (void)operations;
1076
38
    (void)results;
1077
38
    (void)data;
1078
38
    (void)size;
1079
38
}
1080
129
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
129
    (void)module;
1082
129
    (void)op;
1083
129
    (void)result;
1084
129
}
1085
1086
129
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1087
129
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1088
1089
129
    return module->OpECIES_Encrypt(op);
1090
129
}
1091
1092
/* Specialization for operation::ECIES_Decrypt */
1093
137
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
137
    (void)module;
1095
137
    (void)op;
1096
137
    (void)result;
1097
137
}
1098
1099
137
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1100
137
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1101
1102
137
    return module->OpECIES_Decrypt(op);
1103
137
}
1104
1105
/* Specialization for operation::ECC_Point_Add */
1106
254
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
254
    (void)module;
1108
1109
254
    if ( result.second != std::nullopt  ) {
1110
28
        const auto curveID = op.curveType.Get();
1111
28
        const auto x = result.second->first.ToTrimmedString();
1112
28
        const auto y = result.second->second.ToTrimmedString();
1113
1114
28
        Pool_CurveECC_Point.Set({ curveID, x, y });
1115
1116
28
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1117
28
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1118
28
    }
1119
254
}
1120
1121
254
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
254
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1123
1124
254
    return module->OpECC_Point_Add(op);
1125
254
}
1126
1127
/* Specialization for operation::ECC_Point_Sub */
1128
211
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
211
    (void)module;
1130
1131
211
    if ( result.second != std::nullopt  ) {
1132
19
        const auto curveID = op.curveType.Get();
1133
19
        const auto x = result.second->first.ToTrimmedString();
1134
19
        const auto y = result.second->second.ToTrimmedString();
1135
1136
19
        Pool_CurveECC_Point.Set({ curveID, x, y });
1137
1138
19
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1139
19
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1140
19
    }
1141
211
}
1142
1143
211
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
211
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1145
1146
211
    return module->OpECC_Point_Sub(op);
1147
211
}
1148
1149
/* Specialization for operation::ECC_Point_Mul */
1150
1.51k
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
1.51k
    (void)module;
1152
1153
1.51k
    if ( result.second != std::nullopt  ) {
1154
141
        const auto curveID = op.curveType.Get();
1155
141
        const auto x = result.second->first.ToTrimmedString();
1156
141
        const auto y = result.second->second.ToTrimmedString();
1157
1158
141
        Pool_CurveECC_Point.Set({ curveID, x, y });
1159
1160
141
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1161
141
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1162
141
    }
1163
1.51k
}
1164
1165
1.51k
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
1.51k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1167
1168
1.51k
    return module->OpECC_Point_Mul(op);
1169
1.51k
}
1170
1171
/* Specialization for operation::ECC_Point_Neg */
1172
209
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
209
    (void)module;
1174
1175
209
    if ( result.second != std::nullopt  ) {
1176
44
        const auto curveID = op.curveType.Get();
1177
44
        const auto x = result.second->first.ToTrimmedString();
1178
44
        const auto y = result.second->second.ToTrimmedString();
1179
1180
44
        Pool_CurveECC_Point.Set({ curveID, x, y });
1181
1182
44
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1183
44
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1184
44
    }
1185
209
}
1186
1187
209
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
209
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1189
1190
209
    return module->OpECC_Point_Neg(op);
1191
209
}
1192
1193
/* Specialization for operation::ECC_Point_Dbl */
1194
206
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
206
    (void)module;
1196
1197
206
    if ( result.second != std::nullopt  ) {
1198
25
        const auto curveID = op.curveType.Get();
1199
25
        const auto x = result.second->first.ToTrimmedString();
1200
25
        const auto y = result.second->second.ToTrimmedString();
1201
1202
25
        Pool_CurveECC_Point.Set({ curveID, x, y });
1203
1204
25
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1205
25
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1206
25
    }
1207
206
}
1208
1209
206
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
206
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1211
1212
206
    return module->OpECC_Point_Dbl(op);
1213
206
}
1214
1215
/* Specialization for operation::ECC_Point_Cmp */
1216
239
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
239
    (void)module;
1218
239
    (void)result;
1219
239
    (void)op;
1220
239
}
1221
1222
239
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1223
239
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1224
1225
239
    return module->OpECC_Point_Cmp(op);
1226
239
}
1227
1228
/* Specialization for operation::DH_Derive */
1229
595
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
595
    (void)module;
1231
595
    (void)op;
1232
595
    (void)result;
1233
595
}
1234
1235
595
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1236
595
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1237
586
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1238
577
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1239
572
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1240
1241
561
    return module->OpDH_Derive(op);
1242
572
}
1243
1244
/* Specialization for operation::DH_GenerateKeyPair */
1245
137
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
137
    (void)result;
1247
137
    (void)op;
1248
137
    (void)module;
1249
1250
137
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1251
0
        const auto priv = result.second->first.ToTrimmedString();
1252
0
        const auto pub = result.second->second.ToTrimmedString();
1253
1254
0
        Pool_DH_PrivateKey.Set(priv);
1255
0
        Pool_DH_PublicKey.Set(pub);
1256
0
    }
1257
137
}
1258
1259
137
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
137
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1261
137
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1262
1263
135
    return module->OpDH_GenerateKeyPair(op);
1264
137
}
1265
1266
/* Specialization for operation::BignumCalc */
1267
13.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
13.8k
    (void)module;
1269
13.8k
    (void)op;
1270
1271
13.8k
    if ( result.second != std::nullopt  ) {
1272
3.51k
        const auto bignum = result.second->ToTrimmedString();
1273
1274
3.51k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1275
3.48k
            Pool_Bignum.Set(bignum);
1276
3.48k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1277
550
                Pool_Bignum_Primes.Set(bignum);
1278
550
            }
1279
3.48k
        }
1280
3.51k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1281
147
            if ( bignum == "1" ) {
1282
74
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1283
74
            }
1284
147
        }
1285
3.51k
    }
1286
13.8k
}
1287
1288
13.8k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1289
13.8k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1290
1291
    /* Prevent timeouts */
1292
13.8k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1293
13.8k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1294
13.8k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1295
13.8k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1296
1297
13.8k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1298
1.52k
        return std::nullopt;
1299
1.52k
    }
1300
1301
12.3k
    switch ( op.calcOp.Get() ) {
1302
45
        case    CF_CALCOP("SetBit(A,B)"):
1303
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1304
45
            if ( op.bn1.GetSize() > 4 ) {
1305
10
                return std::nullopt;
1306
10
            }
1307
35
            break;
1308
72
        case    CF_CALCOP("Exp(A,B)"):
1309
72
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1310
22
                return std::nullopt;
1311
22
            }
1312
50
            break;
1313
50
        case    CF_CALCOP("ModLShift(A,B,C)"):
1314
21
            if ( op.bn1.GetSize() > 4 ) {
1315
11
                return std::nullopt;
1316
11
            }
1317
10
            break;
1318
69
        case    CF_CALCOP("Exp2(A)"):
1319
69
            if ( op.bn0.GetSize() > 4 ) {
1320
10
                return std::nullopt;
1321
10
            }
1322
59
            break;
1323
12.3k
    }
1324
1325
12.2k
    return module->OpBignumCalc(op);
1326
12.3k
}
1327
1328
/* Specialization for operation::BignumCalc_Fp2 */
1329
215
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
215
    (void)module;
1331
215
    (void)op;
1332
1333
215
    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
215
}
1345
1346
215
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1347
215
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1348
1349
    /* Prevent timeouts */
1350
215
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1351
204
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1352
194
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1353
185
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1354
175
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1355
164
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1356
154
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1357
143
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1358
1359
138
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1360
0
        return std::nullopt;
1361
0
    }
1362
1363
138
    return module->OpBignumCalc_Fp2(op);
1364
138
}
1365
1366
/* Specialization for operation::BignumCalc_Fp12 */
1367
767
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
767
    (void)module;
1369
767
    (void)op;
1370
1371
767
    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
767
}
1400
1401
767
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1402
767
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1403
1404
    /* Prevent timeouts */
1405
767
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1406
756
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1407
745
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1408
734
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1409
725
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1410
714
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1411
705
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1412
689
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1413
678
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1414
669
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1415
659
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1416
644
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1417
1418
635
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1419
624
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1420
615
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1421
604
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1422
595
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1423
585
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1424
574
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1425
565
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1426
554
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1427
544
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1428
533
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1429
522
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1430
1431
511
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1432
500
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1433
489
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1434
478
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1435
469
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1436
458
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1437
449
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1438
438
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1439
429
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1440
419
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1441
410
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1442
400
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1443
1444
391
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1445
382
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1446
371
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1447
362
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1448
351
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1449
342
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1450
331
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1451
322
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1452
313
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1453
302
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1454
291
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1455
280
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1456
1457
271
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1458
0
        return std::nullopt;
1459
0
    }
1460
1461
271
    return module->OpBignumCalc_Fp12(op);
1462
271
}
1463
1464
/* Specialization for operation::BLS_PrivateToPublic */
1465
129
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
129
    (void)module;
1467
1468
129
    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
129
}
1479
1480
129
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
129
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1482
1483
129
    const size_t size = op.priv.ToTrimmedString().size();
1484
1485
129
    if ( size == 0 || size > 4096 ) {
1486
2
        return std::nullopt;
1487
2
    }
1488
1489
127
    return module->OpBLS_PrivateToPublic(op);
1490
129
}
1491
1492
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1493
174
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
174
    (void)module;
1495
174
    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
174
}
1510
1511
174
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
174
    const size_t size = op.priv.ToTrimmedString().size();
1513
1514
174
    if ( size == 0 || size > 4096 ) {
1515
0
        return std::nullopt;
1516
0
    }
1517
1518
174
    return module->OpBLS_PrivateToPublic_G2(op);
1519
174
}
1520
1521
/* Specialization for operation::BLS_Sign */
1522
141
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
141
    (void)module;
1524
1525
141
    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
141
}
1553
1554
141
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
141
    const size_t size = op.priv.ToTrimmedString().size();
1556
1557
141
    if ( size == 0 || size > 4096 ) {
1558
0
        return std::nullopt;
1559
0
    }
1560
1561
141
    return module->OpBLS_Sign(op);
1562
141
}
1563
1564
/* Specialization for operation::BLS_Verify */
1565
108
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
108
    (void)module;
1567
108
    (void)op;
1568
108
    (void)result;
1569
108
}
1570
1571
108
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
108
    return module->OpBLS_Verify(op);
1588
108
}
1589
1590
/* Specialization for operation::BLS_BatchSign */
1591
183
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
183
    (void)module;
1593
183
    (void)op;
1594
1595
183
    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
183
}
1624
1625
183
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
183
    return module->OpBLS_BatchSign(op);
1627
183
}
1628
1629
/* Specialization for operation::BLS_BatchVerify */
1630
118
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
118
    (void)module;
1632
118
    (void)op;
1633
118
    (void)result;
1634
118
}
1635
1636
118
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1637
118
    return module->OpBLS_BatchVerify(op);
1638
118
}
1639
1640
/* Specialization for operation::BLS_Aggregate_G1 */
1641
145
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
145
    (void)module;
1643
145
    (void)op;
1644
145
    (void)result;
1645
145
}
1646
1647
145
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
145
    return module->OpBLS_Aggregate_G1(op);
1649
145
}
1650
1651
/* Specialization for operation::BLS_Aggregate_G2 */
1652
119
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
119
    (void)module;
1654
119
    (void)op;
1655
119
    (void)result;
1656
119
}
1657
1658
119
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
119
    return module->OpBLS_Aggregate_G2(op);
1660
119
}
1661
1662
/* Specialization for operation::BLS_Pairing */
1663
123
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
123
    (void)module;
1665
123
    (void)op;
1666
1667
123
    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
123
}
1684
1685
123
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1686
123
    return module->OpBLS_Pairing(op);
1687
123
}
1688
1689
/* Specialization for operation::BLS_MillerLoop */
1690
117
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
117
    (void)module;
1692
117
    (void)op;
1693
1694
117
    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
117
}
1711
1712
117
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1713
117
    return module->OpBLS_MillerLoop(op);
1714
117
}
1715
1716
/* Specialization for operation::BLS_FinalExp */
1717
163
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
163
    (void)module;
1719
163
    (void)op;
1720
1721
163
    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
163
}
1738
1739
163
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1740
163
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1741
163
    return module->OpBLS_FinalExp(op);
1742
163
}
1743
1744
/* Specialization for operation::BLS_HashToG1 */
1745
144
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
144
    (void)module;
1747
1748
144
    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
144
}
1759
1760
144
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1761
144
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1762
144
    return module->OpBLS_HashToG1(op);
1763
144
}
1764
1765
/* Specialization for operation::BLS_MapToG1 */
1766
118
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
118
    (void)module;
1768
1769
118
    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
118
}
1780
1781
118
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1782
118
    return module->OpBLS_MapToG1(op);
1783
118
}
1784
1785
/* Specialization for operation::BLS_MapToG2 */
1786
135
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
135
    (void)module;
1788
1789
135
    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
135
}
1804
1805
135
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1806
135
    return module->OpBLS_MapToG2(op);
1807
135
}
1808
1809
/* Specialization for operation::BLS_IsG1OnCurve */
1810
133
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
133
    (void)module;
1812
133
    (void)op;
1813
133
    (void)result;
1814
133
}
1815
1816
133
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1817
133
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1818
133
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1819
133
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1820
1821
133
    return module->OpBLS_IsG1OnCurve(op);
1822
133
}
1823
1824
/* Specialization for operation::BLS_IsG2OnCurve */
1825
138
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
138
    (void)module;
1827
138
    (void)op;
1828
138
    (void)result;
1829
138
}
1830
1831
138
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1832
138
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1833
138
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1834
129
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1835
129
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1836
1837
129
    return module->OpBLS_IsG2OnCurve(op);
1838
129
}
1839
1840
/* Specialization for operation::BLS_GenerateKeyPair */
1841
153
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
153
    (void)module;
1843
1844
153
    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
153
}
1857
1858
153
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
153
    return module->OpBLS_GenerateKeyPair(op);
1860
153
}
1861
1862
/* Specialization for operation::BLS_Decompress_G1 */
1863
118
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
118
    (void)module;
1865
1866
118
    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
118
}
1877
1878
118
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
118
    return module->OpBLS_Decompress_G1(op);
1880
118
}
1881
1882
/* Specialization for operation::BLS_Compress_G1 */
1883
127
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
127
    (void)module;
1885
127
    (void)op;
1886
1887
127
    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
127
}
1893
1894
127
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
127
    return module->OpBLS_Compress_G1(op);
1896
127
}
1897
1898
/* Specialization for operation::BLS_Decompress_G2 */
1899
123
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
123
    (void)module;
1901
1902
123
    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
123
}
1917
1918
123
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
123
    return module->OpBLS_Decompress_G2(op);
1920
123
}
1921
1922
/* Specialization for operation::BLS_Compress_G2 */
1923
115
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
115
    (void)module;
1925
1926
115
    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
115
}
1937
1938
115
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
115
    return module->OpBLS_Compress_G2(op);
1940
115
}
1941
1942
/* Specialization for operation::BLS_G1_Add */
1943
162
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
162
    (void)module;
1945
1946
162
    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
162
}
1957
1958
162
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
162
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1960
162
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1961
162
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1962
157
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1963
157
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1964
1965
157
    return module->OpBLS_G1_Add(op);
1966
157
}
1967
1968
/* Specialization for operation::BLS_G1_Mul */
1969
102
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
102
    (void)module;
1971
1972
102
    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
102
}
1983
1984
102
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
102
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1986
102
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1987
102
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1988
102
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1989
1990
102
    return module->OpBLS_G1_Mul(op);
1991
102
}
1992
1993
/* Specialization for operation::BLS_G1_IsEq */
1994
161
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
161
    (void)module;
1996
161
    (void)op;
1997
161
    (void)result;
1998
161
}
1999
2000
161
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
2001
161
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2002
161
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2003
161
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2004
161
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2005
161
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2006
2007
161
    return module->OpBLS_G1_IsEq(op);
2008
161
}
2009
2010
/* Specialization for operation::BLS_G1_Neg */
2011
161
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
161
    (void)module;
2013
2014
161
    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
161
}
2025
2026
161
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
161
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2028
161
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
161
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
2031
161
    return module->OpBLS_G1_Neg(op);
2032
161
}
2033
2034
/* Specialization for operation::BLS_G2_Add */
2035
243
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
243
    (void)module;
2037
2038
243
    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
243
}
2053
2054
243
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
243
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2056
243
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2057
238
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2058
228
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2059
219
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2060
208
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2061
199
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2062
190
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2063
181
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2064
2065
181
    return module->OpBLS_G2_Add(op);
2066
181
}
2067
2068
/* Specialization for operation::BLS_G2_Mul */
2069
180
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
180
    (void)module;
2071
2072
180
    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
180
}
2087
2088
180
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
180
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2090
180
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2091
180
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2092
180
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2093
180
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2094
180
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2095
2096
180
    return module->OpBLS_G2_Mul(op);
2097
180
}
2098
2099
/* Specialization for operation::BLS_G2_IsEq */
2100
222
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
222
    (void)module;
2102
222
    (void)op;
2103
222
    (void)result;
2104
222
}
2105
2106
222
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2107
222
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2108
222
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2109
219
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2110
208
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2111
199
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2112
190
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2113
179
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2114
168
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2115
157
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2116
2117
148
    return module->OpBLS_G2_IsEq(op);
2118
157
}
2119
2120
/* Specialization for operation::BLS_G2_Neg */
2121
177
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
177
    (void)module;
2123
2124
177
    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
177
}
2139
2140
177
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
177
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2142
177
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2143
177
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2144
172
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2145
167
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2146
2147
153
    return module->OpBLS_G2_Neg(op);
2148
167
}
2149
2150
/* Specialization for operation::BLS_G1_MultiExp */
2151
150
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
150
    (void)module;
2153
2154
150
    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
150
}
2165
2166
150
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
150
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2168
2169
1.63k
    for (const auto& point_scalar : op.points_scalars.points_scalars) {
2170
1.63k
        if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2171
1.63k
        if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2172
1.63k
        if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2173
1.63k
    }
2174
2175
150
    return module->OpBLS_G1_MultiExp(op);
2176
150
}
2177
2178
/* Specialization for operation::Misc */
2179
108
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2180
108
    (void)module;
2181
108
    (void)op;
2182
108
    (void)result;
2183
108
}
2184
2185
108
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2186
108
    return module->OpMisc(op);
2187
108
}
2188
2189
/* Specialization for operation::BLS_HashToG2 */
2190
145
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
145
    (void)module;
2192
2193
145
    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
145
}
2208
2209
145
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2210
145
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2211
145
    return module->OpBLS_HashToG2(op);
2212
145
}
2213
2214
ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2215
    ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options)
2216
23
{ }
2217
22
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2218
22
    this->modulo = component::Bignum(modulo);
2219
22
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2223
1
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2224
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2228
1
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2229
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2233
1
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2234
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2238
1
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2239
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2243
1
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2244
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2248
1
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2249
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2253
1
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337"));
2254
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2258
1
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097"));
2259
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2263
1
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2264
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2268
1
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2269
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2273
1
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2274
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2278
1
    CF_NORET(SetModulo("18446744069414584321"));
2279
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2283
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2284
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2288
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2289
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2293
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2294
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2298
1
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2299
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2303
1
    CF_NORET(SetModulo("18446744073709551616"));
2304
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2308
1
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2309
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2313
1
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2314
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2318
1
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2319
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2323
1
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2324
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2328
1
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2329
1
}
2330
2331
ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2332
    ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options)
2333
1
{ }
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
    ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options)
2340
1
{ }
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
    operationID(operationID),
2348
    modules(modules),
2349
    options(options)
2350
107
{
2351
107
}
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
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
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
2350
1
{
2351
1
}
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
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
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
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
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
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
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
2350
1
{
2351
1
}
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
2350
1
{
2351
1
}
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
2350
1
{
2351
1
}
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
2350
1
{
2351
1
}
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
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
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
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
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
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
23
{
2351
23
}
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
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
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
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
2352
2353
/* Specialization for operation::SR25519_Verify */
2354
157
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
157
    (void)module;
2356
157
    (void)op;
2357
157
    (void)result;
2358
157
}
2359
2360
157
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2361
157
    return module->OpSR25519_Verify(op);
2362
157
}
2363
2364
template <class ResultType, class OperationType>
2365
107
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
107
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2365
23
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
23
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
2367
2368
/* Filter away the values in the set that are std::nullopt */
2369
template <class ResultType, class OperationType>
2370
23.4k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
23.4k
    ResultSet ret;
2372
2373
79.9k
    for (const auto& result : results) {
2374
79.9k
        if ( result.second == std::nullopt ) {
2375
57.2k
            continue;
2376
57.2k
        }
2377
2378
22.6k
        ret.push_back(result);
2379
22.6k
    }
2380
2381
23.4k
    return ret;
2382
23.4k
}
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
1.80k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.80k
    ResultSet ret;
2372
2373
4.95k
    for (const auto& result : results) {
2374
4.95k
        if ( result.second == std::nullopt ) {
2375
2.77k
            continue;
2376
2.77k
        }
2377
2378
2.17k
        ret.push_back(result);
2379
2.17k
    }
2380
2381
1.80k
    return ret;
2382
1.80k
}
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
413
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
413
    ResultSet ret;
2372
2373
1.75k
    for (const auto& result : results) {
2374
1.75k
        if ( result.second == std::nullopt ) {
2375
591
            continue;
2376
591
        }
2377
2378
1.16k
        ret.push_back(result);
2379
1.16k
    }
2380
2381
413
    return ret;
2382
413
}
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
467
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
467
    ResultSet ret;
2372
2373
2.80k
    for (const auto& result : results) {
2374
2.80k
        if ( result.second == std::nullopt ) {
2375
1.42k
            continue;
2376
1.42k
        }
2377
2378
1.38k
        ret.push_back(result);
2379
1.38k
    }
2380
2381
467
    return ret;
2382
467
}
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
791
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
791
    ResultSet ret;
2372
2373
3.00k
    for (const auto& result : results) {
2374
3.00k
        if ( result.second == std::nullopt ) {
2375
1.70k
            continue;
2376
1.70k
        }
2377
2378
1.29k
        ret.push_back(result);
2379
1.29k
    }
2380
2381
791
    return ret;
2382
791
}
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
3.40k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3.40k
    ResultSet ret;
2372
2373
14.1k
    for (const auto& result : results) {
2374
14.1k
        if ( result.second == std::nullopt ) {
2375
9.61k
            continue;
2376
9.61k
        }
2377
2378
4.52k
        ret.push_back(result);
2379
4.52k
    }
2380
2381
3.40k
    return ret;
2382
3.40k
}
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
2.06k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2.06k
    ResultSet ret;
2372
2373
9.11k
    for (const auto& result : results) {
2374
9.11k
        if ( result.second == std::nullopt ) {
2375
8.48k
            continue;
2376
8.48k
        }
2377
2378
626
        ret.push_back(result);
2379
626
    }
2380
2381
2.06k
    return ret;
2382
2.06k
}
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
136
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
136
    ResultSet ret;
2372
2373
773
    for (const auto& result : results) {
2374
773
        if ( result.second == std::nullopt ) {
2375
505
            continue;
2376
505
        }
2377
2378
268
        ret.push_back(result);
2379
268
    }
2380
2381
136
    return ret;
2382
136
}
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
1.49k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.49k
    ResultSet ret;
2372
2373
5.43k
    for (const auto& result : results) {
2374
5.43k
        if ( result.second == std::nullopt ) {
2375
2.72k
            continue;
2376
2.72k
        }
2377
2378
2.71k
        ret.push_back(result);
2379
2.71k
    }
2380
2381
1.49k
    return ret;
2382
1.49k
}
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
96
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
96
    ResultSet ret;
2372
2373
437
    for (const auto& result : results) {
2374
437
        if ( result.second == std::nullopt ) {
2375
437
            continue;
2376
437
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
96
    return ret;
2382
96
}
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
56
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
56
    ResultSet ret;
2372
2373
425
    for (const auto& result : results) {
2374
425
        if ( result.second == std::nullopt ) {
2375
425
            continue;
2376
425
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
56
    return ret;
2382
56
}
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
55
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
55
    ResultSet ret;
2372
2373
358
    for (const auto& result : results) {
2374
358
        if ( result.second == std::nullopt ) {
2375
358
            continue;
2376
358
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
55
    return ret;
2382
55
}
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
545
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
545
    ResultSet ret;
2372
2373
1.89k
    for (const auto& result : results) {
2374
1.89k
        if ( result.second == std::nullopt ) {
2375
1.03k
            continue;
2376
1.03k
        }
2377
2378
859
        ret.push_back(result);
2379
859
    }
2380
2381
545
    return ret;
2382
545
}
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
237
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
237
    ResultSet ret;
2372
2373
588
    for (const auto& result : results) {
2374
588
        if ( result.second == std::nullopt ) {
2375
320
            continue;
2376
320
        }
2377
2378
268
        ret.push_back(result);
2379
268
    }
2380
2381
237
    return ret;
2382
237
}
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
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
43
    ResultSet ret;
2372
2373
292
    for (const auto& result : results) {
2374
292
        if ( result.second == std::nullopt ) {
2375
292
            continue;
2376
292
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
43
    return ret;
2382
43
}
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
57
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
57
    ResultSet ret;
2372
2373
427
    for (const auto& result : results) {
2374
427
        if ( result.second == std::nullopt ) {
2375
427
            continue;
2376
427
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
57
    return ret;
2382
57
}
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
49
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
49
    ResultSet ret;
2372
2373
110
    for (const auto& result : results) {
2374
110
        if ( result.second == std::nullopt ) {
2375
75
            continue;
2376
75
        }
2377
2378
35
        ret.push_back(result);
2379
35
    }
2380
2381
49
    return ret;
2382
49
}
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
377
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
377
    ResultSet ret;
2372
2373
1.67k
    for (const auto& result : results) {
2374
1.67k
        if ( result.second == std::nullopt ) {
2375
879
            continue;
2376
879
        }
2377
2378
795
        ret.push_back(result);
2379
795
    }
2380
2381
377
    return ret;
2382
377
}
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
63
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
63
    ResultSet ret;
2372
2373
428
    for (const auto& result : results) {
2374
428
        if ( result.second == std::nullopt ) {
2375
428
            continue;
2376
428
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
63
    return ret;
2382
63
}
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
50
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
50
    ResultSet ret;
2372
2373
374
    for (const auto& result : results) {
2374
374
        if ( result.second == std::nullopt ) {
2375
374
            continue;
2376
374
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
50
    return ret;
2382
50
}
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
558
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
558
    ResultSet ret;
2372
2373
1.55k
    for (const auto& result : results) {
2374
1.55k
        if ( result.second == std::nullopt ) {
2375
1.16k
            continue;
2376
1.16k
        }
2377
2378
391
        ret.push_back(result);
2379
391
    }
2380
2381
558
    return ret;
2382
558
}
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
291
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
291
    ResultSet ret;
2372
2373
747
    for (const auto& result : results) {
2374
747
        if ( result.second == std::nullopt ) {
2375
293
            continue;
2376
293
        }
2377
2378
454
        ret.push_back(result);
2379
454
    }
2380
2381
291
    return ret;
2382
291
}
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
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
39
    ResultSet ret;
2372
2373
139
    for (const auto& result : results) {
2374
139
        if ( result.second == std::nullopt ) {
2375
139
            continue;
2376
139
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
39
    return ret;
2382
39
}
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
458
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
458
    ResultSet ret;
2372
2373
1.38k
    for (const auto& result : results) {
2374
1.38k
        if ( result.second == std::nullopt ) {
2375
742
            continue;
2376
742
        }
2377
2378
644
        ret.push_back(result);
2379
644
    }
2380
2381
458
    return ret;
2382
458
}
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
67
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
67
    ResultSet ret;
2372
2373
210
    for (const auto& result : results) {
2374
210
        if ( result.second == std::nullopt ) {
2375
196
            continue;
2376
196
        }
2377
2378
14
        ret.push_back(result);
2379
14
    }
2380
2381
67
    return ret;
2382
67
}
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
38
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
38
    ResultSet ret;
2372
2373
136
    for (const auto& result : results) {
2374
136
        if ( result.second == std::nullopt ) {
2375
136
            continue;
2376
136
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
38
    return ret;
2382
38
}
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
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
37
    ResultSet ret;
2372
2373
133
    for (const auto& result : results) {
2374
133
        if ( result.second == std::nullopt ) {
2375
133
            continue;
2376
133
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
37
    return ret;
2382
37
}
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
28
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
28
    ResultSet ret;
2372
2373
101
    for (const auto& result : results) {
2374
101
        if ( result.second == std::nullopt ) {
2375
101
            continue;
2376
101
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
28
    return ret;
2382
28
}
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
264
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
264
    ResultSet ret;
2372
2373
823
    for (const auto& result : results) {
2374
823
        if ( result.second == std::nullopt ) {
2375
371
            continue;
2376
371
        }
2377
2378
452
        ret.push_back(result);
2379
452
    }
2380
2381
264
    return ret;
2382
264
}
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
145
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
145
    ResultSet ret;
2372
2373
413
    for (const auto& result : results) {
2374
413
        if ( result.second == std::nullopt ) {
2375
265
            continue;
2376
265
        }
2377
2378
148
        ret.push_back(result);
2379
148
    }
2380
2381
145
    return ret;
2382
145
}
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
41
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
41
    ResultSet ret;
2372
2373
141
    for (const auto& result : results) {
2374
141
        if ( result.second == std::nullopt ) {
2375
141
            continue;
2376
141
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
41
    return ret;
2382
41
}
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
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
37
    ResultSet ret;
2372
2373
143
    for (const auto& result : results) {
2374
143
        if ( result.second == std::nullopt ) {
2375
143
            continue;
2376
143
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
37
    return ret;
2382
37
}
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
420
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
420
    ResultSet ret;
2372
2373
1.15k
    for (const auto& result : results) {
2374
1.15k
        if ( result.second == std::nullopt ) {
2375
703
            continue;
2376
703
        }
2377
2378
448
        ret.push_back(result);
2379
448
    }
2380
2381
420
    return ret;
2382
420
}
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
169
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
169
    ResultSet ret;
2372
2373
583
    for (const auto& result : results) {
2374
583
        if ( result.second == std::nullopt ) {
2375
443
            continue;
2376
443
        }
2377
2378
140
        ret.push_back(result);
2379
140
    }
2380
2381
169
    return ret;
2382
169
}
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
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
33
    ResultSet ret;
2372
2373
123
    for (const auto& result : results) {
2374
123
        if ( result.second == std::nullopt ) {
2375
123
            continue;
2376
123
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
33
    return ret;
2382
33
}
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
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
30
    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
30
    return ret;
2382
30
}
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
42
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
42
    ResultSet ret;
2372
2373
137
    for (const auto& result : results) {
2374
137
        if ( result.second == std::nullopt ) {
2375
137
            continue;
2376
137
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
42
    return ret;
2382
42
}
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
73
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
73
    ResultSet ret;
2372
2373
254
    for (const auto& result : results) {
2374
254
        if ( result.second == std::nullopt ) {
2375
226
            continue;
2376
226
        }
2377
2378
28
        ret.push_back(result);
2379
28
    }
2380
2381
73
    return ret;
2382
73
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
62
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
62
    ResultSet ret;
2372
2373
211
    for (const auto& result : results) {
2374
211
        if ( result.second == std::nullopt ) {
2375
192
            continue;
2376
192
        }
2377
2378
19
        ret.push_back(result);
2379
19
    }
2380
2381
62
    return ret;
2382
62
}
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
507
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
507
    ResultSet ret;
2372
2373
1.51k
    for (const auto& result : results) {
2374
1.51k
        if ( result.second == std::nullopt ) {
2375
1.36k
            continue;
2376
1.36k
        }
2377
2378
141
        ret.push_back(result);
2379
141
    }
2380
2381
507
    return ret;
2382
507
}
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
60
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
60
    ResultSet ret;
2372
2373
209
    for (const auto& result : results) {
2374
209
        if ( result.second == std::nullopt ) {
2375
165
            continue;
2376
165
        }
2377
2378
44
        ret.push_back(result);
2379
44
    }
2380
2381
60
    return ret;
2382
60
}
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
62
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
62
    ResultSet ret;
2372
2373
206
    for (const auto& result : results) {
2374
206
        if ( result.second == std::nullopt ) {
2375
181
            continue;
2376
181
        }
2377
2378
25
        ret.push_back(result);
2379
25
    }
2380
2381
62
    return ret;
2382
62
}
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
66
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
66
    ResultSet ret;
2372
2373
239
    for (const auto& result : results) {
2374
239
        if ( result.second == std::nullopt ) {
2375
216
            continue;
2376
216
        }
2377
2378
23
        ret.push_back(result);
2379
23
    }
2380
2381
66
    return ret;
2382
66
}
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
204
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
204
    ResultSet ret;
2372
2373
595
    for (const auto& result : results) {
2374
595
        if ( result.second == std::nullopt ) {
2375
547
            continue;
2376
547
        }
2377
2378
48
        ret.push_back(result);
2379
48
    }
2380
2381
204
    return ret;
2382
204
}
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.79k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
5.79k
    ResultSet ret;
2372
2373
13.8k
    for (const auto& result : results) {
2374
13.8k
        if ( result.second == std::nullopt ) {
2375
10.3k
            continue;
2376
10.3k
        }
2377
2378
3.51k
        ret.push_back(result);
2379
3.51k
    }
2380
2381
5.79k
    return ret;
2382
5.79k
}
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
65
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
65
    ResultSet ret;
2372
2373
215
    for (const auto& result : results) {
2374
215
        if ( result.second == std::nullopt ) {
2375
215
            continue;
2376
215
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
65
    return ret;
2382
65
}
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
258
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
258
    ResultSet ret;
2372
2373
767
    for (const auto& result : results) {
2374
767
        if ( result.second == std::nullopt ) {
2375
767
            continue;
2376
767
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
258
    return ret;
2382
258
}
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
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
43
    ResultSet ret;
2372
2373
129
    for (const auto& result : results) {
2374
129
        if ( result.second == std::nullopt ) {
2375
129
            continue;
2376
129
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
43
    return ret;
2382
43
}
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
54
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
54
    ResultSet ret;
2372
2373
174
    for (const auto& result : results) {
2374
174
        if ( result.second == std::nullopt ) {
2375
174
            continue;
2376
174
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
54
    return ret;
2382
54
}
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
41
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
41
    ResultSet ret;
2372
2373
141
    for (const auto& result : results) {
2374
141
        if ( result.second == std::nullopt ) {
2375
141
            continue;
2376
141
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
41
    return ret;
2382
41
}
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
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
30
    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
30
    return ret;
2382
30
}
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
52
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
52
    ResultSet ret;
2372
2373
183
    for (const auto& result : results) {
2374
183
        if ( result.second == std::nullopt ) {
2375
183
            continue;
2376
183
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
52
    return ret;
2382
52
}
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
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
34
    ResultSet ret;
2372
2373
118
    for (const auto& result : results) {
2374
118
        if ( result.second == std::nullopt ) {
2375
118
            continue;
2376
118
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
34
    return ret;
2382
34
}
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
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
40
    ResultSet ret;
2372
2373
145
    for (const auto& result : results) {
2374
145
        if ( result.second == std::nullopt ) {
2375
145
            continue;
2376
145
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
40
    return ret;
2382
40
}
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
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
33
    ResultSet ret;
2372
2373
119
    for (const auto& result : results) {
2374
119
        if ( result.second == std::nullopt ) {
2375
119
            continue;
2376
119
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
33
    return ret;
2382
33
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
36
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
36
    ResultSet ret;
2372
2373
123
    for (const auto& result : results) {
2374
123
        if ( result.second == std::nullopt ) {
2375
123
            continue;
2376
123
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
36
    return ret;
2382
36
}
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
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
30
    ResultSet ret;
2372
2373
117
    for (const auto& result : results) {
2374
117
        if ( result.second == std::nullopt ) {
2375
117
            continue;
2376
117
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
30
    return ret;
2382
30
}
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
47
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
47
    ResultSet ret;
2372
2373
163
    for (const auto& result : results) {
2374
163
        if ( result.second == std::nullopt ) {
2375
163
            continue;
2376
163
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
47
    return ret;
2382
47
}
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
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
40
    ResultSet ret;
2372
2373
144
    for (const auto& result : results) {
2374
144
        if ( result.second == std::nullopt ) {
2375
144
            continue;
2376
144
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
40
    return ret;
2382
40
}
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
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
40
    ResultSet ret;
2372
2373
145
    for (const auto& result : results) {
2374
145
        if ( result.second == std::nullopt ) {
2375
145
            continue;
2376
145
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
40
    return ret;
2382
40
}
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
32
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
32
    ResultSet ret;
2372
2373
118
    for (const auto& result : results) {
2374
118
        if ( result.second == std::nullopt ) {
2375
118
            continue;
2376
118
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
32
    return ret;
2382
32
}
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
38
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
38
    ResultSet ret;
2372
2373
135
    for (const auto& result : results) {
2374
135
        if ( result.second == std::nullopt ) {
2375
135
            continue;
2376
135
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
38
    return ret;
2382
38
}
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
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
40
    ResultSet ret;
2372
2373
133
    for (const auto& result : results) {
2374
133
        if ( result.second == std::nullopt ) {
2375
133
            continue;
2376
133
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
40
    return ret;
2382
40
}
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
44
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
44
    ResultSet ret;
2372
2373
138
    for (const auto& result : results) {
2374
138
        if ( result.second == std::nullopt ) {
2375
138
            continue;
2376
138
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
44
    return ret;
2382
44
}
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
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
43
    ResultSet ret;
2372
2373
153
    for (const auto& result : results) {
2374
153
        if ( result.second == std::nullopt ) {
2375
153
            continue;
2376
153
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
43
    return ret;
2382
43
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
32
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
32
    ResultSet ret;
2372
2373
118
    for (const auto& result : results) {
2374
118
        if ( result.second == std::nullopt ) {
2375
118
            continue;
2376
118
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
32
    return ret;
2382
32
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const
Line
Count
Source
2370
36
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
36
    ResultSet ret;
2372
2373
127
    for (const auto& result : results) {
2374
127
        if ( result.second == std::nullopt ) {
2375
127
            continue;
2376
127
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
36
    return ret;
2382
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
37
    ResultSet ret;
2372
2373
123
    for (const auto& result : results) {
2374
123
        if ( result.second == std::nullopt ) {
2375
123
            continue;
2376
123
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
37
    return ret;
2382
37
}
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
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
33
    ResultSet ret;
2372
2373
115
    for (const auto& result : results) {
2374
115
        if ( result.second == std::nullopt ) {
2375
115
            continue;
2376
115
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
33
    return ret;
2382
33
}
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
52
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
52
    ResultSet ret;
2372
2373
162
    for (const auto& result : results) {
2374
162
        if ( result.second == std::nullopt ) {
2375
162
            continue;
2376
162
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
52
    return ret;
2382
52
}
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
29
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
29
    ResultSet ret;
2372
2373
102
    for (const auto& result : results) {
2374
102
        if ( result.second == std::nullopt ) {
2375
102
            continue;
2376
102
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
29
    return ret;
2382
29
}
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
56
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
56
    ResultSet ret;
2372
2373
161
    for (const auto& result : results) {
2374
161
        if ( result.second == std::nullopt ) {
2375
161
            continue;
2376
161
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
56
    return ret;
2382
56
}
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
51
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
51
    ResultSet ret;
2372
2373
161
    for (const auto& result : results) {
2374
161
        if ( result.second == std::nullopt ) {
2375
161
            continue;
2376
161
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
51
    return ret;
2382
51
}
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
82
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
82
    ResultSet ret;
2372
2373
243
    for (const auto& result : results) {
2374
243
        if ( result.second == std::nullopt ) {
2375
243
            continue;
2376
243
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
82
    return ret;
2382
82
}
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
63
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
63
    ResultSet ret;
2372
2373
180
    for (const auto& result : results) {
2374
180
        if ( result.second == std::nullopt ) {
2375
180
            continue;
2376
180
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
63
    return ret;
2382
63
}
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
73
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
73
    ResultSet ret;
2372
2373
222
    for (const auto& result : results) {
2374
222
        if ( result.second == std::nullopt ) {
2375
222
            continue;
2376
222
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
73
    return ret;
2382
73
}
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
59
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
59
    ResultSet ret;
2372
2373
177
    for (const auto& result : results) {
2374
177
        if ( result.second == std::nullopt ) {
2375
177
            continue;
2376
177
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
59
    return ret;
2382
59
}
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
44
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
44
    ResultSet ret;
2372
2373
150
    for (const auto& result : results) {
2374
150
        if ( result.second == std::nullopt ) {
2375
150
            continue;
2376
150
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
44
    return ret;
2382
44
}
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
29
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
29
    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
29
    return ret;
2382
29
}
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
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
43
    ResultSet ret;
2372
2373
157
    for (const auto& result : results) {
2374
157
        if ( result.second == std::nullopt ) {
2375
157
            continue;
2376
157
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
43
    return ret;
2382
43
}
2383
2384
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2385
template <>
2386
517
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
517
    (void)operations;
2388
517
    (void)results;
2389
517
    (void)data;
2390
517
    (void)size;
2391
517
}
2392
2393
template <class ResultType, class OperationType>
2394
2.25k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
2.25k
    (void)operation;
2396
2397
2.25k
    return false;
2398
2.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2394
505
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
505
    (void)operation;
2396
2397
505
    return false;
2398
505
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
Line
Count
Source
2394
182
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
182
    (void)operation;
2396
2397
182
    return false;
2398
182
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT 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::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
Line
Count
Source
2394
600
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
600
    (void)operation;
2396
2397
600
    return false;
2398
600
}
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
142
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
142
    (void)operation;
2396
2397
142
    return false;
2398
142
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 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::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
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::dontCompare(cryptofuzz::operation::KDF_BCRYPT const&) const
Line
Count
Source
2394
5
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
5
    (void)operation;
2396
2397
5
    return false;
2398
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
Line
Count
Source
2394
106
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
106
    (void)operation;
2396
2397
106
    return false;
2398
106
}
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
128
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
128
    (void)operation;
2396
2397
128
    return false;
2398
128
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2394
153
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
153
    (void)operation;
2396
2397
153
    return false;
2398
153
}
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
122
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
122
    (void)operation;
2396
2397
122
    return false;
2398
122
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify 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<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
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::dontCompare(cryptofuzz::operation::ECDSA_Recover const&) const
Line
Count
Source
2394
82
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
82
    (void)operation;
2396
2397
82
    return false;
2398
82
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const
Line
Count
Source
2394
44
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
44
    (void)operation;
2396
2397
44
    return false;
2398
44
}
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
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::dontCompare(cryptofuzz::operation::ECDH_Derive const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::dontCompare(cryptofuzz::operation::ECIES_Encrypt const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::dontCompare(cryptofuzz::operation::ECIES_Decrypt const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::dontCompare(cryptofuzz::operation::ECC_Point_Add const&) const
Line
Count
Source
2394
8
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
8
    (void)operation;
2396
2397
8
    return false;
2398
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::dontCompare(cryptofuzz::operation::ECC_Point_Sub const&) const
Line
Count
Source
2394
4
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
4
    (void)operation;
2396
2397
4
    return false;
2398
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul 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
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2394
12
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
12
    (void)operation;
2396
2397
12
    return false;
2398
12
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
Line
Count
Source
2394
5
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
5
    (void)operation;
2396
2397
5
    return false;
2398
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2394
6
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
6
    (void)operation;
2396
2397
6
    return false;
2398
6
}
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
9
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
9
    (void)operation;
2396
2397
9
    return false;
2398
9
}
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
750
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2402
750
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2403
750
    if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; }
2404
750
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2405
648
    if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; }
2406
2407
644
    return false;
2408
648
}
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
141
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2418
141
    if (
2419
141
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2420
141
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2421
76
        if ( operation.UseRandomNonce() ) {
2422
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2423
43
            return true;
2424
43
        }
2425
76
    }
2426
2427
98
    return false;
2428
141
}
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
667
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2461
667
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2462
2463
667
    return false;
2464
667
}
2465
2466
template <>
2467
113
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2468
113
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2469
2470
113
    return false;
2471
113
}
2472
2473
template <>
2474
200
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2475
200
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2476
2477
200
    return false;
2478
200
}
2479
2480
template <>
2481
245
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2482
245
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2483
2484
244
    return false;
2485
245
}
2486
2487
template <class ResultType, class OperationType>
2488
23.4k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
23.4k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
23.4k
    const auto filtered = filter(results);
2495
2496
23.4k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
19.1k
        return;
2499
19.1k
    }
2500
2501
4.37k
    if ( dontCompare(operations[0].second) == true ) {
2502
150
        return;
2503
150
    }
2504
2505
18.5k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
14.2k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
14.2k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
14.2k
        const bool equal = *prev == *cur;
2510
2511
14.2k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
14.2k
    }
2528
4.22k
}
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
1.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
1.80k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1.80k
    const auto filtered = filter(results);
2495
2496
1.80k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.30k
        return;
2499
1.30k
    }
2500
2501
505
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.94k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.44k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.44k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.44k
        const bool equal = *prev == *cur;
2510
2511
1.44k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.44k
    }
2528
505
}
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
413
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
413
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
413
    const auto filtered = filter(results);
2495
2496
413
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
168
        return;
2499
168
    }
2500
2501
245
    if ( dontCompare(operations[0].second) == true ) {
2502
1
        return;
2503
1
    }
2504
2505
1.08k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
839
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
839
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
839
        const bool equal = *prev == *cur;
2510
2511
839
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
839
    }
2528
244
}
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
467
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
467
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
467
    const auto filtered = filter(results);
2495
2496
467
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
285
        return;
2499
285
    }
2500
2501
182
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.26k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.07k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.07k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.07k
        const bool equal = *prev == *cur;
2510
2511
1.07k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.07k
    }
2528
182
}
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
791
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
791
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
791
    const auto filtered = filter(results);
2495
2496
791
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
591
        return;
2499
591
    }
2500
2501
200
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.14k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
943
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
943
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
943
        const bool equal = *prev == *cur;
2510
2511
943
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
943
    }
2528
200
}
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
3.40k
void ExecutorBase<ResultType, OperationType>::compare(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.40k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
3.40k
    const auto filtered = filter(results);
2495
2496
3.40k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2.74k
        return;
2499
2.74k
    }
2500
2501
667
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
4.26k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
3.59k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
3.59k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
3.59k
        const bool equal = *prev == *cur;
2510
2511
3.59k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
3.59k
    }
2528
667
}
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
2.06k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2.06k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
2.06k
    const auto filtered = filter(results);
2495
2496
2.06k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.95k
        return;
2499
1.95k
    }
2500
2501
113
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
538
    for (size_t i = 1; i < filtered.size(); i++) {
2506
425
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
425
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
425
        const bool equal = *prev == *cur;
2510
2511
425
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
425
    }
2528
113
}
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
136
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
136
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
136
    const auto filtered = filter(results);
2495
2496
136
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
102
        return;
2499
102
    }
2500
2501
34
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
227
    for (size_t i = 1; i < filtered.size(); i++) {
2506
193
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
193
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
193
        const bool equal = *prev == *cur;
2510
2511
193
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
193
    }
2528
34
}
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
1.49k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1.49k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1.49k
    const auto filtered = filter(results);
2495
2496
1.49k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
890
        return;
2499
890
    }
2500
2501
600
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
2.47k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.87k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.87k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.87k
        const bool equal = *prev == *cur;
2510
2511
1.87k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.87k
    }
2528
600
}
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
96
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
96
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
96
    const auto filtered = filter(results);
2495
2496
96
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
96
        return;
2499
96
    }
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
56
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
56
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
56
    const auto filtered = filter(results);
2495
2496
56
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
56
        return;
2499
56
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
55
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
55
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
55
    const auto filtered = filter(results);
2495
2496
55
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
55
        return;
2499
55
    }
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
545
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
545
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
545
    const auto filtered = filter(results);
2495
2496
545
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
403
        return;
2499
403
    }
2500
2501
142
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
664
    for (size_t i = 1; i < filtered.size(); i++) {
2506
522
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
522
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
522
        const bool equal = *prev == *cur;
2510
2511
522
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
522
    }
2528
142
}
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
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
0
        return;
2492
0
    }
2493
2494
237
    const auto filtered = filter(results);
2495
2496
237
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
198
        return;
2499
198
    }
2500
2501
39
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
110
    for (size_t i = 1; i < filtered.size(); i++) {
2506
71
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
71
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
71
        const bool equal = *prev == *cur;
2510
2511
71
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
71
    }
2528
39
}
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
43
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
43
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
43
    const auto filtered = filter(results);
2495
2496
43
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
43
        return;
2499
43
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
57
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
57
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
57
    const auto filtered = filter(results);
2495
2496
57
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
57
        return;
2499
57
    }
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
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
0
        return;
2492
0
    }
2493
2494
49
    const auto filtered = filter(results);
2495
2496
49
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
44
        return;
2499
44
    }
2500
2501
5
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
10
    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
5
}
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
377
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
377
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
377
    const auto filtered = filter(results);
2495
2496
377
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
271
        return;
2499
271
    }
2500
2501
106
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
605
    for (size_t i = 1; i < filtered.size(); i++) {
2506
499
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
499
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
499
        const bool equal = *prev == *cur;
2510
2511
499
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
499
    }
2528
106
}
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
63
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
63
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
63
    const auto filtered = filter(results);
2495
2496
63
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
63
        return;
2499
63
    }
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
50
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
50
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
50
    const auto filtered = filter(results);
2495
2496
50
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
50
        return;
2499
50
    }
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
558
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
558
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
558
    const auto filtered = filter(results);
2495
2496
558
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
430
        return;
2499
430
    }
2500
2501
128
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
341
    for (size_t i = 1; i < filtered.size(); i++) {
2506
213
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
213
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
213
        const bool equal = *prev == *cur;
2510
2511
213
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
213
    }
2528
128
}
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
291
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
291
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
291
    const auto filtered = filter(results);
2495
2496
291
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
138
        return;
2499
138
    }
2500
2501
153
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
392
    for (size_t i = 1; i < filtered.size(); i++) {
2506
239
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
239
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
239
        const bool equal = *prev == *cur;
2510
2511
239
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
239
    }
2528
153
}
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
39
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
39
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
39
    const auto filtered = filter(results);
2495
2496
39
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
39
        return;
2499
39
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
458
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
458
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
458
    const auto filtered = filter(results);
2495
2496
458
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
317
        return;
2499
317
    }
2500
2501
141
    if ( dontCompare(operations[0].second) == true ) {
2502
43
        return;
2503
43
    }
2504
2505
331
    for (size_t i = 1; i < filtered.size(); i++) {
2506
233
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
233
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
233
        const bool equal = *prev == *cur;
2510
2511
233
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
233
    }
2528
98
}
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
67
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
67
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
67
    const auto filtered = filter(results);
2495
2496
67
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
67
        return;
2499
67
    }
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
38
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
38
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
38
    const auto filtered = filter(results);
2495
2496
38
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
38
        return;
2499
38
    }
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
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
37
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
37
    const auto filtered = filter(results);
2495
2496
37
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
37
        return;
2499
37
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
28
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
28
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
28
    const auto filtered = filter(results);
2495
2496
28
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
28
        return;
2499
28
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::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
264
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
264
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
264
    const auto filtered = filter(results);
2495
2496
264
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
142
        return;
2499
142
    }
2500
2501
122
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
376
    for (size_t i = 1; i < filtered.size(); i++) {
2506
254
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
254
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
254
        const bool equal = *prev == *cur;
2510
2511
254
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
254
    }
2528
122
}
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
145
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
145
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
145
    const auto filtered = filter(results);
2495
2496
145
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
115
        return;
2499
115
    }
2500
2501
30
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
94
    for (size_t i = 1; i < filtered.size(); i++) {
2506
64
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
64
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
64
        const bool equal = *prev == *cur;
2510
2511
64
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
64
    }
2528
30
}
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
41
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
41
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
41
    const auto filtered = filter(results);
2495
2496
41
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
41
        return;
2499
41
    }
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
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
37
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
37
    const auto filtered = filter(results);
2495
2496
37
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
37
        return;
2499
37
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::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
420
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
420
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
420
    const auto filtered = filter(results);
2495
2496
420
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
338
        return;
2499
338
    }
2500
2501
82
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
262
    for (size_t i = 1; i < filtered.size(); i++) {
2506
180
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
180
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
180
        const bool equal = *prev == *cur;
2510
2511
180
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
180
    }
2528
82
}
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
169
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
169
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
169
    const auto filtered = filter(results);
2495
2496
169
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
125
        return;
2499
125
    }
2500
2501
44
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
130
    for (size_t i = 1; i < filtered.size(); i++) {
2506
86
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
86
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
86
        const bool equal = *prev == *cur;
2510
2511
86
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
86
    }
2528
44
}
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
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
0
        return;
2492
0
    }
2493
2494
33
    const auto filtered = filter(results);
2495
2496
33
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
33
        return;
2499
33
    }
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
30
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
30
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
30
    const auto filtered = filter(results);
2495
2496
30
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
30
        return;
2499
30
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::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
42
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
42
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
42
    const auto filtered = filter(results);
2495
2496
42
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
42
        return;
2499
42
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
73
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
73
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
73
    const auto filtered = filter(results);
2495
2496
73
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
65
        return;
2499
65
    }
2500
2501
8
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
24
    for (size_t i = 1; i < filtered.size(); i++) {
2506
16
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
16
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
16
        const bool equal = *prev == *cur;
2510
2511
16
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
16
    }
2528
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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
0
        return;
2492
0
    }
2493
2494
62
    const auto filtered = filter(results);
2495
2496
62
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
58
        return;
2499
58
    }
2500
2501
4
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
14
    for (size_t i = 1; i < filtered.size(); i++) {
2506
10
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
10
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
10
        const bool equal = *prev == *cur;
2510
2511
10
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
10
    }
2528
4
}
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
507
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
507
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
507
    const auto filtered = filter(results);
2495
2496
507
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
468
        return;
2499
468
    }
2500
2501
39
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
118
    for (size_t i = 1; i < filtered.size(); i++) {
2506
79
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
79
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
79
        const bool equal = *prev == *cur;
2510
2511
79
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
79
    }
2528
39
}
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
60
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
60
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
60
    const auto filtered = filter(results);
2495
2496
60
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
48
        return;
2499
48
    }
2500
2501
12
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
37
    for (size_t i = 1; i < filtered.size(); i++) {
2506
25
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
25
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
25
        const bool equal = *prev == *cur;
2510
2511
25
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
25
    }
2528
12
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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
0
        return;
2492
0
    }
2493
2494
62
    const auto filtered = filter(results);
2495
2496
62
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
57
        return;
2499
57
    }
2500
2501
5
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
17
    for (size_t i = 1; i < filtered.size(); i++) {
2506
12
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
12
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
12
        const bool equal = *prev == *cur;
2510
2511
12
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
12
    }
2528
5
}
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
66
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
66
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
66
    const auto filtered = filter(results);
2495
2496
66
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
60
        return;
2499
60
    }
2500
2501
6
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
19
    for (size_t i = 1; i < filtered.size(); i++) {
2506
13
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
13
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
13
        const bool equal = *prev == *cur;
2510
2511
13
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
13
    }
2528
6
}
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
204
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
204
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
204
    const auto filtered = filter(results);
2495
2496
204
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
195
        return;
2499
195
    }
2500
2501
9
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
28
    for (size_t i = 1; i < filtered.size(); i++) {
2506
19
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
19
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
19
        const bool equal = *prev == *cur;
2510
2511
19
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
19
    }
2528
9
}
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
5.79k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
5.79k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
5.79k
    const auto filtered = filter(results);
2495
2496
5.79k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
5.04k
        return;
2499
5.04k
    }
2500
2501
750
    if ( dontCompare(operations[0].second) == true ) {
2502
106
        return;
2503
106
    }
2504
2505
1.98k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.34k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.34k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.34k
        const bool equal = *prev == *cur;
2510
2511
1.34k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.34k
    }
2528
644
}
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
65
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
65
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
65
    const auto filtered = filter(results);
2495
2496
65
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
65
        return;
2499
65
    }
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
258
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
258
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
258
    const auto filtered = filter(results);
2495
2496
258
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
258
        return;
2499
258
    }
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
43
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
43
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
43
    const auto filtered = filter(results);
2495
2496
43
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
43
        return;
2499
43
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_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
54
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
54
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
54
    const auto filtered = filter(results);
2495
2496
54
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
54
        return;
2499
54
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
41
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
41
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
41
    const auto filtered = filter(results);
2495
2496
41
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
41
        return;
2499
41
    }
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
30
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
30
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
30
    const auto filtered = filter(results);
2495
2496
30
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
30
        return;
2499
30
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
52
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
52
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
52
    const auto filtered = filter(results);
2495
2496
52
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
52
        return;
2499
52
    }
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
34
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
34
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
34
    const auto filtered = filter(results);
2495
2496
34
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
34
        return;
2499
34
    }
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
40
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
40
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
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_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
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
0
        return;
2492
0
    }
2493
2494
33
    const auto filtered = filter(results);
2495
2496
33
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
33
        return;
2499
33
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Pairing>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Pairing> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
36
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
36
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
36
    const auto filtered = filter(results);
2495
2496
36
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
36
        return;
2499
36
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MillerLoop>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MillerLoop> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
30
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
30
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
30
    const auto filtered = filter(results);
2495
2496
30
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
30
        return;
2499
30
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
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
0
        return;
2492
0
    }
2493
2494
47
    const auto filtered = filter(results);
2495
2496
47
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
47
        return;
2499
47
    }
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
40
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
40
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
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_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
40
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
40
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
40
    const auto filtered = filter(results);
2495
2496
40
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
40
        return;
2499
40
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_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
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
0
        return;
2492
0
    }
2493
2494
32
    const auto filtered = filter(results);
2495
2496
32
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
32
        return;
2499
32
    }
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
38
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
38
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
38
    const auto filtered = filter(results);
2495
2496
38
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
38
        return;
2499
38
    }
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
40
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
40
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
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<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
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
0
        return;
2492
0
    }
2493
2494
44
    const auto filtered = filter(results);
2495
2496
44
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
44
        return;
2499
44
    }
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
43
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
43
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
43
    const auto filtered = filter(results);
2495
2496
43
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
43
        return;
2499
43
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
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
0
        return;
2492
0
    }
2493
2494
32
    const auto filtered = filter(results);
2495
2496
32
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
32
        return;
2499
32
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
36
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
36
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
36
    const auto filtered = filter(results);
2495
2496
36
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
36
        return;
2499
36
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
37
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
37
    const auto filtered = filter(results);
2495
2496
37
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
37
        return;
2499
37
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_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
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
0
        return;
2492
0
    }
2493
2494
33
    const auto filtered = filter(results);
2495
2496
33
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
33
        return;
2499
33
    }
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
52
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
52
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
52
    const auto filtered = filter(results);
2495
2496
52
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
52
        return;
2499
52
    }
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
29
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
29
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
29
    const auto filtered = filter(results);
2495
2496
29
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
29
        return;
2499
29
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
56
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
56
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
56
    const auto filtered = filter(results);
2495
2496
56
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
56
        return;
2499
56
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
51
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
51
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
51
    const auto filtered = filter(results);
2495
2496
51
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
51
        return;
2499
51
    }
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
82
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
82
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
82
    const auto filtered = filter(results);
2495
2496
82
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
82
        return;
2499
82
    }
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
63
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
63
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
63
    const auto filtered = filter(results);
2495
2496
63
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
63
        return;
2499
63
    }
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
73
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
73
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
73
    const auto filtered = filter(results);
2495
2496
73
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
73
        return;
2499
73
    }
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
59
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
59
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
59
    const auto filtered = filter(results);
2495
2496
59
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
59
        return;
2499
59
    }
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
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
0
        return;
2492
0
    }
2493
2494
44
    const auto filtered = filter(results);
2495
2496
44
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
44
        return;
2499
44
    }
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
29
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
29
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
29
    const auto filtered = filter(results);
2495
2496
29
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
29
        return;
2499
29
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
43
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
43
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
43
    const auto filtered = filter(results);
2495
2496
43
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
43
        return;
2499
43
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
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
237k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
237k
    (void)parentDs;
2551
237k
    return op;
2552
237k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2549
4.71k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.71k
    (void)parentDs;
2551
4.71k
    return op;
2552
4.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2549
3.43k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.43k
    (void)parentDs;
2551
3.43k
    return op;
2552
3.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2549
4.63k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.63k
    (void)parentDs;
2551
4.63k
    return op;
2552
4.63k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2549
4.22k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.22k
    (void)parentDs;
2551
4.22k
    return op;
2552
4.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2549
17.3k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
17.3k
    (void)parentDs;
2551
17.3k
    return op;
2552
17.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2549
11.3k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
11.3k
    (void)parentDs;
2551
11.3k
    return op;
2552
11.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2549
2.60k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.60k
    (void)parentDs;
2551
2.60k
    return op;
2552
2.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2549
6.82k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
6.82k
    (void)parentDs;
2551
6.82k
    return op;
2552
6.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2549
2.72k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.72k
    (void)parentDs;
2551
2.72k
    return op;
2552
2.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2549
2.49k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.49k
    (void)parentDs;
2551
2.49k
    return op;
2552
2.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2549
2.37k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.37k
    (void)parentDs;
2551
2.37k
    return op;
2552
2.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2549
3.57k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.57k
    (void)parentDs;
2551
3.57k
    return op;
2552
3.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2549
2.79k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.79k
    (void)parentDs;
2551
2.79k
    return op;
2552
2.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2549
2.72k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.72k
    (void)parentDs;
2551
2.72k
    return op;
2552
2.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2549
2.55k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.55k
    (void)parentDs;
2551
2.55k
    return op;
2552
2.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2549
2.38k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.38k
    (void)parentDs;
2551
2.38k
    return op;
2552
2.38k
}
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
3.31k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.31k
    (void)parentDs;
2551
3.31k
    return op;
2552
3.31k
}
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
2.52k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.52k
    (void)parentDs;
2551
2.52k
    return op;
2552
2.52k
}
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
2.36k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.36k
    (void)parentDs;
2551
2.36k
    return op;
2552
2.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2549
2.80k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.80k
    (void)parentDs;
2551
2.80k
    return op;
2552
2.80k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2549
2.11k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.11k
    (void)parentDs;
2551
2.11k
    return op;
2552
2.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2549
1.89k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.89k
    (void)parentDs;
2551
1.89k
    return op;
2552
1.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const
Line
Count
Source
2549
2.45k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.45k
    (void)parentDs;
2551
2.45k
    return op;
2552
2.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) 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::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2549
2.13k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.13k
    (void)parentDs;
2551
2.13k
    return op;
2552
2.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) 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::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2549
2.31k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.31k
    (void)parentDs;
2551
2.31k
    return op;
2552
2.31k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2549
2.22k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.22k
    (void)parentDs;
2551
2.22k
    return op;
2552
2.22k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2549
2.11k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.11k
    (void)parentDs;
2551
2.11k
    return op;
2552
2.11k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2549
2.49k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.49k
    (void)parentDs;
2551
2.49k
    return op;
2552
2.49k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2549
2.35k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.35k
    (void)parentDs;
2551
2.35k
    return op;
2552
2.35k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2549
2.32k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.32k
    (void)parentDs;
2551
2.32k
    return op;
2552
2.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2549
2.95k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.95k
    (void)parentDs;
2551
2.95k
    return op;
2552
2.95k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2549
2.56k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.56k
    (void)parentDs;
2551
2.56k
    return op;
2552
2.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2549
2.28k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.28k
    (void)parentDs;
2551
2.28k
    return op;
2552
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2549
1.56k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.56k
    (void)parentDs;
2551
1.56k
    return op;
2552
1.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2549
3.00k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.00k
    (void)parentDs;
2551
3.00k
    return op;
2552
3.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const
Line
Count
Source
2549
2.20k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.20k
    (void)parentDs;
2551
2.20k
    return op;
2552
2.20k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2549
2.39k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.39k
    (void)parentDs;
2551
2.39k
    return op;
2552
2.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2549
2.74k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.74k
    (void)parentDs;
2551
2.74k
    return op;
2552
2.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2549
3.00k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.00k
    (void)parentDs;
2551
3.00k
    return op;
2552
3.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2549
1.93k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.93k
    (void)parentDs;
2551
1.93k
    return op;
2552
1.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const
Line
Count
Source
2549
2.27k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.27k
    (void)parentDs;
2551
2.27k
    return op;
2552
2.27k
}
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.16k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.16k
    (void)parentDs;
2551
3.16k
    return op;
2552
3.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2549
2.04k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.04k
    (void)parentDs;
2551
2.04k
    return op;
2552
2.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2549
1.66k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.66k
    (void)parentDs;
2551
1.66k
    return op;
2552
1.66k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2549
2.02k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.02k
    (void)parentDs;
2551
2.02k
    return op;
2552
2.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2549
2.41k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.41k
    (void)parentDs;
2551
2.41k
    return op;
2552
2.41k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2549
3.11k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.11k
    (void)parentDs;
2551
3.11k
    return op;
2552
3.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2549
8.19k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
8.19k
    (void)parentDs;
2551
8.19k
    return op;
2552
8.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2549
2.32k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.32k
    (void)parentDs;
2551
2.32k
    return op;
2552
2.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2549
2.83k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.83k
    (void)parentDs;
2551
2.83k
    return op;
2552
2.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2549
1.50k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.50k
    (void)parentDs;
2551
1.50k
    return op;
2552
1.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2549
1.65k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.65k
    (void)parentDs;
2551
1.65k
    return op;
2552
1.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2549
2.98k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.98k
    (void)parentDs;
2551
2.98k
    return op;
2552
2.98k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2549
2.50k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.50k
    (void)parentDs;
2551
2.50k
    return op;
2552
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2549
1.97k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.97k
    (void)parentDs;
2551
1.97k
    return op;
2552
1.97k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2549
1.86k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.86k
    (void)parentDs;
2551
1.86k
    return op;
2552
1.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2549
1.93k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.93k
    (void)parentDs;
2551
1.93k
    return op;
2552
1.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2549
2.12k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.12k
    (void)parentDs;
2551
2.12k
    return op;
2552
2.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2549
2.45k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.45k
    (void)parentDs;
2551
2.45k
    return op;
2552
2.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2549
1.94k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.94k
    (void)parentDs;
2551
1.94k
    return op;
2552
1.94k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2549
2.08k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.08k
    (void)parentDs;
2551
2.08k
    return op;
2552
2.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2549
2.22k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.22k
    (void)parentDs;
2551
2.22k
    return op;
2552
2.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2549
2.63k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.63k
    (void)parentDs;
2551
2.63k
    return op;
2552
2.63k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2549
2.48k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.48k
    (void)parentDs;
2551
2.48k
    return op;
2552
2.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2549
2.17k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.17k
    (void)parentDs;
2551
2.17k
    return op;
2552
2.17k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2549
1.31k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.31k
    (void)parentDs;
2551
1.31k
    return op;
2552
1.31k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2549
1.91k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.91k
    (void)parentDs;
2551
1.91k
    return op;
2552
1.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_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::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
Line
Count
Source
2549
1.53k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.53k
    (void)parentDs;
2551
1.53k
    return op;
2552
1.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2549
1.74k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.74k
    (void)parentDs;
2551
1.74k
    return op;
2552
1.74k
}
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.81k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.81k
    (void)parentDs;
2551
1.81k
    return op;
2552
1.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2549
2.50k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.50k
    (void)parentDs;
2551
2.50k
    return op;
2552
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2549
2.04k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.04k
    (void)parentDs;
2551
2.04k
    return op;
2552
2.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2549
2.27k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.27k
    (void)parentDs;
2551
2.27k
    return op;
2552
2.27k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2549
2.13k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.13k
    (void)parentDs;
2551
2.13k
    return op;
2552
2.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2549
1.72k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.72k
    (void)parentDs;
2551
1.72k
    return op;
2552
1.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2549
2.38k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.38k
    (void)parentDs;
2551
2.38k
    return op;
2552
2.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2549
2.11k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.11k
    (void)parentDs;
2551
2.11k
    return op;
2552
2.11k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2549
2.57k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.57k
    (void)parentDs;
2551
2.57k
    return op;
2552
2.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2549
1.72k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.72k
    (void)parentDs;
2551
1.72k
    return op;
2552
1.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const
Line
Count
Source
2549
1.70k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.70k
    (void)parentDs;
2551
1.70k
    return op;
2552
1.70k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2549
1.01k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.01k
    (void)parentDs;
2551
1.01k
    return op;
2552
1.01k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2549
2.23k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.23k
    (void)parentDs;
2551
2.23k
    return op;
2552
2.23k
}
2553
2554
219
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2555
219
    (void)parentDs;
2556
219
    op.modulo = modulo;
2557
219
    return op;
2558
219
}
2559
2560
318
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2561
318
    (void)parentDs;
2562
318
    op.modulo = modulo;
2563
318
    return op;
2564
318
}
2565
2566
212
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2567
212
    (void)parentDs;
2568
212
    op.modulo = modulo;
2569
212
    return op;
2570
212
}
2571
2572
384
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2573
384
    (void)parentDs;
2574
384
    op.modulo = modulo;
2575
384
    return op;
2576
384
}
2577
2578
339
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2579
339
    (void)parentDs;
2580
339
    op.modulo = modulo;
2581
339
    return op;
2582
339
}
2583
2584
377
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2585
377
    (void)parentDs;
2586
377
    op.modulo = modulo;
2587
377
    return op;
2588
377
}
2589
2590
532
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2591
532
    (void)parentDs;
2592
532
    op.modulo = modulo;
2593
532
    return op;
2594
532
}
2595
2596
264
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2597
264
    (void)parentDs;
2598
264
    op.modulo = modulo;
2599
264
    return op;
2600
264
}
2601
2602
455
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2603
455
    (void)parentDs;
2604
455
    op.modulo = modulo;
2605
455
    return op;
2606
455
}
2607
2608
752
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2609
752
    (void)parentDs;
2610
752
    op.modulo = modulo;
2611
752
    return op;
2612
752
}
2613
2614
368
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2615
368
    (void)parentDs;
2616
368
    op.modulo = modulo;
2617
368
    return op;
2618
368
}
2619
2620
391
operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2621
391
    (void)parentDs;
2622
391
    op.modulo = modulo;
2623
391
    return op;
2624
391
}
2625
2626
363
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2627
363
    (void)parentDs;
2628
363
    op.modulo = modulo;
2629
363
    return op;
2630
363
}
2631
2632
222
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2633
222
    (void)parentDs;
2634
222
    op.modulo = modulo;
2635
222
    return op;
2636
222
}
2637
2638
422
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2639
422
    (void)parentDs;
2640
422
    op.modulo = modulo;
2641
422
    return op;
2642
422
}
2643
2644
246
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2645
246
    (void)parentDs;
2646
246
    op.modulo = modulo;
2647
246
    return op;
2648
246
}
2649
2650
275
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2651
275
    (void)parentDs;
2652
275
    op.modulo = modulo;
2653
275
    return op;
2654
275
}
2655
2656
261
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2657
261
    (void)parentDs;
2658
261
    op.modulo = modulo;
2659
261
    return op;
2660
261
}
2661
2662
408
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2663
408
    (void)parentDs;
2664
408
    op.modulo = modulo;
2665
408
    return op;
2666
408
}
2667
2668
254
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2669
254
    (void)parentDs;
2670
254
    op.modulo = modulo;
2671
254
    return op;
2672
254
}
2673
2674
454
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2675
454
    (void)parentDs;
2676
454
    op.modulo = modulo;
2677
454
    return op;
2678
454
}
2679
2680
212
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2681
212
    (void)parentDs;
2682
212
    op.modulo = modulo;
2683
212
    return op;
2684
212
}
2685
2686
template <class ResultType, class OperationType>
2687
247k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
247k
    Datasource ds(data, size);
2689
247k
    if ( parentDs != nullptr ) {
2690
247k
        auto modifier = parentDs->GetData(0);
2691
247k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
247k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
247k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.74k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.74k
    Datasource ds(data, size);
2689
4.74k
    if ( parentDs != nullptr ) {
2690
4.74k
        auto modifier = parentDs->GetData(0);
2691
4.74k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.74k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.46k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.46k
    Datasource ds(data, size);
2689
3.46k
    if ( parentDs != nullptr ) {
2690
3.46k
        auto modifier = parentDs->GetData(0);
2691
3.46k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.46k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.46k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.66k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.66k
    Datasource ds(data, size);
2689
4.66k
    if ( parentDs != nullptr ) {
2690
4.66k
        auto modifier = parentDs->GetData(0);
2691
4.66k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.66k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.23k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.23k
    Datasource ds(data, size);
2689
4.23k
    if ( parentDs != nullptr ) {
2690
4.23k
        auto modifier = parentDs->GetData(0);
2691
4.23k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.23k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
17.3k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
17.3k
    Datasource ds(data, size);
2689
17.3k
    if ( parentDs != nullptr ) {
2690
17.3k
        auto modifier = parentDs->GetData(0);
2691
17.3k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
17.3k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
17.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
11.4k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
11.4k
    Datasource ds(data, size);
2689
11.4k
    if ( parentDs != nullptr ) {
2690
11.4k
        auto modifier = parentDs->GetData(0);
2691
11.4k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
11.4k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
11.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.62k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.62k
    Datasource ds(data, size);
2689
2.62k
    if ( parentDs != nullptr ) {
2690
2.62k
        auto modifier = parentDs->GetData(0);
2691
2.62k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.62k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
6.85k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
6.85k
    Datasource ds(data, size);
2689
6.85k
    if ( parentDs != nullptr ) {
2690
6.85k
        auto modifier = parentDs->GetData(0);
2691
6.85k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
6.85k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
6.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.75k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.75k
    Datasource ds(data, size);
2689
2.75k
    if ( parentDs != nullptr ) {
2690
2.75k
        auto modifier = parentDs->GetData(0);
2691
2.75k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.75k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.51k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.51k
    Datasource ds(data, size);
2689
2.51k
    if ( parentDs != nullptr ) {
2690
2.51k
        auto modifier = parentDs->GetData(0);
2691
2.51k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.51k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.40k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.40k
    Datasource ds(data, size);
2689
2.40k
    if ( parentDs != nullptr ) {
2690
2.40k
        auto modifier = parentDs->GetData(0);
2691
2.40k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.40k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.59k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.59k
    Datasource ds(data, size);
2689
3.59k
    if ( parentDs != nullptr ) {
2690
3.59k
        auto modifier = parentDs->GetData(0);
2691
3.59k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.59k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.59k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.81k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.81k
    Datasource ds(data, size);
2689
2.81k
    if ( parentDs != nullptr ) {
2690
2.81k
        auto modifier = parentDs->GetData(0);
2691
2.81k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.81k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.75k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.75k
    Datasource ds(data, size);
2689
2.75k
    if ( parentDs != nullptr ) {
2690
2.75k
        auto modifier = parentDs->GetData(0);
2691
2.75k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.75k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.58k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.58k
    Datasource ds(data, size);
2689
2.58k
    if ( parentDs != nullptr ) {
2690
2.58k
        auto modifier = parentDs->GetData(0);
2691
2.58k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.58k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.40k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.40k
    Datasource ds(data, size);
2689
2.40k
    if ( parentDs != nullptr ) {
2690
2.40k
        auto modifier = parentDs->GetData(0);
2691
2.40k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.40k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.33k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.33k
    Datasource ds(data, size);
2689
3.33k
    if ( parentDs != nullptr ) {
2690
3.33k
        auto modifier = parentDs->GetData(0);
2691
3.33k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.33k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.33k
}
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
2.56k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.56k
    Datasource ds(data, size);
2689
2.56k
    if ( parentDs != nullptr ) {
2690
2.56k
        auto modifier = parentDs->GetData(0);
2691
2.56k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.56k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.56k
}
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
2.38k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.38k
    Datasource ds(data, size);
2689
2.38k
    if ( parentDs != nullptr ) {
2690
2.38k
        auto modifier = parentDs->GetData(0);
2691
2.38k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.38k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.82k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.82k
    Datasource ds(data, size);
2689
2.82k
    if ( parentDs != nullptr ) {
2690
2.82k
        auto modifier = parentDs->GetData(0);
2691
2.82k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.82k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.82k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.13k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.13k
    Datasource ds(data, size);
2689
2.13k
    if ( parentDs != nullptr ) {
2690
2.13k
        auto modifier = parentDs->GetData(0);
2691
2.13k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.13k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.91k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.91k
    Datasource ds(data, size);
2689
1.91k
    if ( parentDs != nullptr ) {
2690
1.91k
        auto modifier = parentDs->GetData(0);
2691
1.91k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.91k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.47k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.47k
    Datasource ds(data, size);
2689
2.47k
    if ( parentDs != nullptr ) {
2690
2.47k
        auto modifier = parentDs->GetData(0);
2691
2.47k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.47k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.08k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.08k
    Datasource ds(data, size);
2689
3.08k
    if ( parentDs != nullptr ) {
2690
3.08k
        auto modifier = parentDs->GetData(0);
2691
3.08k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.08k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.15k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.15k
    Datasource ds(data, size);
2689
2.15k
    if ( parentDs != nullptr ) {
2690
2.15k
        auto modifier = parentDs->GetData(0);
2691
2.15k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.15k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.20k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.20k
    Datasource ds(data, size);
2689
2.20k
    if ( parentDs != nullptr ) {
2690
2.20k
        auto modifier = parentDs->GetData(0);
2691
2.20k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.20k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.20k
}
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.33k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.33k
    Datasource ds(data, size);
2689
2.33k
    if ( parentDs != nullptr ) {
2690
2.33k
        auto modifier = parentDs->GetData(0);
2691
2.33k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.33k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.33k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.25k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.25k
    Datasource ds(data, size);
2689
2.25k
    if ( parentDs != nullptr ) {
2690
2.25k
        auto modifier = parentDs->GetData(0);
2691
2.25k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.25k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.25k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.13k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.13k
    Datasource ds(data, size);
2689
2.13k
    if ( parentDs != nullptr ) {
2690
2.13k
        auto modifier = parentDs->GetData(0);
2691
2.13k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.13k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.13k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.52k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.52k
    Datasource ds(data, size);
2689
2.52k
    if ( parentDs != nullptr ) {
2690
2.52k
        auto modifier = parentDs->GetData(0);
2691
2.52k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.52k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.52k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.37k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.37k
    Datasource ds(data, size);
2689
2.37k
    if ( parentDs != nullptr ) {
2690
2.37k
        auto modifier = parentDs->GetData(0);
2691
2.37k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.37k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.37k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.34k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.34k
    Datasource ds(data, size);
2689
2.34k
    if ( parentDs != nullptr ) {
2690
2.34k
        auto modifier = parentDs->GetData(0);
2691
2.34k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.34k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.96k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.96k
    Datasource ds(data, size);
2689
2.96k
    if ( parentDs != nullptr ) {
2690
2.96k
        auto modifier = parentDs->GetData(0);
2691
2.96k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.96k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.96k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.58k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.58k
    Datasource ds(data, size);
2689
2.58k
    if ( parentDs != nullptr ) {
2690
2.58k
        auto modifier = parentDs->GetData(0);
2691
2.58k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.58k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.30k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.30k
    Datasource ds(data, size);
2689
2.30k
    if ( parentDs != nullptr ) {
2690
2.30k
        auto modifier = parentDs->GetData(0);
2691
2.30k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.30k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.58k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.58k
    Datasource ds(data, size);
2689
1.58k
    if ( parentDs != nullptr ) {
2690
1.58k
        auto modifier = parentDs->GetData(0);
2691
1.58k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.58k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.03k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.03k
    Datasource ds(data, size);
2689
3.03k
    if ( parentDs != nullptr ) {
2690
3.03k
        auto modifier = parentDs->GetData(0);
2691
3.03k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.03k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.23k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.23k
    Datasource ds(data, size);
2689
2.23k
    if ( parentDs != nullptr ) {
2690
2.23k
        auto modifier = parentDs->GetData(0);
2691
2.23k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.23k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.41k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.41k
    Datasource ds(data, size);
2689
2.41k
    if ( parentDs != nullptr ) {
2690
2.41k
        auto modifier = parentDs->GetData(0);
2691
2.41k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.41k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.41k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.77k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.77k
    Datasource ds(data, size);
2689
2.77k
    if ( parentDs != nullptr ) {
2690
2.77k
        auto modifier = parentDs->GetData(0);
2691
2.77k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.77k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.03k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.03k
    Datasource ds(data, size);
2689
3.03k
    if ( parentDs != nullptr ) {
2690
3.03k
        auto modifier = parentDs->GetData(0);
2691
3.03k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.03k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.95k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.95k
    Datasource ds(data, size);
2689
1.95k
    if ( parentDs != nullptr ) {
2690
1.95k
        auto modifier = parentDs->GetData(0);
2691
1.95k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.95k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.30k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.30k
    Datasource ds(data, size);
2689
2.30k
    if ( parentDs != nullptr ) {
2690
2.30k
        auto modifier = parentDs->GetData(0);
2691
2.30k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.30k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.18k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.18k
    Datasource ds(data, size);
2689
3.18k
    if ( parentDs != nullptr ) {
2690
3.18k
        auto modifier = parentDs->GetData(0);
2691
3.18k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.18k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.06k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.06k
    Datasource ds(data, size);
2689
2.06k
    if ( parentDs != nullptr ) {
2690
2.06k
        auto modifier = parentDs->GetData(0);
2691
2.06k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.06k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.69k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.69k
    Datasource ds(data, size);
2689
1.69k
    if ( parentDs != nullptr ) {
2690
1.69k
        auto modifier = parentDs->GetData(0);
2691
1.69k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.69k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.69k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.04k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.04k
    Datasource ds(data, size);
2689
2.04k
    if ( parentDs != nullptr ) {
2690
2.04k
        auto modifier = parentDs->GetData(0);
2691
2.04k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.04k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.43k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.43k
    Datasource ds(data, size);
2689
2.43k
    if ( parentDs != nullptr ) {
2690
2.43k
        auto modifier = parentDs->GetData(0);
2691
2.43k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.43k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.14k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.14k
    Datasource ds(data, size);
2689
3.14k
    if ( parentDs != nullptr ) {
2690
3.14k
        auto modifier = parentDs->GetData(0);
2691
3.14k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.14k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
15.9k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
15.9k
    Datasource ds(data, size);
2689
15.9k
    if ( parentDs != nullptr ) {
2690
15.9k
        auto modifier = parentDs->GetData(0);
2691
15.9k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
15.9k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
15.9k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.35k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.35k
    Datasource ds(data, size);
2689
2.35k
    if ( parentDs != nullptr ) {
2690
2.35k
        auto modifier = parentDs->GetData(0);
2691
2.35k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.35k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.35k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.87k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.87k
    Datasource ds(data, size);
2689
2.87k
    if ( parentDs != nullptr ) {
2690
2.87k
        auto modifier = parentDs->GetData(0);
2691
2.87k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.87k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.51k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.51k
    Datasource ds(data, size);
2689
1.51k
    if ( parentDs != nullptr ) {
2690
1.51k
        auto modifier = parentDs->GetData(0);
2691
1.51k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.51k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.67k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.67k
    Datasource ds(data, size);
2689
1.67k
    if ( parentDs != nullptr ) {
2690
1.67k
        auto modifier = parentDs->GetData(0);
2691
1.67k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.67k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.03k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.03k
    Datasource ds(data, size);
2689
3.03k
    if ( parentDs != nullptr ) {
2690
3.03k
        auto modifier = parentDs->GetData(0);
2691
3.03k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.03k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.03k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.53k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.53k
    Datasource ds(data, size);
2689
2.53k
    if ( parentDs != nullptr ) {
2690
2.53k
        auto modifier = parentDs->GetData(0);
2691
2.53k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.53k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::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<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.93k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.93k
    Datasource ds(data, size);
2689
1.93k
    if ( parentDs != nullptr ) {
2690
1.93k
        auto modifier = parentDs->GetData(0);
2691
1.93k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.93k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.99k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.99k
    Datasource ds(data, size);
2689
1.99k
    if ( parentDs != nullptr ) {
2690
1.99k
        auto modifier = parentDs->GetData(0);
2691
1.99k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.99k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.14k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.14k
    Datasource ds(data, size);
2689
2.14k
    if ( parentDs != nullptr ) {
2690
2.14k
        auto modifier = parentDs->GetData(0);
2691
2.14k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.14k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.48k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.48k
    Datasource ds(data, size);
2689
2.48k
    if ( parentDs != nullptr ) {
2690
2.48k
        auto modifier = parentDs->GetData(0);
2691
2.48k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.48k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.96k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.96k
    Datasource ds(data, size);
2689
1.96k
    if ( parentDs != nullptr ) {
2690
1.96k
        auto modifier = parentDs->GetData(0);
2691
1.96k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.96k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.12k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.12k
    Datasource ds(data, size);
2689
2.12k
    if ( parentDs != nullptr ) {
2690
2.12k
        auto modifier = parentDs->GetData(0);
2691
2.12k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.12k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.24k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.24k
    Datasource ds(data, size);
2689
2.24k
    if ( parentDs != nullptr ) {
2690
2.24k
        auto modifier = parentDs->GetData(0);
2691
2.24k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.24k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.65k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.65k
    Datasource ds(data, size);
2689
2.65k
    if ( parentDs != nullptr ) {
2690
2.65k
        auto modifier = parentDs->GetData(0);
2691
2.65k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.65k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.50k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.50k
    Datasource ds(data, size);
2689
2.50k
    if ( parentDs != nullptr ) {
2690
2.50k
        auto modifier = parentDs->GetData(0);
2691
2.50k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.50k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.19k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.19k
    Datasource ds(data, size);
2689
2.19k
    if ( parentDs != nullptr ) {
2690
2.19k
        auto modifier = parentDs->GetData(0);
2691
2.19k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.19k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.19k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.33k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.33k
    Datasource ds(data, size);
2689
1.33k
    if ( parentDs != nullptr ) {
2690
1.33k
        auto modifier = parentDs->GetData(0);
2691
1.33k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.33k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.33k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.93k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.93k
    Datasource ds(data, size);
2689
1.93k
    if ( parentDs != nullptr ) {
2690
1.93k
        auto modifier = parentDs->GetData(0);
2691
1.93k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.93k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.21k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.21k
    Datasource ds(data, size);
2689
2.21k
    if ( parentDs != nullptr ) {
2690
2.21k
        auto modifier = parentDs->GetData(0);
2691
2.21k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.21k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.21k
}
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.55k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.55k
    Datasource ds(data, size);
2689
1.55k
    if ( parentDs != nullptr ) {
2690
1.55k
        auto modifier = parentDs->GetData(0);
2691
1.55k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.55k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.76k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.76k
    Datasource ds(data, size);
2689
1.76k
    if ( parentDs != nullptr ) {
2690
1.76k
        auto modifier = parentDs->GetData(0);
2691
1.76k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.76k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.83k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.83k
    Datasource ds(data, size);
2689
1.83k
    if ( parentDs != nullptr ) {
2690
1.83k
        auto modifier = parentDs->GetData(0);
2691
1.83k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.83k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.53k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.53k
    Datasource ds(data, size);
2689
2.53k
    if ( parentDs != nullptr ) {
2690
2.53k
        auto modifier = parentDs->GetData(0);
2691
2.53k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.53k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.06k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.06k
    Datasource ds(data, size);
2689
2.06k
    if ( parentDs != nullptr ) {
2690
2.06k
        auto modifier = parentDs->GetData(0);
2691
2.06k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.06k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.29k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.29k
    Datasource ds(data, size);
2689
2.29k
    if ( parentDs != nullptr ) {
2690
2.29k
        auto modifier = parentDs->GetData(0);
2691
2.29k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.29k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.29k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.16k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.16k
    Datasource ds(data, size);
2689
2.16k
    if ( parentDs != nullptr ) {
2690
2.16k
        auto modifier = parentDs->GetData(0);
2691
2.16k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.16k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::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::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.41k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.41k
    Datasource ds(data, size);
2689
2.41k
    if ( parentDs != nullptr ) {
2690
2.41k
        auto modifier = parentDs->GetData(0);
2691
2.41k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.41k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.41k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.13k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.13k
    Datasource ds(data, size);
2689
2.13k
    if ( parentDs != nullptr ) {
2690
2.13k
        auto modifier = parentDs->GetData(0);
2691
2.13k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.13k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.13k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.60k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.60k
    Datasource ds(data, size);
2689
2.60k
    if ( parentDs != nullptr ) {
2690
2.60k
        auto modifier = parentDs->GetData(0);
2691
2.60k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.60k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.76k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.76k
    Datasource ds(data, size);
2689
1.76k
    if ( parentDs != nullptr ) {
2690
1.76k
        auto modifier = parentDs->GetData(0);
2691
1.76k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.76k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.76k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.76k
    Datasource ds(data, size);
2689
1.76k
    if ( parentDs != nullptr ) {
2690
1.76k
        auto modifier = parentDs->GetData(0);
2691
1.76k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.76k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.02k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.02k
    Datasource ds(data, size);
2689
1.02k
    if ( parentDs != nullptr ) {
2690
1.02k
        auto modifier = parentDs->GetData(0);
2691
1.02k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.02k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.02k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.26k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.26k
    Datasource ds(data, size);
2689
2.26k
    if ( parentDs != nullptr ) {
2690
2.26k
        auto modifier = parentDs->GetData(0);
2691
2.26k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.26k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.26k
}
2696
2697
template <class ResultType, class OperationType>
2698
245k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
245k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
245k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
245k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
245k
    if ( modules.find(moduleID) == modules.end() ) {
2712
179k
        return nullptr;
2713
179k
    }
2714
2715
65.4k
    return modules.at(moduleID);
2716
245k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.71k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.71k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.71k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.71k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.71k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.45k
        return nullptr;
2713
1.45k
    }
2714
2715
3.26k
    return modules.at(moduleID);
2716
4.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.43k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.43k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.43k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.43k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.43k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.00k
        return nullptr;
2713
2.00k
    }
2714
2715
1.42k
    return modules.at(moduleID);
2716
3.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.63k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.63k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.63k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.63k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.63k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.10k
        return nullptr;
2713
2.10k
    }
2714
2715
2.53k
    return modules.at(moduleID);
2716
4.63k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.22k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.22k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.22k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.22k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.22k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.83k
        return nullptr;
2713
1.83k
    }
2714
2715
2.38k
    return modules.at(moduleID);
2716
4.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
17.3k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
17.3k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
17.3k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
17.3k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
17.3k
    if ( modules.find(moduleID) == modules.end() ) {
2712
6.29k
        return nullptr;
2713
6.29k
    }
2714
2715
11.0k
    return modules.at(moduleID);
2716
17.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
11.3k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
11.3k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
11.3k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
11.3k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
11.3k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.07k
        return nullptr;
2713
4.07k
    }
2714
2715
7.30k
    return modules.at(moduleID);
2716
11.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.60k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.60k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.60k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.60k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.60k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.80k
        return nullptr;
2713
1.80k
    }
2714
2715
799
    return modules.at(moduleID);
2716
2.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
6.82k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
6.82k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
6.82k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
6.82k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
6.82k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.67k
        return nullptr;
2713
2.67k
    }
2714
2715
4.15k
    return modules.at(moduleID);
2716
6.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.72k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.72k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.72k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.72k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.72k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.14k
        return nullptr;
2713
2.14k
    }
2714
2715
577
    return modules.at(moduleID);
2716
2.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.49k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.49k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.49k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.49k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.49k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.00k
        return nullptr;
2713
2.00k
    }
2714
2715
490
    return modules.at(moduleID);
2716
2.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.37k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.37k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.37k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.37k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.37k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.97k
        return nullptr;
2713
1.97k
    }
2714
2715
404
    return modules.at(moduleID);
2716
2.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.57k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.57k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.57k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.57k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.57k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.07k
        return nullptr;
2713
2.07k
    }
2714
2715
1.49k
    return modules.at(moduleID);
2716
3.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.79k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.79k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.79k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.79k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.79k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.39k
        return nullptr;
2713
2.39k
    }
2714
2715
399
    return modules.at(moduleID);
2716
2.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.72k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.72k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.72k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.72k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.72k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.34k
        return nullptr;
2713
2.34k
    }
2714
2715
377
    return modules.at(moduleID);
2716
2.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.55k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.55k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.55k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.55k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.55k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.03k
        return nullptr;
2713
2.03k
    }
2714
2715
520
    return modules.at(moduleID);
2716
2.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.38k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.38k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.38k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.38k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.38k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.28k
        return nullptr;
2713
2.28k
    }
2714
2715
92
    return modules.at(moduleID);
2716
2.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.31k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.31k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.31k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.31k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.31k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.86k
        return nullptr;
2713
1.86k
    }
2714
2715
1.44k
    return modules.at(moduleID);
2716
3.31k
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.52k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.52k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.52k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.52k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.52k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.92k
        return nullptr;
2713
1.92k
    }
2714
2715
599
    return modules.at(moduleID);
2716
2.52k
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.36k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.36k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.36k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.36k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.36k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.86k
        return nullptr;
2713
1.86k
    }
2714
2715
496
    return modules.at(moduleID);
2716
2.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.80k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.80k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.80k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.80k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.80k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.72k
        return nullptr;
2713
1.72k
    }
2714
2715
1.07k
    return modules.at(moduleID);
2716
2.80k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.11k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.11k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.11k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.11k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.11k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.59k
        return nullptr;
2713
1.59k
    }
2714
2715
517
    return modules.at(moduleID);
2716
2.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.89k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.89k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.89k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.89k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.89k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.18k
        return nullptr;
2713
1.18k
    }
2714
2715
711
    return modules.at(moduleID);
2716
1.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.45k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.45k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.45k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.45k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.45k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.30k
        return nullptr;
2713
2.30k
    }
2714
2715
152
    return modules.at(moduleID);
2716
2.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::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
0
        moduleID = *options.forceModule;
2704
0
    }
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
2.08k
        return nullptr;
2713
2.08k
    }
2714
2715
977
    return modules.at(moduleID);
2716
3.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.13k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.13k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.13k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.13k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.13k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.94k
        return nullptr;
2713
1.94k
    }
2714
2715
189
    return modules.at(moduleID);
2716
2.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::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
0
        moduleID = *options.forceModule;
2704
0
    }
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
2.02k
        return nullptr;
2713
2.02k
    }
2714
2715
163
    return modules.at(moduleID);
2716
2.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.31k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.31k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.31k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.31k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.31k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.15k
        return nullptr;
2713
2.15k
    }
2714
2715
161
    return modules.at(moduleID);
2716
2.31k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.22k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.22k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.22k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.22k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.22k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.08k
        return nullptr;
2713
2.08k
    }
2714
2715
141
    return modules.at(moduleID);
2716
2.22k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.11k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.11k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.11k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.11k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.11k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.49k
        return nullptr;
2713
1.49k
    }
2714
2715
618
    return modules.at(moduleID);
2716
2.11k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.49k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.49k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.49k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.49k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.49k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.14k
        return nullptr;
2713
2.14k
    }
2714
2715
347
    return modules.at(moduleID);
2716
2.49k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.35k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.35k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.35k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.35k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.35k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.18k
        return nullptr;
2713
2.18k
    }
2714
2715
174
    return modules.at(moduleID);
2716
2.35k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.32k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.32k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.32k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.32k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.32k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.14k
        return nullptr;
2713
2.14k
    }
2714
2715
176
    return modules.at(moduleID);
2716
2.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.95k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.95k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.95k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.95k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.95k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.16k
        return nullptr;
2713
2.16k
    }
2714
2715
786
    return modules.at(moduleID);
2716
2.95k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.56k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.56k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.56k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.56k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.56k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.07k
        return nullptr;
2713
2.07k
    }
2714
2715
485
    return modules.at(moduleID);
2716
2.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.28k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.28k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.28k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.28k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.28k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.08k
        return nullptr;
2713
2.08k
    }
2714
2715
192
    return modules.at(moduleID);
2716
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.56k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.56k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.56k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.56k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.56k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.41k
        return nullptr;
2713
1.41k
    }
2714
2715
142
    return modules.at(moduleID);
2716
1.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.00k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.00k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.00k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.00k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.00k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.84k
        return nullptr;
2713
2.84k
    }
2714
2715
165
    return modules.at(moduleID);
2716
3.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.20k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.20k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.20k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.20k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.20k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.06k
        return nullptr;
2713
2.06k
    }
2714
2715
142
    return modules.at(moduleID);
2716
2.20k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.39k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.39k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.39k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.39k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.39k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.26k
        return nullptr;
2713
2.26k
    }
2714
2715
128
    return modules.at(moduleID);
2716
2.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.74k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.74k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.74k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.74k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.74k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.58k
        return nullptr;
2713
2.58k
    }
2714
2715
169
    return modules.at(moduleID);
2716
2.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.00k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.00k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.00k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.00k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.00k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.82k
        return nullptr;
2713
2.82k
    }
2714
2715
180
    return modules.at(moduleID);
2716
3.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.93k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.93k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.93k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.93k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.93k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.67k
        return nullptr;
2713
1.67k
    }
2714
2715
263
    return modules.at(moduleID);
2716
1.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.27k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.27k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.27k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.27k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.27k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.04k
        return nullptr;
2713
2.04k
    }
2714
2715
233
    return modules.at(moduleID);
2716
2.27k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.16k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.16k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.16k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.16k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.16k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.10k
        return nullptr;
2713
2.10k
    }
2714
2715
1.05k
    return modules.at(moduleID);
2716
3.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.04k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.04k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.04k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.04k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.04k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.83k
        return nullptr;
2713
1.83k
    }
2714
2715
209
    return modules.at(moduleID);
2716
2.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.66k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.66k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.66k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.66k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.66k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.45k
        return nullptr;
2713
1.45k
    }
2714
2715
216
    return modules.at(moduleID);
2716
1.66k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.02k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.02k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.02k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.02k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.02k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.80k
        return nullptr;
2713
1.80k
    }
2714
2715
223
    return modules.at(moduleID);
2716
2.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.41k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.41k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.41k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.41k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.41k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.26k
        return nullptr;
2713
2.26k
    }
2714
2715
152
    return modules.at(moduleID);
2716
2.41k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.11k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.11k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.11k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.11k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.11k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.66k
        return nullptr;
2713
2.66k
    }
2714
2715
450
    return modules.at(moduleID);
2716
3.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
15.9k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
15.9k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
15.9k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
15.9k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
15.9k
    if ( modules.find(moduleID) == modules.end() ) {
2712
7.58k
        return nullptr;
2713
7.58k
    }
2714
2715
8.33k
    return modules.at(moduleID);
2716
15.9k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.32k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.32k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.32k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.32k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.32k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.09k
        return nullptr;
2713
2.09k
    }
2714
2715
231
    return modules.at(moduleID);
2716
2.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.83k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.83k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.83k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.83k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.83k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.28k
        return nullptr;
2713
2.28k
    }
2714
2715
548
    return modules.at(moduleID);
2716
2.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.50k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.50k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.50k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.50k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.50k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.36k
        return nullptr;
2713
1.36k
    }
2714
2715
140
    return modules.at(moduleID);
2716
1.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.65k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.65k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.65k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.65k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.65k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.44k
        return nullptr;
2713
1.44k
    }
2714
2715
208
    return modules.at(moduleID);
2716
1.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.98k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.98k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.98k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.98k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.98k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.78k
        return nullptr;
2713
2.78k
    }
2714
2715
201
    return modules.at(moduleID);
2716
2.98k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.50k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.50k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.50k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.50k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.50k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.39k
        return nullptr;
2713
2.39k
    }
2714
2715
112
    return modules.at(moduleID);
2716
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.97k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.97k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.97k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.97k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.97k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.76k
        return nullptr;
2713
1.76k
    }
2714
2715
214
    return modules.at(moduleID);
2716
1.97k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.86k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.86k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.86k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.86k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.86k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.69k
        return nullptr;
2713
1.69k
    }
2714
2715
177
    return modules.at(moduleID);
2716
1.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.93k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.93k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.93k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.93k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.93k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.73k
        return nullptr;
2713
1.73k
    }
2714
2715
201
    return modules.at(moduleID);
2716
1.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.12k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.12k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.12k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.12k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.12k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.97k
        return nullptr;
2713
1.97k
    }
2714
2715
147
    return modules.at(moduleID);
2716
2.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.45k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.45k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.45k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.45k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.45k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.28k
        return nullptr;
2713
2.28k
    }
2714
2715
174
    return modules.at(moduleID);
2716
2.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.94k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.94k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.94k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.94k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.94k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.76k
        return nullptr;
2713
1.76k
    }
2714
2715
181
    return modules.at(moduleID);
2716
1.94k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.08k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.08k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.08k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.08k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.08k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.88k
        return nullptr;
2713
1.88k
    }
2714
2715
199
    return modules.at(moduleID);
2716
2.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.22k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.22k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.22k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.22k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.22k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.05k
        return nullptr;
2713
2.05k
    }
2714
2715
173
    return modules.at(moduleID);
2716
2.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.63k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.63k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.63k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.63k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.63k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.46k
        return nullptr;
2713
2.46k
    }
2714
2715
164
    return modules.at(moduleID);
2716
2.63k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.48k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.48k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.48k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.48k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.48k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.35k
        return nullptr;
2713
2.35k
    }
2714
2715
132
    return modules.at(moduleID);
2716
2.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.17k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.17k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.17k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.17k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.17k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.98k
        return nullptr;
2713
1.98k
    }
2714
2715
185
    return modules.at(moduleID);
2716
2.17k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.31k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.31k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.31k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.31k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.31k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.15k
        return nullptr;
2713
1.15k
    }
2714
2715
156
    return modules.at(moduleID);
2716
1.31k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.91k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.91k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.91k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.91k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.91k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.72k
        return nullptr;
2713
1.72k
    }
2714
2715
186
    return modules.at(moduleID);
2716
1.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_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
0
        moduleID = *options.forceModule;
2704
0
    }
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
2.00k
        return nullptr;
2713
2.00k
    }
2714
2715
175
    return modules.at(moduleID);
2716
2.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.53k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.53k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.53k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.53k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.53k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.36k
        return nullptr;
2713
1.36k
    }
2714
2715
165
    return modules.at(moduleID);
2716
1.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.74k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.74k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.74k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.74k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.74k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.59k
        return nullptr;
2713
1.59k
    }
2714
2715
157
    return modules.at(moduleID);
2716
1.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.81k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.81k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.81k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.81k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.81k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.66k
        return nullptr;
2713
1.66k
    }
2714
2715
144
    return modules.at(moduleID);
2716
1.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.50k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.50k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.50k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.50k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.50k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.32k
        return nullptr;
2713
2.32k
    }
2714
2715
181
    return modules.at(moduleID);
2716
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.04k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.04k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.04k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.04k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.04k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.83k
        return nullptr;
2713
1.83k
    }
2714
2715
205
    return modules.at(moduleID);
2716
2.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.27k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.27k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.27k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.27k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.27k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.13k
        return nullptr;
2713
2.13k
    }
2714
2715
134
    return modules.at(moduleID);
2716
2.27k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.13k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.13k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.13k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.13k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.13k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.96k
        return nullptr;
2713
1.96k
    }
2714
2715
173
    return modules.at(moduleID);
2716
2.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.72k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.72k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.72k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.72k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.72k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.54k
        return nullptr;
2713
1.54k
    }
2714
2715
176
    return modules.at(moduleID);
2716
1.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.38k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.38k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.38k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.38k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.38k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.14k
        return nullptr;
2713
2.14k
    }
2714
2715
243
    return modules.at(moduleID);
2716
2.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.11k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.11k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.11k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.11k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.11k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.94k
        return nullptr;
2713
1.94k
    }
2714
2715
172
    return modules.at(moduleID);
2716
2.11k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.57k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.57k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.57k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.57k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.57k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.29k
        return nullptr;
2713
2.29k
    }
2714
2715
284
    return modules.at(moduleID);
2716
2.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.72k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.72k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.72k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.72k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.72k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.53k
        return nullptr;
2713
1.53k
    }
2714
2715
190
    return modules.at(moduleID);
2716
1.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.70k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.70k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.70k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.70k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.70k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.50k
        return nullptr;
2713
1.50k
    }
2714
2715
196
    return modules.at(moduleID);
2716
1.70k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.01k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.01k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.01k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.01k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.01k
    if ( modules.find(moduleID) == modules.end() ) {
2712
884
        return nullptr;
2713
884
    }
2714
2715
130
    return modules.at(moduleID);
2716
1.01k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.23k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.23k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.23k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.23k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.23k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.02k
        return nullptr;
2713
2.02k
    }
2714
2715
209
    return modules.at(moduleID);
2716
2.23k
}
2717
2718
template <class ResultType, class OperationType>
2719
31.8k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
31.8k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
31.8k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
247k
    do {
2725
247k
        auto op = getOp(&parentDs, data, size);
2726
247k
        auto module = getModule(parentDs);
2727
247k
        if ( module == nullptr ) {
2728
179k
            continue;
2729
179k
        }
2730
2731
67.6k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
67.6k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
836
            break;
2736
836
        }
2737
246k
    } while ( parentDs.Get<bool>() == true );
2738
2739
31.8k
    if ( operations.empty() == true ) {
2740
1.19k
        return;
2741
1.19k
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
30.6k
#if 1
2745
30.6k
    {
2746
30.6k
        std::set<uint64_t> moduleIDs;
2747
48.4k
        for (const auto& m : modules ) {
2748
48.4k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
48.4k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
48.4k
            moduleIDs.insert(moduleID);
2756
48.4k
        }
2757
2758
30.6k
        std::set<uint64_t> operationModuleIDs;
2759
58.8k
        for (const auto& op : operations) {
2760
58.8k
            operationModuleIDs.insert(op.first->ID);
2761
58.8k
        }
2762
2763
30.6k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
30.6k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
30.6k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
30.6k
        for (const auto& id : addModuleIDs) {
2768
22.9k
            operations.push_back({ modules.at(id), operations[0].second});
2769
22.9k
        }
2770
30.6k
    }
2771
30.6k
#endif
2772
2773
30.6k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
30.6k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
112k
    for (size_t i = 0; i < operations.size(); i++) {
2781
81.7k
        auto& operation = operations[i];
2782
2783
81.7k
        auto& module = operation.first;
2784
81.7k
        auto& op = operation.second;
2785
2786
81.7k
        if ( i > 0 ) {
2787
57.5k
            auto& prevModule = operations[i-1].first;
2788
57.5k
            auto& prevOp = operations[i].second;
2789
2790
57.5k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
31.9k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
31.9k
                if ( curModifier.size() == 0 ) {
2793
11.7M
                    for (size_t j = 0; j < 512; j++) {
2794
11.6M
                        curModifier.push_back(1);
2795
11.6M
                    }
2796
22.8k
                } else {
2797
254k
                    for (auto& c : curModifier) {
2798
254k
                        c++;
2799
254k
                    }
2800
9.18k
                }
2801
31.9k
            }
2802
57.5k
        }
2803
2804
81.7k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
81.7k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
81.7k
        const auto& result = results.back();
2811
2812
81.7k
        if ( result.second != std::nullopt ) {
2813
22.9k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
22.9k
        }
2820
2821
81.7k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
81.7k
        if ( options.disableTests == false ) {
2830
81.7k
            tests::test(op, result.second);
2831
81.7k
        }
2832
2833
81.7k
        postprocess(module, op, result);
2834
81.7k
    }
2835
2836
30.6k
    if ( options.noCompare == false ) {
2837
24.2k
        compare(operations, results, data, size);
2838
24.2k
    }
2839
30.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.90k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.90k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.90k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.74k
    do {
2725
4.74k
        auto op = getOp(&parentDs, data, size);
2726
4.74k
        auto module = getModule(parentDs);
2727
4.74k
        if ( module == nullptr ) {
2728
1.45k
            continue;
2729
1.45k
        }
2730
2731
3.28k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.28k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
4.73k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.90k
    if ( operations.empty() == true ) {
2740
16
        return;
2741
16
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.89k
#if 1
2745
1.89k
    {
2746
1.89k
        std::set<uint64_t> moduleIDs;
2747
3.61k
        for (const auto& m : modules ) {
2748
3.61k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.61k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.61k
            moduleIDs.insert(moduleID);
2756
3.61k
        }
2757
2758
1.89k
        std::set<uint64_t> operationModuleIDs;
2759
3.17k
        for (const auto& op : operations) {
2760
3.17k
            operationModuleIDs.insert(op.first->ID);
2761
3.17k
        }
2762
2763
1.89k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.89k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.89k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.89k
        for (const auto& id : addModuleIDs) {
2768
1.77k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.77k
        }
2770
1.89k
    }
2771
1.89k
#endif
2772
2773
1.89k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.89k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
6.84k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.95k
        auto& operation = operations[i];
2782
2783
4.95k
        auto& module = operation.first;
2784
4.95k
        auto& op = operation.second;
2785
2786
4.95k
        if ( i > 0 ) {
2787
3.14k
            auto& prevModule = operations[i-1].first;
2788
3.14k
            auto& prevOp = operations[i].second;
2789
2790
3.14k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.27k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.27k
                if ( curModifier.size() == 0 ) {
2793
523k
                    for (size_t j = 0; j < 512; j++) {
2794
522k
                        curModifier.push_back(1);
2795
522k
                    }
2796
1.02k
                } else {
2797
3.58k
                    for (auto& c : curModifier) {
2798
3.58k
                        c++;
2799
3.58k
                    }
2800
253
                }
2801
1.27k
            }
2802
3.14k
        }
2803
2804
4.95k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.95k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.95k
        const auto& result = results.back();
2811
2812
4.95k
        if ( result.second != std::nullopt ) {
2813
2.17k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.17k
        }
2820
2821
4.95k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
4.95k
        if ( options.disableTests == false ) {
2830
4.95k
            tests::test(op, result.second);
2831
4.95k
        }
2832
2833
4.95k
        postprocess(module, op, result);
2834
4.95k
    }
2835
2836
1.89k
    if ( options.noCompare == false ) {
2837
1.80k
        compare(operations, results, data, size);
2838
1.80k
    }
2839
1.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
487
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
487
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
487
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.46k
    do {
2725
3.46k
        auto op = getOp(&parentDs, data, size);
2726
3.46k
        auto module = getModule(parentDs);
2727
3.46k
        if ( module == nullptr ) {
2728
2.00k
            continue;
2729
2.00k
        }
2730
2731
1.45k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.45k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
3.46k
    } while ( parentDs.Get<bool>() == true );
2738
2739
487
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
476
#if 1
2745
476
    {
2746
476
        std::set<uint64_t> moduleIDs;
2747
826
        for (const auto& m : modules ) {
2748
826
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
826
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
826
            moduleIDs.insert(moduleID);
2756
826
        }
2757
2758
476
        std::set<uint64_t> operationModuleIDs;
2759
1.36k
        for (const auto& op : operations) {
2760
1.36k
            operationModuleIDs.insert(op.first->ID);
2761
1.36k
        }
2762
2763
476
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
476
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
476
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
476
        for (const auto& id : addModuleIDs) {
2768
391
            operations.push_back({ modules.at(id), operations[0].second});
2769
391
        }
2770
476
    }
2771
476
#endif
2772
2773
476
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
476
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.23k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.75k
        auto& operation = operations[i];
2782
2783
1.75k
        auto& module = operation.first;
2784
1.75k
        auto& op = operation.second;
2785
2786
1.75k
        if ( i > 0 ) {
2787
1.34k
            auto& prevModule = operations[i-1].first;
2788
1.34k
            auto& prevOp = operations[i].second;
2789
2790
1.34k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
894
                auto& curModifier = op.modifier.GetVectorPtr();
2792
894
                if ( curModifier.size() == 0 ) {
2793
361k
                    for (size_t j = 0; j < 512; j++) {
2794
360k
                        curModifier.push_back(1);
2795
360k
                    }
2796
704
                } else {
2797
2.74k
                    for (auto& c : curModifier) {
2798
2.74k
                        c++;
2799
2.74k
                    }
2800
190
                }
2801
894
            }
2802
1.34k
        }
2803
2804
1.75k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.75k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.75k
        const auto& result = results.back();
2811
2812
1.75k
        if ( result.second != std::nullopt ) {
2813
1.16k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.16k
        }
2820
2821
1.75k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.75k
        if ( options.disableTests == false ) {
2830
1.75k
            tests::test(op, result.second);
2831
1.75k
        }
2832
2833
1.75k
        postprocess(module, op, result);
2834
1.75k
    }
2835
2836
476
    if ( options.noCompare == false ) {
2837
413
        compare(operations, results, data, size);
2838
413
    }
2839
476
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
548
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
548
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
548
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.66k
    do {
2725
4.66k
        auto op = getOp(&parentDs, data, size);
2726
4.66k
        auto module = getModule(parentDs);
2727
4.66k
        if ( module == nullptr ) {
2728
2.10k
            continue;
2729
2.10k
        }
2730
2731
2.56k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.56k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
4.65k
    } while ( parentDs.Get<bool>() == true );
2738
2739
548
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
538
#if 1
2745
538
    {
2746
538
        std::set<uint64_t> moduleIDs;
2747
934
        for (const auto& m : modules ) {
2748
934
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
934
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
934
            moduleIDs.insert(moduleID);
2756
934
        }
2757
2758
538
        std::set<uint64_t> operationModuleIDs;
2759
2.35k
        for (const auto& op : operations) {
2760
2.35k
            operationModuleIDs.insert(op.first->ID);
2761
2.35k
        }
2762
2763
538
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
538
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
538
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
538
        for (const auto& id : addModuleIDs) {
2768
449
            operations.push_back({ modules.at(id), operations[0].second});
2769
449
        }
2770
538
    }
2771
538
#endif
2772
2773
538
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
538
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.34k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.80k
        auto& operation = operations[i];
2782
2783
2.80k
        auto& module = operation.first;
2784
2.80k
        auto& op = operation.second;
2785
2786
2.80k
        if ( i > 0 ) {
2787
2.33k
            auto& prevModule = operations[i-1].first;
2788
2.33k
            auto& prevOp = operations[i].second;
2789
2790
2.33k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.84k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.84k
                if ( curModifier.size() == 0 ) {
2793
800k
                    for (size_t j = 0; j < 512; j++) {
2794
798k
                        curModifier.push_back(1);
2795
798k
                    }
2796
1.56k
                } else {
2797
3.92k
                    for (auto& c : curModifier) {
2798
3.92k
                        c++;
2799
3.92k
                    }
2800
289
                }
2801
1.84k
            }
2802
2.33k
        }
2803
2804
2.80k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.80k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.80k
        const auto& result = results.back();
2811
2812
2.80k
        if ( result.second != std::nullopt ) {
2813
1.38k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.38k
        }
2820
2821
2.80k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2.80k
        if ( options.disableTests == false ) {
2830
2.80k
            tests::test(op, result.second);
2831
2.80k
        }
2832
2833
2.80k
        postprocess(module, op, result);
2834
2.80k
    }
2835
2836
538
    if ( options.noCompare == false ) {
2837
467
        compare(operations, results, data, size);
2838
467
    }
2839
538
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
875
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
875
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
875
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.23k
    do {
2725
4.23k
        auto op = getOp(&parentDs, data, size);
2726
4.23k
        auto module = getModule(parentDs);
2727
4.23k
        if ( module == nullptr ) {
2728
1.83k
            continue;
2729
1.83k
        }
2730
2731
2.40k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.40k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
4.23k
    } while ( parentDs.Get<bool>() == true );
2738
2739
875
    if ( operations.empty() == true ) {
2740
23
        return;
2741
23
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
852
#if 1
2745
852
    {
2746
852
        std::set<uint64_t> moduleIDs;
2747
1.58k
        for (const auto& m : modules ) {
2748
1.58k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.58k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.58k
            moduleIDs.insert(moduleID);
2756
1.58k
        }
2757
2758
852
        std::set<uint64_t> operationModuleIDs;
2759
2.24k
        for (const auto& op : operations) {
2760
2.24k
            operationModuleIDs.insert(op.first->ID);
2761
2.24k
        }
2762
2763
852
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
852
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
852
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
852
        for (const auto& id : addModuleIDs) {
2768
757
            operations.push_back({ modules.at(id), operations[0].second});
2769
757
        }
2770
852
    }
2771
852
#endif
2772
2773
852
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
852
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.85k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.00k
        auto& operation = operations[i];
2782
2783
3.00k
        auto& module = operation.first;
2784
3.00k
        auto& op = operation.second;
2785
2786
3.00k
        if ( i > 0 ) {
2787
2.21k
            auto& prevModule = operations[i-1].first;
2788
2.21k
            auto& prevOp = operations[i].second;
2789
2790
2.21k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.37k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.37k
                if ( curModifier.size() == 0 ) {
2793
521k
                    for (size_t j = 0; j < 512; j++) {
2794
520k
                        curModifier.push_back(1);
2795
520k
                    }
2796
1.01k
                } else {
2797
3.78k
                    for (auto& c : curModifier) {
2798
3.78k
                        c++;
2799
3.78k
                    }
2800
361
                }
2801
1.37k
            }
2802
2.21k
        }
2803
2804
3.00k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.00k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.00k
        const auto& result = results.back();
2811
2812
3.00k
        if ( result.second != std::nullopt ) {
2813
1.29k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.29k
        }
2820
2821
3.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
3.00k
        if ( options.disableTests == false ) {
2830
3.00k
            tests::test(op, result.second);
2831
3.00k
        }
2832
2833
3.00k
        postprocess(module, op, result);
2834
3.00k
    }
2835
2836
852
    if ( options.noCompare == false ) {
2837
791
        compare(operations, results, data, size);
2838
791
    }
2839
852
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.50k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.50k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.50k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
17.3k
    do {
2725
17.3k
        auto op = getOp(&parentDs, data, size);
2726
17.3k
        auto module = getModule(parentDs);
2727
17.3k
        if ( module == nullptr ) {
2728
6.29k
            continue;
2729
6.29k
        }
2730
2731
11.0k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
11.0k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
17.3k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.50k
    if ( operations.empty() == true ) {
2740
22
        return;
2741
22
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.48k
#if 1
2745
3.48k
    {
2746
3.48k
        std::set<uint64_t> moduleIDs;
2747
6.81k
        for (const auto& m : modules ) {
2748
6.81k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
6.81k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
6.81k
            moduleIDs.insert(moduleID);
2756
6.81k
        }
2757
2758
3.48k
        std::set<uint64_t> operationModuleIDs;
2759
10.8k
        for (const auto& op : operations) {
2760
10.8k
            operationModuleIDs.insert(op.first->ID);
2761
10.8k
        }
2762
2763
3.48k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.48k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.48k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.48k
        for (const auto& id : addModuleIDs) {
2768
3.33k
            operations.push_back({ modules.at(id), operations[0].second});
2769
3.33k
        }
2770
3.48k
    }
2771
3.48k
#endif
2772
2773
3.48k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.48k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
17.6k
    for (size_t i = 0; i < operations.size(); i++) {
2781
14.1k
        auto& operation = operations[i];
2782
2783
14.1k
        auto& module = operation.first;
2784
14.1k
        auto& op = operation.second;
2785
2786
14.1k
        if ( i > 0 ) {
2787
10.7k
            auto& prevModule = operations[i-1].first;
2788
10.7k
            auto& prevOp = operations[i].second;
2789
2790
10.7k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
7.22k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
7.22k
                if ( curModifier.size() == 0 ) {
2793
2.87M
                    for (size_t j = 0; j < 512; j++) {
2794
2.86M
                        curModifier.push_back(1);
2795
2.86M
                    }
2796
5.59k
                } else {
2797
32.3k
                    for (auto& c : curModifier) {
2798
32.3k
                        c++;
2799
32.3k
                    }
2800
1.62k
                }
2801
7.22k
            }
2802
10.7k
        }
2803
2804
14.1k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
14.1k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
14.1k
        const auto& result = results.back();
2811
2812
14.1k
        if ( result.second != std::nullopt ) {
2813
4.52k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
4.52k
        }
2820
2821
14.1k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.1k
        if ( options.disableTests == false ) {
2830
14.1k
            tests::test(op, result.second);
2831
14.1k
        }
2832
2833
14.1k
        postprocess(module, op, result);
2834
14.1k
    }
2835
2836
3.48k
    if ( options.noCompare == false ) {
2837
3.40k
        compare(operations, results, data, size);
2838
3.40k
    }
2839
3.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.16k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.16k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.16k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
11.4k
    do {
2725
11.4k
        auto op = getOp(&parentDs, data, size);
2726
11.4k
        auto module = getModule(parentDs);
2727
11.4k
        if ( module == nullptr ) {
2728
4.07k
            continue;
2729
4.07k
        }
2730
2731
7.32k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
7.32k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
11.3k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.16k
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.14k
#if 1
2745
2.14k
    {
2746
2.14k
        std::set<uint64_t> moduleIDs;
2747
4.12k
        for (const auto& m : modules ) {
2748
4.12k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4.12k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4.12k
            moduleIDs.insert(moduleID);
2756
4.12k
        }
2757
2758
2.14k
        std::set<uint64_t> operationModuleIDs;
2759
7.10k
        for (const auto& op : operations) {
2760
7.10k
            operationModuleIDs.insert(op.first->ID);
2761
7.10k
        }
2762
2763
2.14k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.14k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.14k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.14k
        for (const auto& id : addModuleIDs) {
2768
2.00k
            operations.push_back({ modules.at(id), operations[0].second});
2769
2.00k
        }
2770
2.14k
    }
2771
2.14k
#endif
2772
2773
2.14k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.14k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
11.2k
    for (size_t i = 0; i < operations.size(); i++) {
2781
9.11k
        auto& operation = operations[i];
2782
2783
9.11k
        auto& module = operation.first;
2784
9.11k
        auto& op = operation.second;
2785
2786
9.11k
        if ( i > 0 ) {
2787
7.04k
            auto& prevModule = operations[i-1].first;
2788
7.04k
            auto& prevOp = operations[i].second;
2789
2790
7.04k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
4.92k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
4.92k
                if ( curModifier.size() == 0 ) {
2793
1.90M
                    for (size_t j = 0; j < 512; j++) {
2794
1.90M
                        curModifier.push_back(1);
2795
1.90M
                    }
2796
3.72k
                } else {
2797
16.0k
                    for (auto& c : curModifier) {
2798
16.0k
                        c++;
2799
16.0k
                    }
2800
1.20k
                }
2801
4.92k
            }
2802
7.04k
        }
2803
2804
9.11k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
9.11k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
9.11k
        const auto& result = results.back();
2811
2812
9.11k
        if ( result.second != std::nullopt ) {
2813
626
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
626
        }
2820
2821
9.11k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
9.11k
        if ( options.disableTests == false ) {
2830
9.11k
            tests::test(op, result.second);
2831
9.11k
        }
2832
2833
9.11k
        postprocess(module, op, result);
2834
9.11k
    }
2835
2836
2.14k
    if ( options.noCompare == false ) {
2837
2.06k
        compare(operations, results, data, size);
2838
2.06k
    }
2839
2.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
205
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
205
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
205
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.62k
    do {
2725
2.62k
        auto op = getOp(&parentDs, data, size);
2726
2.62k
        auto module = getModule(parentDs);
2727
2.62k
        if ( module == nullptr ) {
2728
1.80k
            continue;
2729
1.80k
        }
2730
2731
823
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
823
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
2.62k
    } while ( parentDs.Get<bool>() == true );
2738
2739
205
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
190
#if 1
2745
190
    {
2746
190
        std::set<uint64_t> moduleIDs;
2747
272
        for (const auto& m : modules ) {
2748
272
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
272
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
272
            moduleIDs.insert(moduleID);
2756
272
        }
2757
2758
190
        std::set<uint64_t> operationModuleIDs;
2759
655
        for (const auto& op : operations) {
2760
655
            operationModuleIDs.insert(op.first->ID);
2761
655
        }
2762
2763
190
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
190
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
190
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
190
        for (const auto& id : addModuleIDs) {
2768
118
            operations.push_back({ modules.at(id), operations[0].second});
2769
118
        }
2770
190
    }
2771
190
#endif
2772
2773
190
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
190
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
963
    for (size_t i = 0; i < operations.size(); i++) {
2781
773
        auto& operation = operations[i];
2782
2783
773
        auto& module = operation.first;
2784
773
        auto& op = operation.second;
2785
2786
773
        if ( i > 0 ) {
2787
637
            auto& prevModule = operations[i-1].first;
2788
637
            auto& prevOp = operations[i].second;
2789
2790
637
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
447
                auto& curModifier = op.modifier.GetVectorPtr();
2792
447
                if ( curModifier.size() == 0 ) {
2793
173k
                    for (size_t j = 0; j < 512; j++) {
2794
173k
                        curModifier.push_back(1);
2795
173k
                    }
2796
339
                } else {
2797
1.01k
                    for (auto& c : curModifier) {
2798
1.01k
                        c++;
2799
1.01k
                    }
2800
108
                }
2801
447
            }
2802
637
        }
2803
2804
773
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
773
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
773
        const auto& result = results.back();
2811
2812
773
        if ( result.second != std::nullopt ) {
2813
268
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
268
        }
2820
2821
773
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
773
        if ( options.disableTests == false ) {
2830
773
            tests::test(op, result.second);
2831
773
        }
2832
2833
773
        postprocess(module, op, result);
2834
773
    }
2835
2836
190
    if ( options.noCompare == false ) {
2837
136
        compare(operations, results, data, size);
2838
136
    }
2839
190
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.65k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.65k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.65k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
6.85k
    do {
2725
6.85k
        auto op = getOp(&parentDs, data, size);
2726
6.85k
        auto module = getModule(parentDs);
2727
6.85k
        if ( module == nullptr ) {
2728
2.67k
            continue;
2729
2.67k
        }
2730
2731
4.18k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.18k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
6.84k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.65k
    if ( operations.empty() == true ) {
2740
48
        return;
2741
48
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.60k
#if 1
2745
1.60k
    {
2746
1.60k
        std::set<uint64_t> moduleIDs;
2747
2.98k
        for (const auto& m : modules ) {
2748
2.98k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.98k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.98k
            moduleIDs.insert(moduleID);
2756
2.98k
        }
2757
2758
1.60k
        std::set<uint64_t> operationModuleIDs;
2759
3.98k
        for (const auto& op : operations) {
2760
3.98k
            operationModuleIDs.insert(op.first->ID);
2761
3.98k
        }
2762
2763
1.60k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.60k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.60k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.60k
        for (const auto& id : addModuleIDs) {
2768
1.45k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.45k
        }
2770
1.60k
    }
2771
1.60k
#endif
2772
2773
1.60k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.60k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
7.04k
    for (size_t i = 0; i < operations.size(); i++) {
2781
5.43k
        auto& operation = operations[i];
2782
2783
5.43k
        auto& module = operation.first;
2784
5.43k
        auto& op = operation.second;
2785
2786
5.43k
        if ( i > 0 ) {
2787
3.94k
            auto& prevModule = operations[i-1].first;
2788
3.94k
            auto& prevOp = operations[i].second;
2789
2790
3.94k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2.36k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2.36k
                if ( curModifier.size() == 0 ) {
2793
954k
                    for (size_t j = 0; j < 512; j++) {
2794
952k
                        curModifier.push_back(1);
2795
952k
                    }
2796
1.86k
                } else {
2797
1.18k
                    for (auto& c : curModifier) {
2798
1.18k
                        c++;
2799
1.18k
                    }
2800
503
                }
2801
2.36k
            }
2802
3.94k
        }
2803
2804
5.43k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5.43k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5.43k
        const auto& result = results.back();
2811
2812
5.43k
        if ( result.second != std::nullopt ) {
2813
2.71k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.71k
        }
2820
2821
5.43k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.43k
        if ( options.disableTests == false ) {
2830
5.43k
            tests::test(op, result.second);
2831
5.43k
        }
2832
2833
5.43k
        postprocess(module, op, result);
2834
5.43k
    }
2835
2836
1.60k
    if ( options.noCompare == false ) {
2837
1.49k
        compare(operations, results, data, size);
2838
1.49k
    }
2839
1.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
189
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
189
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
189
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.75k
    do {
2725
2.75k
        auto op = getOp(&parentDs, data, size);
2726
2.75k
        auto module = getModule(parentDs);
2727
2.75k
        if ( module == nullptr ) {
2728
2.14k
            continue;
2729
2.14k
        }
2730
2731
605
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
605
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
2.75k
    } while ( parentDs.Get<bool>() == true );
2738
2739
189
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
171
#if 1
2745
171
    {
2746
171
        std::set<uint64_t> moduleIDs;
2747
192
        for (const auto& m : modules ) {
2748
192
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
192
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
192
            moduleIDs.insert(moduleID);
2756
192
        }
2757
2758
171
        std::set<uint64_t> operationModuleIDs;
2759
358
        for (const auto& op : operations) {
2760
358
            operationModuleIDs.insert(op.first->ID);
2761
358
        }
2762
2763
171
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
171
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
171
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
171
        for (const auto& id : addModuleIDs) {
2768
79
            operations.push_back({ modules.at(id), operations[0].second});
2769
79
        }
2770
171
    }
2771
171
#endif
2772
2773
171
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
171
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
608
    for (size_t i = 0; i < operations.size(); i++) {
2781
437
        auto& operation = operations[i];
2782
2783
437
        auto& module = operation.first;
2784
437
        auto& op = operation.second;
2785
2786
437
        if ( i > 0 ) {
2787
341
            auto& prevModule = operations[i-1].first;
2788
341
            auto& prevOp = operations[i].second;
2789
2790
341
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
161
                auto& curModifier = op.modifier.GetVectorPtr();
2792
161
                if ( curModifier.size() == 0 ) {
2793
45.1k
                    for (size_t j = 0; j < 512; j++) {
2794
45.0k
                        curModifier.push_back(1);
2795
45.0k
                    }
2796
88
                } else {
2797
362
                    for (auto& c : curModifier) {
2798
362
                        c++;
2799
362
                    }
2800
73
                }
2801
161
            }
2802
341
        }
2803
2804
437
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
437
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
437
        const auto& result = results.back();
2811
2812
437
        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
437
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
437
        if ( options.disableTests == false ) {
2830
437
            tests::test(op, result.second);
2831
437
        }
2832
2833
437
        postprocess(module, op, result);
2834
437
    }
2835
2836
171
    if ( options.noCompare == false ) {
2837
96
        compare(operations, results, data, size);
2838
96
    }
2839
171
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
115
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
115
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
115
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.51k
    do {
2725
2.51k
        auto op = getOp(&parentDs, data, size);
2726
2.51k
        auto module = getModule(parentDs);
2727
2.51k
        if ( module == nullptr ) {
2728
2.00k
            continue;
2729
2.00k
        }
2730
2731
509
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
509
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
2.51k
    } while ( parentDs.Get<bool>() == true );
2738
2739
115
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
107
#if 1
2745
107
    {
2746
107
        std::set<uint64_t> moduleIDs;
2747
112
        for (const auto& m : modules ) {
2748
112
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
112
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
112
            moduleIDs.insert(moduleID);
2756
112
        }
2757
2758
107
        std::set<uint64_t> operationModuleIDs;
2759
395
        for (const auto& op : operations) {
2760
395
            operationModuleIDs.insert(op.first->ID);
2761
395
        }
2762
2763
107
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
107
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
107
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
107
        for (const auto& id : addModuleIDs) {
2768
30
            operations.push_back({ modules.at(id), operations[0].second});
2769
30
        }
2770
107
    }
2771
107
#endif
2772
2773
107
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
107
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
532
    for (size_t i = 0; i < operations.size(); i++) {
2781
425
        auto& operation = operations[i];
2782
2783
425
        auto& module = operation.first;
2784
425
        auto& op = operation.second;
2785
2786
425
        if ( i > 0 ) {
2787
369
            auto& prevModule = operations[i-1].first;
2788
369
            auto& prevOp = operations[i].second;
2789
2790
369
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
226
                auto& curModifier = op.modifier.GetVectorPtr();
2792
226
                if ( curModifier.size() == 0 ) {
2793
58.9k
                    for (size_t j = 0; j < 512; j++) {
2794
58.8k
                        curModifier.push_back(1);
2795
58.8k
                    }
2796
115
                } else {
2797
416
                    for (auto& c : curModifier) {
2798
416
                        c++;
2799
416
                    }
2800
111
                }
2801
226
            }
2802
369
        }
2803
2804
425
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
425
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
425
        const auto& result = results.back();
2811
2812
425
        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
425
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
425
        if ( options.disableTests == false ) {
2830
425
            tests::test(op, result.second);
2831
425
        }
2832
2833
425
        postprocess(module, op, result);
2834
425
    }
2835
2836
107
    if ( options.noCompare == false ) {
2837
56
        compare(operations, results, data, size);
2838
56
    }
2839
107
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
145
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
145
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
145
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.40k
    do {
2725
2.40k
        auto op = getOp(&parentDs, data, size);
2726
2.40k
        auto module = getModule(parentDs);
2727
2.40k
        if ( module == nullptr ) {
2728
1.97k
            continue;
2729
1.97k
        }
2730
2731
430
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
430
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
2.39k
    } while ( parentDs.Get<bool>() == true );
2738
2739
145
    if ( operations.empty() == true ) {
2740
19
        return;
2741
19
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
126
#if 1
2745
126
    {
2746
126
        std::set<uint64_t> moduleIDs;
2747
126
        for (const auto& m : modules ) {
2748
110
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
110
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
110
            moduleIDs.insert(moduleID);
2756
110
        }
2757
2758
126
        std::set<uint64_t> operationModuleIDs;
2759
322
        for (const auto& op : operations) {
2760
322
            operationModuleIDs.insert(op.first->ID);
2761
322
        }
2762
2763
126
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
126
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
126
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
126
        for (const auto& id : addModuleIDs) {
2768
36
            operations.push_back({ modules.at(id), operations[0].second});
2769
36
        }
2770
126
    }
2771
126
#endif
2772
2773
126
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
126
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
484
    for (size_t i = 0; i < operations.size(); i++) {
2781
358
        auto& operation = operations[i];
2782
2783
358
        auto& module = operation.first;
2784
358
        auto& op = operation.second;
2785
2786
358
        if ( i > 0 ) {
2787
303
            auto& prevModule = operations[i-1].first;
2788
303
            auto& prevOp = operations[i].second;
2789
2790
303
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
207
                auto& curModifier = op.modifier.GetVectorPtr();
2792
207
                if ( curModifier.size() == 0 ) {
2793
37.9k
                    for (size_t j = 0; j < 512; j++) {
2794
37.8k
                        curModifier.push_back(1);
2795
37.8k
                    }
2796
133
                } else {
2797
529
                    for (auto& c : curModifier) {
2798
529
                        c++;
2799
529
                    }
2800
133
                }
2801
207
            }
2802
303
        }
2803
2804
358
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
358
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
358
        const auto& result = results.back();
2811
2812
358
        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
358
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
358
        if ( options.disableTests == false ) {
2830
358
            tests::test(op, result.second);
2831
358
        }
2832
2833
358
        postprocess(module, op, result);
2834
358
    }
2835
2836
126
    if ( options.noCompare == false ) {
2837
55
        compare(operations, results, data, size);
2838
55
    }
2839
126
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
612
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
612
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
612
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.59k
    do {
2725
3.59k
        auto op = getOp(&parentDs, data, size);
2726
3.59k
        auto module = getModule(parentDs);
2727
3.59k
        if ( module == nullptr ) {
2728
2.07k
            continue;
2729
2.07k
        }
2730
2731
1.51k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.51k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
3.58k
    } while ( parentDs.Get<bool>() == true );
2738
2739
612
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
600
#if 1
2745
600
    {
2746
600
        std::set<uint64_t> moduleIDs;
2747
1.09k
        for (const auto& m : modules ) {
2748
1.09k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.09k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.09k
            moduleIDs.insert(moduleID);
2756
1.09k
        }
2757
2758
600
        std::set<uint64_t> operationModuleIDs;
2759
1.37k
        for (const auto& op : operations) {
2760
1.37k
            operationModuleIDs.insert(op.first->ID);
2761
1.37k
        }
2762
2763
600
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
600
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
600
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
600
        for (const auto& id : addModuleIDs) {
2768
523
            operations.push_back({ modules.at(id), operations[0].second});
2769
523
        }
2770
600
    }
2771
600
#endif
2772
2773
600
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
600
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.49k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.89k
        auto& operation = operations[i];
2782
2783
1.89k
        auto& module = operation.first;
2784
1.89k
        auto& op = operation.second;
2785
2786
1.89k
        if ( i > 0 ) {
2787
1.35k
            auto& prevModule = operations[i-1].first;
2788
1.35k
            auto& prevOp = operations[i].second;
2789
2790
1.35k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
792
                auto& curModifier = op.modifier.GetVectorPtr();
2792
792
                if ( curModifier.size() == 0 ) {
2793
317k
                    for (size_t j = 0; j < 512; j++) {
2794
316k
                        curModifier.push_back(1);
2795
316k
                    }
2796
618
                } else {
2797
22.4k
                    for (auto& c : curModifier) {
2798
22.4k
                        c++;
2799
22.4k
                    }
2800
174
                }
2801
792
            }
2802
1.35k
        }
2803
2804
1.89k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.89k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.89k
        const auto& result = results.back();
2811
2812
1.89k
        if ( result.second != std::nullopt ) {
2813
859
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
859
        }
2820
2821
1.89k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.89k
        if ( options.disableTests == false ) {
2830
1.89k
            tests::test(op, result.second);
2831
1.89k
        }
2832
2833
1.89k
        postprocess(module, op, result);
2834
1.89k
    }
2835
2836
600
    if ( options.noCompare == false ) {
2837
545
        compare(operations, results, data, size);
2838
545
    }
2839
600
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
331
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
331
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
331
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.81k
    do {
2725
2.81k
        auto op = getOp(&parentDs, data, size);
2726
2.81k
        auto module = getModule(parentDs);
2727
2.81k
        if ( module == nullptr ) {
2728
2.39k
            continue;
2729
2.39k
        }
2730
2731
418
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
418
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
48
            break;
2736
48
        }
2737
2.76k
    } while ( parentDs.Get<bool>() == true );
2738
2739
331
    if ( operations.empty() == true ) {
2740
28
        return;
2741
28
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
303
#if 1
2745
303
    {
2746
303
        std::set<uint64_t> moduleIDs;
2747
474
        for (const auto& m : modules ) {
2748
474
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
474
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
474
            moduleIDs.insert(moduleID);
2756
474
        }
2757
2758
303
        std::set<uint64_t> operationModuleIDs;
2759
358
        for (const auto& op : operations) {
2760
358
            operationModuleIDs.insert(op.first->ID);
2761
358
        }
2762
2763
303
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
303
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
303
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
303
        for (const auto& id : addModuleIDs) {
2768
230
            operations.push_back({ modules.at(id), operations[0].second});
2769
230
        }
2770
303
    }
2771
303
#endif
2772
2773
303
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
303
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
891
    for (size_t i = 0; i < operations.size(); i++) {
2781
588
        auto& operation = operations[i];
2782
2783
588
        auto& module = operation.first;
2784
588
        auto& op = operation.second;
2785
2786
588
        if ( i > 0 ) {
2787
351
            auto& prevModule = operations[i-1].first;
2788
351
            auto& prevOp = operations[i].second;
2789
2790
351
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
113
                auto& curModifier = op.modifier.GetVectorPtr();
2792
113
                if ( curModifier.size() == 0 ) {
2793
46.6k
                    for (size_t j = 0; j < 512; j++) {
2794
46.5k
                        curModifier.push_back(1);
2795
46.5k
                    }
2796
91
                } else {
2797
290
                    for (auto& c : curModifier) {
2798
290
                        c++;
2799
290
                    }
2800
22
                }
2801
113
            }
2802
351
        }
2803
2804
588
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
588
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
588
        const auto& result = results.back();
2811
2812
588
        if ( result.second != std::nullopt ) {
2813
268
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
268
        }
2820
2821
588
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
588
        if ( options.disableTests == false ) {
2830
588
            tests::test(op, result.second);
2831
588
        }
2832
2833
588
        postprocess(module, op, result);
2834
588
    }
2835
2836
303
    if ( options.noCompare == false ) {
2837
237
        compare(operations, results, data, size);
2838
237
    }
2839
303
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
115
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
115
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
115
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.75k
    do {
2725
2.75k
        auto op = getOp(&parentDs, data, size);
2726
2.75k
        auto module = getModule(parentDs);
2727
2.75k
        if ( module == nullptr ) {
2728
2.34k
            continue;
2729
2.34k
        }
2730
2731
406
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
406
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
2.75k
    } while ( parentDs.Get<bool>() == true );
2738
2739
115
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
107
#if 1
2745
107
    {
2746
107
        std::set<uint64_t> moduleIDs;
2747
107
        for (const auto& m : modules ) {
2748
86
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
86
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
86
            moduleIDs.insert(moduleID);
2756
86
        }
2757
2758
107
        std::set<uint64_t> operationModuleIDs;
2759
264
        for (const auto& op : operations) {
2760
264
            operationModuleIDs.insert(op.first->ID);
2761
264
        }
2762
2763
107
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
107
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
107
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
107
        for (const auto& id : addModuleIDs) {
2768
28
            operations.push_back({ modules.at(id), operations[0].second});
2769
28
        }
2770
107
    }
2771
107
#endif
2772
2773
107
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
107
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
399
    for (size_t i = 0; i < operations.size(); i++) {
2781
292
        auto& operation = operations[i];
2782
2783
292
        auto& module = operation.first;
2784
292
        auto& op = operation.second;
2785
2786
292
        if ( i > 0 ) {
2787
249
            auto& prevModule = operations[i-1].first;
2788
249
            auto& prevOp = operations[i].second;
2789
2790
249
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
190
                auto& curModifier = op.modifier.GetVectorPtr();
2792
190
                if ( curModifier.size() == 0 ) {
2793
73.8k
                    for (size_t j = 0; j < 512; j++) {
2794
73.7k
                        curModifier.push_back(1);
2795
73.7k
                    }
2796
144
                } else {
2797
435
                    for (auto& c : curModifier) {
2798
435
                        c++;
2799
435
                    }
2800
46
                }
2801
190
            }
2802
249
        }
2803
2804
292
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
292
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
292
        const auto& result = results.back();
2811
2812
292
        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
292
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
292
        if ( options.disableTests == false ) {
2830
292
            tests::test(op, result.second);
2831
292
        }
2832
2833
292
        postprocess(module, op, result);
2834
292
    }
2835
2836
107
    if ( options.noCompare == false ) {
2837
43
        compare(operations, results, data, size);
2838
43
    }
2839
107
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
122
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
122
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
122
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.58k
    do {
2725
2.58k
        auto op = getOp(&parentDs, data, size);
2726
2.58k
        auto module = getModule(parentDs);
2727
2.58k
        if ( module == nullptr ) {
2728
2.03k
            continue;
2729
2.03k
        }
2730
2731
542
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
542
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
2.57k
    } while ( parentDs.Get<bool>() == true );
2738
2739
122
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
114
#if 1
2745
114
    {
2746
114
        std::set<uint64_t> moduleIDs;
2747
114
        for (const auto& m : modules ) {
2748
114
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
114
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
114
            moduleIDs.insert(moduleID);
2756
114
        }
2757
2758
114
        std::set<uint64_t> operationModuleIDs;
2759
390
        for (const auto& op : operations) {
2760
390
            operationModuleIDs.insert(op.first->ID);
2761
390
        }
2762
2763
114
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
114
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
114
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
114
        for (const auto& id : addModuleIDs) {
2768
37
            operations.push_back({ modules.at(id), operations[0].second});
2769
37
        }
2770
114
    }
2771
114
#endif
2772
2773
114
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
114
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
541
    for (size_t i = 0; i < operations.size(); i++) {
2781
427
        auto& operation = operations[i];
2782
2783
427
        auto& module = operation.first;
2784
427
        auto& op = operation.second;
2785
2786
427
        if ( i > 0 ) {
2787
370
            auto& prevModule = operations[i-1].first;
2788
370
            auto& prevOp = operations[i].second;
2789
2790
370
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
284
                auto& curModifier = op.modifier.GetVectorPtr();
2792
284
                if ( curModifier.size() == 0 ) {
2793
68.2k
                    for (size_t j = 0; j < 512; j++) {
2794
68.0k
                        curModifier.push_back(1);
2795
68.0k
                    }
2796
151
                } else {
2797
573
                    for (auto& c : curModifier) {
2798
573
                        c++;
2799
573
                    }
2800
151
                }
2801
284
            }
2802
370
        }
2803
2804
427
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
427
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
427
        const auto& result = results.back();
2811
2812
427
        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
427
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
427
        if ( options.disableTests == false ) {
2830
427
            tests::test(op, result.second);
2831
427
        }
2832
2833
427
        postprocess(module, op, result);
2834
427
    }
2835
2836
114
    if ( options.noCompare == false ) {
2837
57
        compare(operations, results, data, size);
2838
57
    }
2839
114
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
118
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
118
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
118
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.40k
    do {
2725
2.40k
        auto op = getOp(&parentDs, data, size);
2726
2.40k
        auto module = getModule(parentDs);
2727
2.40k
        if ( module == nullptr ) {
2728
2.28k
            continue;
2729
2.28k
        }
2730
2731
114
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
114
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
2.38k
    } while ( parentDs.Get<bool>() == true );
2738
2739
118
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
109
#if 1
2745
109
    {
2746
109
        std::set<uint64_t> moduleIDs;
2747
109
        for (const auto& m : modules ) {
2748
98
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
98
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
98
            moduleIDs.insert(moduleID);
2756
98
        }
2757
2758
109
        std::set<uint64_t> operationModuleIDs;
2759
109
        for (const auto& op : operations) {
2760
64
            operationModuleIDs.insert(op.first->ID);
2761
64
        }
2762
2763
109
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
109
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
109
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
109
        for (const auto& id : addModuleIDs) {
2768
46
            operations.push_back({ modules.at(id), operations[0].second});
2769
46
        }
2770
109
    }
2771
109
#endif
2772
2773
109
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
109
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
219
    for (size_t i = 0; i < operations.size(); i++) {
2781
110
        auto& operation = operations[i];
2782
2783
110
        auto& module = operation.first;
2784
110
        auto& op = operation.second;
2785
2786
110
        if ( i > 0 ) {
2787
61
            auto& prevModule = operations[i-1].first;
2788
61
            auto& prevOp = operations[i].second;
2789
2790
61
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
12
                auto& curModifier = op.modifier.GetVectorPtr();
2792
12
                if ( curModifier.size() == 0 ) {
2793
2.56k
                    for (size_t j = 0; j < 512; j++) {
2794
2.56k
                        curModifier.push_back(1);
2795
2.56k
                    }
2796
7
                } else {
2797
153
                    for (auto& c : curModifier) {
2798
153
                        c++;
2799
153
                    }
2800
7
                }
2801
12
            }
2802
61
        }
2803
2804
110
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
110
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
110
        const auto& result = results.back();
2811
2812
110
        if ( result.second != std::nullopt ) {
2813
35
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
35
        }
2820
2821
110
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
110
        if ( options.disableTests == false ) {
2830
110
            tests::test(op, result.second);
2831
110
        }
2832
2833
110
        postprocess(module, op, result);
2834
110
    }
2835
2836
109
    if ( options.noCompare == false ) {
2837
49
        compare(operations, results, data, size);
2838
49
    }
2839
109
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
454
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
454
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
454
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.33k
    do {
2725
3.33k
        auto op = getOp(&parentDs, data, size);
2726
3.33k
        auto module = getModule(parentDs);
2727
3.33k
        if ( module == nullptr ) {
2728
1.86k
            continue;
2729
1.86k
        }
2730
2731
1.47k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.47k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
3.33k
    } while ( parentDs.Get<bool>() == true );
2738
2739
454
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
440
#if 1
2745
440
    {
2746
440
        std::set<uint64_t> moduleIDs;
2747
754
        for (const auto& m : modules ) {
2748
754
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
754
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
754
            moduleIDs.insert(moduleID);
2756
754
        }
2757
2758
440
        std::set<uint64_t> operationModuleIDs;
2759
1.32k
        for (const auto& op : operations) {
2760
1.32k
            operationModuleIDs.insert(op.first->ID);
2761
1.32k
        }
2762
2763
440
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
440
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
440
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
440
        for (const auto& id : addModuleIDs) {
2768
354
            operations.push_back({ modules.at(id), operations[0].second});
2769
354
        }
2770
440
    }
2771
440
#endif
2772
2773
440
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
440
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.11k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.67k
        auto& operation = operations[i];
2782
2783
1.67k
        auto& module = operation.first;
2784
1.67k
        auto& op = operation.second;
2785
2786
1.67k
        if ( i > 0 ) {
2787
1.29k
            auto& prevModule = operations[i-1].first;
2788
1.29k
            auto& prevOp = operations[i].second;
2789
2790
1.29k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
886
                auto& curModifier = op.modifier.GetVectorPtr();
2792
886
                if ( curModifier.size() == 0 ) {
2793
340k
                    for (size_t j = 0; j < 512; j++) {
2794
339k
                        curModifier.push_back(1);
2795
339k
                    }
2796
663
                } else {
2797
667
                    for (auto& c : curModifier) {
2798
667
                        c++;
2799
667
                    }
2800
223
                }
2801
886
            }
2802
1.29k
        }
2803
2804
1.67k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.67k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.67k
        const auto& result = results.back();
2811
2812
1.67k
        if ( result.second != std::nullopt ) {
2813
795
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
795
        }
2820
2821
1.67k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.67k
        if ( options.disableTests == false ) {
2830
1.67k
            tests::test(op, result.second);
2831
1.67k
        }
2832
2833
1.67k
        postprocess(module, op, result);
2834
1.67k
    }
2835
2836
440
    if ( options.noCompare == false ) {
2837
377
        compare(operations, results, data, size);
2838
377
    }
2839
440
}
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
150
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
150
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
150
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.56k
    do {
2725
2.56k
        auto op = getOp(&parentDs, data, size);
2726
2.56k
        auto module = getModule(parentDs);
2727
2.56k
        if ( module == nullptr ) {
2728
1.92k
            continue;
2729
1.92k
        }
2730
2731
631
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
631
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
2.55k
    } while ( parentDs.Get<bool>() == true );
2738
2739
150
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
140
#if 1
2745
140
    {
2746
140
        std::set<uint64_t> moduleIDs;
2747
140
        for (const auto& m : modules ) {
2748
126
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
126
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
126
            moduleIDs.insert(moduleID);
2756
126
        }
2757
2758
140
        std::set<uint64_t> operationModuleIDs;
2759
393
        for (const auto& op : operations) {
2760
393
            operationModuleIDs.insert(op.first->ID);
2761
393
        }
2762
2763
140
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
140
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
140
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
140
        for (const auto& id : addModuleIDs) {
2768
35
            operations.push_back({ modules.at(id), operations[0].second});
2769
35
        }
2770
140
    }
2771
140
#endif
2772
2773
140
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
140
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
568
    for (size_t i = 0; i < operations.size(); i++) {
2781
428
        auto& operation = operations[i];
2782
2783
428
        auto& module = operation.first;
2784
428
        auto& op = operation.second;
2785
2786
428
        if ( i > 0 ) {
2787
365
            auto& prevModule = operations[i-1].first;
2788
365
            auto& prevOp = operations[i].second;
2789
2790
365
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
239
                auto& curModifier = op.modifier.GetVectorPtr();
2792
239
                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
140
                } else {
2797
740
                    for (auto& c : curModifier) {
2798
740
                        c++;
2799
740
                    }
2800
140
                }
2801
239
            }
2802
365
        }
2803
2804
428
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
428
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
428
        const auto& result = results.back();
2811
2812
428
        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
428
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
428
        if ( options.disableTests == false ) {
2830
428
            tests::test(op, result.second);
2831
428
        }
2832
2833
428
        postprocess(module, op, result);
2834
428
    }
2835
2836
140
    if ( options.noCompare == false ) {
2837
63
        compare(operations, results, data, size);
2838
63
    }
2839
140
}
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
122
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
122
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
122
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.38k
    do {
2725
2.38k
        auto op = getOp(&parentDs, data, size);
2726
2.38k
        auto module = getModule(parentDs);
2727
2.38k
        if ( module == nullptr ) {
2728
1.86k
            continue;
2729
1.86k
        }
2730
2731
515
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
515
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
2.38k
    } while ( parentDs.Get<bool>() == true );
2738
2739
122
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
114
#if 1
2745
114
    {
2746
114
        std::set<uint64_t> moduleIDs;
2747
114
        for (const auto& m : modules ) {
2748
100
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
100
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
100
            moduleIDs.insert(moduleID);
2756
100
        }
2757
2758
114
        std::set<uint64_t> operationModuleIDs;
2759
344
        for (const auto& op : operations) {
2760
344
            operationModuleIDs.insert(op.first->ID);
2761
344
        }
2762
2763
114
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
114
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
114
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
114
        for (const auto& id : addModuleIDs) {
2768
30
            operations.push_back({ modules.at(id), operations[0].second});
2769
30
        }
2770
114
    }
2771
114
#endif
2772
2773
114
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
114
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
488
    for (size_t i = 0; i < operations.size(); i++) {
2781
374
        auto& operation = operations[i];
2782
2783
374
        auto& module = operation.first;
2784
374
        auto& op = operation.second;
2785
2786
374
        if ( i > 0 ) {
2787
324
            auto& prevModule = operations[i-1].first;
2788
324
            auto& prevOp = operations[i].second;
2789
2790
324
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
252
                auto& curModifier = op.modifier.GetVectorPtr();
2792
252
                if ( curModifier.size() == 0 ) {
2793
85.1k
                    for (size_t j = 0; j < 512; j++) {
2794
84.9k
                        curModifier.push_back(1);
2795
84.9k
                    }
2796
166
                } else {
2797
397
                    for (auto& c : curModifier) {
2798
397
                        c++;
2799
397
                    }
2800
86
                }
2801
252
            }
2802
324
        }
2803
2804
374
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
374
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
374
        const auto& result = results.back();
2811
2812
374
        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
374
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
374
        if ( options.disableTests == false ) {
2830
374
            tests::test(op, result.second);
2831
374
        }
2832
2833
374
        postprocess(module, op, result);
2834
374
    }
2835
2836
114
    if ( options.noCompare == false ) {
2837
50
        compare(operations, results, data, size);
2838
50
    }
2839
114
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
659
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
659
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
659
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.82k
    do {
2725
2.82k
        auto op = getOp(&parentDs, data, size);
2726
2.82k
        auto module = getModule(parentDs);
2727
2.82k
        if ( module == nullptr ) {
2728
1.72k
            continue;
2729
1.72k
        }
2730
2731
1.09k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.09k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
19
            break;
2736
19
        }
2737
2.80k
    } while ( parentDs.Get<bool>() == true );
2738
2739
659
    if ( operations.empty() == true ) {
2740
22
        return;
2741
22
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
637
#if 1
2745
637
    {
2746
637
        std::set<uint64_t> moduleIDs;
2747
1.11k
        for (const auto& m : modules ) {
2748
1.11k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.11k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.11k
            moduleIDs.insert(moduleID);
2756
1.11k
        }
2757
2758
637
        std::set<uint64_t> operationModuleIDs;
2759
1.01k
        for (const auto& op : operations) {
2760
1.01k
            operationModuleIDs.insert(op.first->ID);
2761
1.01k
        }
2762
2763
637
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
637
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
637
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
637
        for (const auto& id : addModuleIDs) {
2768
544
            operations.push_back({ modules.at(id), operations[0].second});
2769
544
        }
2770
637
    }
2771
637
#endif
2772
2773
637
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
637
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.19k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.55k
        auto& operation = operations[i];
2782
2783
1.55k
        auto& module = operation.first;
2784
1.55k
        auto& op = operation.second;
2785
2786
1.55k
        if ( i > 0 ) {
2787
1.00k
            auto& prevModule = operations[i-1].first;
2788
1.00k
            auto& prevOp = operations[i].second;
2789
2790
1.00k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
434
                auto& curModifier = op.modifier.GetVectorPtr();
2792
434
                if ( curModifier.size() == 0 ) {
2793
188k
                    for (size_t j = 0; j < 512; j++) {
2794
188k
                        curModifier.push_back(1);
2795
188k
                    }
2796
368
                } else {
2797
2.05k
                    for (auto& c : curModifier) {
2798
2.05k
                        c++;
2799
2.05k
                    }
2800
66
                }
2801
434
            }
2802
1.00k
        }
2803
2804
1.55k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.55k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.55k
        const auto& result = results.back();
2811
2812
1.55k
        if ( result.second != std::nullopt ) {
2813
391
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
391
        }
2820
2821
1.55k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.55k
        if ( options.disableTests == false ) {
2830
1.55k
            tests::test(op, result.second);
2831
1.55k
        }
2832
2833
1.55k
        postprocess(module, op, result);
2834
1.55k
    }
2835
2836
637
    if ( options.noCompare == false ) {
2837
558
        compare(operations, results, data, size);
2838
558
    }
2839
637
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
372
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
372
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
372
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.13k
    do {
2725
2.13k
        auto op = getOp(&parentDs, data, size);
2726
2.13k
        auto module = getModule(parentDs);
2727
2.13k
        if ( module == nullptr ) {
2728
1.59k
            continue;
2729
1.59k
        }
2730
2731
535
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
535
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
16
            break;
2736
16
        }
2737
2.11k
    } while ( parentDs.Get<bool>() == true );
2738
2739
372
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
362
#if 1
2745
362
    {
2746
362
        std::set<uint64_t> moduleIDs;
2747
582
        for (const auto& m : modules ) {
2748
582
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
582
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
582
            moduleIDs.insert(moduleID);
2756
582
        }
2757
2758
362
        std::set<uint64_t> operationModuleIDs;
2759
467
        for (const auto& op : operations) {
2760
467
            operationModuleIDs.insert(op.first->ID);
2761
467
        }
2762
2763
362
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
362
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
362
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
362
        for (const auto& id : addModuleIDs) {
2768
280
            operations.push_back({ modules.at(id), operations[0].second});
2769
280
        }
2770
362
    }
2771
362
#endif
2772
2773
362
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
362
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.10k
    for (size_t i = 0; i < operations.size(); i++) {
2781
747
        auto& operation = operations[i];
2782
2783
747
        auto& module = operation.first;
2784
747
        auto& op = operation.second;
2785
2786
747
        if ( i > 0 ) {
2787
456
            auto& prevModule = operations[i-1].first;
2788
456
            auto& prevOp = operations[i].second;
2789
2790
456
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
157
                auto& curModifier = op.modifier.GetVectorPtr();
2792
157
                if ( curModifier.size() == 0 ) {
2793
54.8k
                    for (size_t j = 0; j < 512; j++) {
2794
54.7k
                        curModifier.push_back(1);
2795
54.7k
                    }
2796
107
                } else {
2797
381
                    for (auto& c : curModifier) {
2798
381
                        c++;
2799
381
                    }
2800
50
                }
2801
157
            }
2802
456
        }
2803
2804
747
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
747
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
747
        const auto& result = results.back();
2811
2812
747
        if ( result.second != std::nullopt ) {
2813
454
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
454
        }
2820
2821
747
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
747
        if ( options.disableTests == false ) {
2830
747
            tests::test(op, result.second);
2831
747
        }
2832
2833
747
        postprocess(module, op, result);
2834
747
    }
2835
2836
362
    if ( options.noCompare == false ) {
2837
291
        compare(operations, results, data, size);
2838
291
    }
2839
362
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
640
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
640
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
640
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.91k
    do {
2725
1.91k
        auto op = getOp(&parentDs, data, size);
2726
1.91k
        auto module = getModule(parentDs);
2727
1.91k
        if ( module == nullptr ) {
2728
1.18k
            continue;
2729
1.18k
        }
2730
2731
727
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
727
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
1.90k
    } while ( parentDs.Get<bool>() == true );
2738
2739
640
    if ( operations.empty() == true ) {
2740
42
        return;
2741
42
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
598
#if 1
2745
598
    {
2746
598
        std::set<uint64_t> moduleIDs;
2747
1.03k
        for (const auto& m : modules ) {
2748
1.03k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.03k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.03k
            moduleIDs.insert(moduleID);
2756
1.03k
        }
2757
2758
598
        std::set<uint64_t> operationModuleIDs;
2759
675
        for (const auto& op : operations) {
2760
675
            operationModuleIDs.insert(op.first->ID);
2761
675
        }
2762
2763
598
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
598
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
598
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
598
        for (const auto& id : addModuleIDs) {
2768
506
            operations.push_back({ modules.at(id), operations[0].second});
2769
506
        }
2770
598
    }
2771
598
#endif
2772
2773
598
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
598
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.77k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.18k
        auto& operation = operations[i];
2782
2783
1.18k
        auto& module = operation.first;
2784
1.18k
        auto& op = operation.second;
2785
2786
1.18k
        if ( i > 0 ) {
2787
664
            auto& prevModule = operations[i-1].first;
2788
664
            auto& prevOp = operations[i].second;
2789
2790
664
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
138
                auto& curModifier = op.modifier.GetVectorPtr();
2792
138
                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
291
                    for (auto& c : curModifier) {
2798
291
                        c++;
2799
291
                    }
2800
35
                }
2801
138
            }
2802
664
        }
2803
2804
1.18k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.18k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.18k
        const auto& result = results.back();
2811
2812
1.18k
        if ( result.second != std::nullopt ) {
2813
325
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
325
        }
2820
2821
1.18k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.18k
        if ( options.disableTests == false ) {
2830
1.18k
            tests::test(op, result.second);
2831
1.18k
        }
2832
2833
1.18k
        postprocess(module, op, result);
2834
1.18k
    }
2835
2836
598
    if ( options.noCompare == false ) {
2837
517
        compare(operations, results, data, size);
2838
517
    }
2839
598
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
105
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
105
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
105
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.47k
    do {
2725
2.47k
        auto op = getOp(&parentDs, data, size);
2726
2.47k
        auto module = getModule(parentDs);
2727
2.47k
        if ( module == nullptr ) {
2728
2.30k
            continue;
2729
2.30k
        }
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
6
            break;
2736
6
        }
2737
2.46k
    } while ( parentDs.Get<bool>() == true );
2738
2739
105
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
93
#if 1
2745
93
    {
2746
93
        std::set<uint64_t> moduleIDs;
2747
93
        for (const auto& m : modules ) {
2748
78
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
78
            moduleIDs.insert(moduleID);
2756
78
        }
2757
2758
93
        std::set<uint64_t> operationModuleIDs;
2759
111
        for (const auto& op : operations) {
2760
111
            operationModuleIDs.insert(op.first->ID);
2761
111
        }
2762
2763
93
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
93
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
93
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
93
        for (const auto& id : addModuleIDs) {
2768
28
            operations.push_back({ modules.at(id), operations[0].second});
2769
28
        }
2770
93
    }
2771
93
#endif
2772
2773
93
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
93
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
232
    for (size_t i = 0; i < operations.size(); i++) {
2781
139
        auto& operation = operations[i];
2782
2783
139
        auto& module = operation.first;
2784
139
        auto& op = operation.second;
2785
2786
139
        if ( i > 0 ) {
2787
100
            auto& prevModule = operations[i-1].first;
2788
100
            auto& prevOp = operations[i].second;
2789
2790
100
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
55
                auto& curModifier = op.modifier.GetVectorPtr();
2792
55
                if ( curModifier.size() == 0 ) {
2793
17.4k
                    for (size_t j = 0; j < 512; j++) {
2794
17.4k
                        curModifier.push_back(1);
2795
17.4k
                    }
2796
34
                } else {
2797
292
                    for (auto& c : curModifier) {
2798
292
                        c++;
2799
292
                    }
2800
21
                }
2801
55
            }
2802
100
        }
2803
2804
139
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
139
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
139
        const auto& result = results.back();
2811
2812
139
        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
139
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
139
        if ( options.disableTests == false ) {
2830
139
            tests::test(op, result.second);
2831
139
        }
2832
2833
139
        postprocess(module, op, result);
2834
139
    }
2835
2836
93
    if ( options.noCompare == false ) {
2837
39
        compare(operations, results, data, size);
2838
39
    }
2839
93
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
515
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
515
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
515
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.08k
    do {
2725
3.08k
        auto op = getOp(&parentDs, data, size);
2726
3.08k
        auto module = getModule(parentDs);
2727
3.08k
        if ( module == nullptr ) {
2728
2.08k
            continue;
2729
2.08k
        }
2730
2731
998
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
998
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
46
            break;
2736
46
        }
2737
3.03k
    } while ( parentDs.Get<bool>() == true );
2738
2739
515
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
506
#if 1
2745
506
    {
2746
506
        std::set<uint64_t> moduleIDs;
2747
916
        for (const auto& m : modules ) {
2748
916
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
916
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
916
            moduleIDs.insert(moduleID);
2756
916
        }
2757
2758
506
        std::set<uint64_t> operationModuleIDs;
2759
942
        for (const auto& op : operations) {
2760
942
            operationModuleIDs.insert(op.first->ID);
2761
942
        }
2762
2763
506
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
506
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
506
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
506
        for (const auto& id : addModuleIDs) {
2768
444
            operations.push_back({ modules.at(id), operations[0].second});
2769
444
        }
2770
506
    }
2771
506
#endif
2772
2773
506
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
506
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.89k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.38k
        auto& operation = operations[i];
2782
2783
1.38k
        auto& module = operation.first;
2784
1.38k
        auto& op = operation.second;
2785
2786
1.38k
        if ( i > 0 ) {
2787
928
            auto& prevModule = operations[i-1].first;
2788
928
            auto& prevOp = operations[i].second;
2789
2790
928
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
462
                auto& curModifier = op.modifier.GetVectorPtr();
2792
462
                if ( curModifier.size() == 0 ) {
2793
134k
                    for (size_t j = 0; j < 512; j++) {
2794
134k
                        curModifier.push_back(1);
2795
134k
                    }
2796
262
                } else {
2797
14.5k
                    for (auto& c : curModifier) {
2798
14.5k
                        c++;
2799
14.5k
                    }
2800
200
                }
2801
462
            }
2802
928
        }
2803
2804
1.38k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.38k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.38k
        const auto& result = results.back();
2811
2812
1.38k
        if ( result.second != std::nullopt ) {
2813
644
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
644
        }
2820
2821
1.38k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.38k
        if ( options.disableTests == false ) {
2830
1.38k
            tests::test(op, result.second);
2831
1.38k
        }
2832
2833
1.38k
        postprocess(module, op, result);
2834
1.38k
    }
2835
2836
506
    if ( options.noCompare == false ) {
2837
458
        compare(operations, results, data, size);
2838
458
    }
2839
506
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
134
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
134
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
134
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.15k
    do {
2725
2.15k
        auto op = getOp(&parentDs, data, size);
2726
2.15k
        auto module = getModule(parentDs);
2727
2.15k
        if ( module == nullptr ) {
2728
1.94k
            continue;
2729
1.94k
        }
2730
2731
210
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
210
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
2.14k
    } while ( parentDs.Get<bool>() == true );
2738
2739
134
    if ( operations.empty() == true ) {
2740
16
        return;
2741
16
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
118
#if 1
2745
118
    {
2746
118
        std::set<uint64_t> moduleIDs;
2747
134
        for (const auto& m : modules ) {
2748
134
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
134
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
134
            moduleIDs.insert(moduleID);
2756
134
        }
2757
2758
118
        std::set<uint64_t> operationModuleIDs;
2759
153
        for (const auto& op : operations) {
2760
153
            operationModuleIDs.insert(op.first->ID);
2761
153
        }
2762
2763
118
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
118
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
118
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
118
        for (const auto& id : addModuleIDs) {
2768
57
            operations.push_back({ modules.at(id), operations[0].second});
2769
57
        }
2770
118
    }
2771
118
#endif
2772
2773
118
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
118
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
328
    for (size_t i = 0; i < operations.size(); i++) {
2781
210
        auto& operation = operations[i];
2782
2783
210
        auto& module = operation.first;
2784
210
        auto& op = operation.second;
2785
2786
210
        if ( i > 0 ) {
2787
143
            auto& prevModule = operations[i-1].first;
2788
143
            auto& prevOp = operations[i].second;
2789
2790
143
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
70
                auto& curModifier = op.modifier.GetVectorPtr();
2792
70
                if ( curModifier.size() == 0 ) {
2793
21.5k
                    for (size_t j = 0; j < 512; j++) {
2794
21.5k
                        curModifier.push_back(1);
2795
21.5k
                    }
2796
42
                } else {
2797
1.37k
                    for (auto& c : curModifier) {
2798
1.37k
                        c++;
2799
1.37k
                    }
2800
28
                }
2801
70
            }
2802
143
        }
2803
2804
210
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
210
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
210
        const auto& result = results.back();
2811
2812
210
        if ( result.second != std::nullopt ) {
2813
14
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
14
        }
2820
2821
210
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
210
        if ( options.disableTests == false ) {
2830
210
            tests::test(op, result.second);
2831
210
        }
2832
2833
210
        postprocess(module, op, result);
2834
210
    }
2835
2836
118
    if ( options.noCompare == false ) {
2837
67
        compare(operations, results, data, size);
2838
67
    }
2839
118
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
105
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
105
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
105
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.20k
    do {
2725
2.20k
        auto op = getOp(&parentDs, data, size);
2726
2.20k
        auto module = getModule(parentDs);
2727
2.20k
        if ( module == nullptr ) {
2728
2.02k
            continue;
2729
2.02k
        }
2730
2731
184
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
184
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.20k
    } while ( parentDs.Get<bool>() == true );
2738
2739
105
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
95
#if 1
2745
95
    {
2746
95
        std::set<uint64_t> moduleIDs;
2747
95
        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
95
        std::set<uint64_t> operationModuleIDs;
2759
110
        for (const auto& op : operations) {
2760
110
            operationModuleIDs.insert(op.first->ID);
2761
110
        }
2762
2763
95
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
95
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
95
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
95
        for (const auto& id : addModuleIDs) {
2768
26
            operations.push_back({ modules.at(id), operations[0].second});
2769
26
        }
2770
95
    }
2771
95
#endif
2772
2773
95
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
95
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
231
    for (size_t i = 0; i < operations.size(); i++) {
2781
136
        auto& operation = operations[i];
2782
2783
136
        auto& module = operation.first;
2784
136
        auto& op = operation.second;
2785
2786
136
        if ( i > 0 ) {
2787
98
            auto& prevModule = operations[i-1].first;
2788
98
            auto& prevOp = operations[i].second;
2789
2790
98
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
52
                auto& curModifier = op.modifier.GetVectorPtr();
2792
52
                if ( curModifier.size() == 0 ) {
2793
11.7k
                    for (size_t j = 0; j < 512; j++) {
2794
11.7k
                        curModifier.push_back(1);
2795
11.7k
                    }
2796
29
                } else {
2797
760
                    for (auto& c : curModifier) {
2798
760
                        c++;
2799
760
                    }
2800
29
                }
2801
52
            }
2802
98
        }
2803
2804
136
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
136
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
136
        const auto& result = results.back();
2811
2812
136
        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
136
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
136
        if ( options.disableTests == false ) {
2830
136
            tests::test(op, result.second);
2831
136
        }
2832
2833
136
        postprocess(module, op, result);
2834
136
    }
2835
2836
95
    if ( options.noCompare == false ) {
2837
38
        compare(operations, results, data, size);
2838
38
    }
2839
95
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
104
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
104
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
104
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.33k
    do {
2725
2.33k
        auto op = getOp(&parentDs, data, size);
2726
2.33k
        auto module = getModule(parentDs);
2727
2.33k
        if ( module == nullptr ) {
2728
2.15k
            continue;
2729
2.15k
        }
2730
2731
180
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
180
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.33k
    } while ( parentDs.Get<bool>() == true );
2738
2739
104
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
95
#if 1
2745
95
    {
2746
95
        std::set<uint64_t> moduleIDs;
2747
95
        for (const auto& m : modules ) {
2748
74
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
74
            moduleIDs.insert(moduleID);
2756
74
        }
2757
2758
95
        std::set<uint64_t> operationModuleIDs;
2759
109
        for (const auto& op : operations) {
2760
109
            operationModuleIDs.insert(op.first->ID);
2761
109
        }
2762
2763
95
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
95
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
95
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
95
        for (const auto& id : addModuleIDs) {
2768
24
            operations.push_back({ modules.at(id), operations[0].second});
2769
24
        }
2770
95
    }
2771
95
#endif
2772
2773
95
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
95
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
228
    for (size_t i = 0; i < operations.size(); i++) {
2781
133
        auto& operation = operations[i];
2782
2783
133
        auto& module = operation.first;
2784
133
        auto& op = operation.second;
2785
2786
133
        if ( i > 0 ) {
2787
96
            auto& prevModule = operations[i-1].first;
2788
96
            auto& prevOp = operations[i].second;
2789
2790
96
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
53
                auto& curModifier = op.modifier.GetVectorPtr();
2792
53
                if ( curModifier.size() == 0 ) {
2793
15.3k
                    for (size_t j = 0; j < 512; j++) {
2794
15.3k
                        curModifier.push_back(1);
2795
15.3k
                    }
2796
30
                } else {
2797
371
                    for (auto& c : curModifier) {
2798
371
                        c++;
2799
371
                    }
2800
23
                }
2801
53
            }
2802
96
        }
2803
2804
133
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
133
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
133
        const auto& result = results.back();
2811
2812
133
        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
133
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
133
        if ( options.disableTests == false ) {
2830
133
            tests::test(op, result.second);
2831
133
        }
2832
2833
133
        postprocess(module, op, result);
2834
133
    }
2835
2836
95
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
95
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
96
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
96
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
96
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.25k
    do {
2725
2.25k
        auto op = getOp(&parentDs, data, size);
2726
2.25k
        auto module = getModule(parentDs);
2727
2.25k
        if ( module == nullptr ) {
2728
2.08k
            continue;
2729
2.08k
        }
2730
2731
169
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
169
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.24k
    } while ( parentDs.Get<bool>() == true );
2738
2739
96
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
84
#if 1
2745
84
    {
2746
84
        std::set<uint64_t> moduleIDs;
2747
84
        for (const auto& m : modules ) {
2748
56
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
56
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
56
            moduleIDs.insert(moduleID);
2756
56
        }
2757
2758
84
        std::set<uint64_t> operationModuleIDs;
2759
84
        for (const auto& op : operations) {
2760
84
            operationModuleIDs.insert(op.first->ID);
2761
84
        }
2762
2763
84
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
84
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
84
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
84
        for (const auto& id : addModuleIDs) {
2768
17
            operations.push_back({ modules.at(id), operations[0].second});
2769
17
        }
2770
84
    }
2771
84
#endif
2772
2773
84
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
84
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
185
    for (size_t i = 0; i < operations.size(); i++) {
2781
101
        auto& operation = operations[i];
2782
2783
101
        auto& module = operation.first;
2784
101
        auto& op = operation.second;
2785
2786
101
        if ( i > 0 ) {
2787
73
            auto& prevModule = operations[i-1].first;
2788
73
            auto& prevOp = operations[i].second;
2789
2790
73
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
39
                auto& curModifier = op.modifier.GetVectorPtr();
2792
39
                if ( curModifier.size() == 0 ) {
2793
8.72k
                    for (size_t j = 0; j < 512; j++) {
2794
8.70k
                        curModifier.push_back(1);
2795
8.70k
                    }
2796
22
                } else {
2797
363
                    for (auto& c : curModifier) {
2798
363
                        c++;
2799
363
                    }
2800
22
                }
2801
39
            }
2802
73
        }
2803
2804
101
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
101
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
101
        const auto& result = results.back();
2811
2812
101
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
101
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
101
        if ( options.disableTests == false ) {
2830
101
            tests::test(op, result.second);
2831
101
        }
2832
2833
101
        postprocess(module, op, result);
2834
101
    }
2835
2836
84
    if ( options.noCompare == false ) {
2837
28
        compare(operations, results, data, size);
2838
28
    }
2839
84
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
312
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
312
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
312
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.13k
    do {
2725
2.13k
        auto op = getOp(&parentDs, data, size);
2726
2.13k
        auto module = getModule(parentDs);
2727
2.13k
        if ( module == nullptr ) {
2728
1.49k
            continue;
2729
1.49k
        }
2730
2731
636
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
636
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
21
            break;
2736
21
        }
2737
2.11k
    } while ( parentDs.Get<bool>() == true );
2738
2739
312
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
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
528
        for (const auto& m : modules ) {
2748
528
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
528
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
528
            moduleIDs.insert(moduleID);
2756
528
        }
2757
2758
304
        std::set<uint64_t> operationModuleIDs;
2759
573
        for (const auto& op : operations) {
2760
573
            operationModuleIDs.insert(op.first->ID);
2761
573
        }
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
250
            operations.push_back({ modules.at(id), operations[0].second});
2769
250
        }
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
1.12k
    for (size_t i = 0; i < operations.size(); i++) {
2781
823
        auto& operation = operations[i];
2782
2783
823
        auto& module = operation.first;
2784
823
        auto& op = operation.second;
2785
2786
823
        if ( i > 0 ) {
2787
559
            auto& prevModule = operations[i-1].first;
2788
559
            auto& prevOp = operations[i].second;
2789
2790
559
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
286
                auto& curModifier = op.modifier.GetVectorPtr();
2792
286
                if ( curModifier.size() == 0 ) {
2793
88.2k
                    for (size_t j = 0; j < 512; j++) {
2794
88.0k
                        curModifier.push_back(1);
2795
88.0k
                    }
2796
172
                } else {
2797
597
                    for (auto& c : curModifier) {
2798
597
                        c++;
2799
597
                    }
2800
114
                }
2801
286
            }
2802
559
        }
2803
2804
823
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
823
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
823
        const auto& result = results.back();
2811
2812
823
        if ( result.second != std::nullopt ) {
2813
452
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
452
        }
2820
2821
823
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
823
        if ( options.disableTests == false ) {
2830
823
            tests::test(op, result.second);
2831
823
        }
2832
2833
823
        postprocess(module, op, result);
2834
823
    }
2835
2836
304
    if ( options.noCompare == false ) {
2837
264
        compare(operations, results, data, size);
2838
264
    }
2839
304
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
210
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
210
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
210
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.52k
    do {
2725
2.52k
        auto op = getOp(&parentDs, data, size);
2726
2.52k
        auto module = getModule(parentDs);
2727
2.52k
        if ( module == nullptr ) {
2728
2.14k
            continue;
2729
2.14k
        }
2730
2731
376
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
376
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
2.51k
    } while ( parentDs.Get<bool>() == true );
2738
2739
210
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
204
#if 1
2745
204
    {
2746
204
        std::set<uint64_t> moduleIDs;
2747
290
        for (const auto& m : modules ) {
2748
290
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
290
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
290
            moduleIDs.insert(moduleID);
2756
290
        }
2757
2758
204
        std::set<uint64_t> operationModuleIDs;
2759
284
        for (const auto& op : operations) {
2760
284
            operationModuleIDs.insert(op.first->ID);
2761
284
        }
2762
2763
204
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
204
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
204
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
204
        for (const auto& id : addModuleIDs) {
2768
129
            operations.push_back({ modules.at(id), operations[0].second});
2769
129
        }
2770
204
    }
2771
204
#endif
2772
2773
204
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
204
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
617
    for (size_t i = 0; i < operations.size(); i++) {
2781
413
        auto& operation = operations[i];
2782
2783
413
        auto& module = operation.first;
2784
413
        auto& op = operation.second;
2785
2786
413
        if ( i > 0 ) {
2787
268
            auto& prevModule = operations[i-1].first;
2788
268
            auto& prevOp = operations[i].second;
2789
2790
268
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
113
                auto& curModifier = op.modifier.GetVectorPtr();
2792
113
                if ( curModifier.size() == 0 ) {
2793
28.2k
                    for (size_t j = 0; j < 512; j++) {
2794
28.1k
                        curModifier.push_back(1);
2795
28.1k
                    }
2796
58
                } else {
2797
615
                    for (auto& c : curModifier) {
2798
615
                        c++;
2799
615
                    }
2800
58
                }
2801
113
            }
2802
268
        }
2803
2804
413
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
413
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
413
        const auto& result = results.back();
2811
2812
413
        if ( result.second != std::nullopt ) {
2813
148
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
148
        }
2820
2821
413
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
413
        if ( options.disableTests == false ) {
2830
413
            tests::test(op, result.second);
2831
413
        }
2832
2833
413
        postprocess(module, op, result);
2834
413
    }
2835
2836
204
    if ( options.noCompare == false ) {
2837
145
        compare(operations, results, data, size);
2838
145
    }
2839
204
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
92
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
92
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
92
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.37k
    do {
2725
2.37k
        auto op = getOp(&parentDs, data, size);
2726
2.37k
        auto module = getModule(parentDs);
2727
2.37k
        if ( module == nullptr ) {
2728
2.18k
            continue;
2729
2.18k
        }
2730
2731
191
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
191
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.36k
    } while ( parentDs.Get<bool>() == true );
2738
2739
92
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
87
#if 1
2745
87
    {
2746
87
        std::set<uint64_t> moduleIDs;
2747
87
        for (const auto& m : modules ) {
2748
82
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
82
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
82
            moduleIDs.insert(moduleID);
2756
82
        }
2757
2758
87
        std::set<uint64_t> operationModuleIDs;
2759
111
        for (const auto& op : operations) {
2760
111
            operationModuleIDs.insert(op.first->ID);
2761
111
        }
2762
2763
87
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
87
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
87
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
87
        for (const auto& id : addModuleIDs) {
2768
30
            operations.push_back({ modules.at(id), operations[0].second});
2769
30
        }
2770
87
    }
2771
87
#endif
2772
2773
87
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
87
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
228
    for (size_t i = 0; i < operations.size(); i++) {
2781
141
        auto& operation = operations[i];
2782
2783
141
        auto& module = operation.first;
2784
141
        auto& op = operation.second;
2785
2786
141
        if ( i > 0 ) {
2787
100
            auto& prevModule = operations[i-1].first;
2788
100
            auto& prevOp = operations[i].second;
2789
2790
100
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
53
                auto& curModifier = op.modifier.GetVectorPtr();
2792
53
                if ( curModifier.size() == 0 ) {
2793
12.8k
                    for (size_t j = 0; j < 512; j++) {
2794
12.8k
                        curModifier.push_back(1);
2795
12.8k
                    }
2796
28
                } else {
2797
760
                    for (auto& c : curModifier) {
2798
760
                        c++;
2799
760
                    }
2800
28
                }
2801
53
            }
2802
100
        }
2803
2804
141
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
141
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
141
        const auto& result = results.back();
2811
2812
141
        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
141
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
141
        if ( options.disableTests == false ) {
2830
141
            tests::test(op, result.second);
2831
141
        }
2832
2833
141
        postprocess(module, op, result);
2834
141
    }
2835
2836
87
    if ( options.noCompare == false ) {
2837
41
        compare(operations, results, data, size);
2838
41
    }
2839
87
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
96
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
96
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
96
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.34k
    do {
2725
2.34k
        auto op = getOp(&parentDs, data, size);
2726
2.34k
        auto module = getModule(parentDs);
2727
2.34k
        if ( module == nullptr ) {
2728
2.14k
            continue;
2729
2.14k
        }
2730
2731
195
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
195
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.33k
    } while ( parentDs.Get<bool>() == true );
2738
2739
96
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
86
#if 1
2745
86
    {
2746
86
        std::set<uint64_t> moduleIDs;
2747
86
        for (const auto& m : modules ) {
2748
74
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
74
            moduleIDs.insert(moduleID);
2756
74
        }
2757
2758
86
        std::set<uint64_t> operationModuleIDs;
2759
117
        for (const auto& op : operations) {
2760
117
            operationModuleIDs.insert(op.first->ID);
2761
117
        }
2762
2763
86
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
86
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
86
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
86
        for (const auto& id : addModuleIDs) {
2768
26
            operations.push_back({ modules.at(id), operations[0].second});
2769
26
        }
2770
86
    }
2771
86
#endif
2772
2773
86
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
86
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
229
    for (size_t i = 0; i < operations.size(); i++) {
2781
143
        auto& operation = operations[i];
2782
2783
143
        auto& module = operation.first;
2784
143
        auto& op = operation.second;
2785
2786
143
        if ( i > 0 ) {
2787
106
            auto& prevModule = operations[i-1].first;
2788
106
            auto& prevOp = operations[i].second;
2789
2790
106
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
60
                auto& curModifier = op.modifier.GetVectorPtr();
2792
60
                if ( curModifier.size() == 0 ) {
2793
17.4k
                    for (size_t j = 0; j < 512; j++) {
2794
17.4k
                        curModifier.push_back(1);
2795
17.4k
                    }
2796
34
                } else {
2797
4.66k
                    for (auto& c : curModifier) {
2798
4.66k
                        c++;
2799
4.66k
                    }
2800
26
                }
2801
60
            }
2802
106
        }
2803
2804
143
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
143
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
143
        const auto& result = results.back();
2811
2812
143
        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
143
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
143
        if ( options.disableTests == false ) {
2830
143
            tests::test(op, result.second);
2831
143
        }
2832
2833
143
        postprocess(module, op, result);
2834
143
    }
2835
2836
86
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
86
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
485
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
485
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
485
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.96k
    do {
2725
2.96k
        auto op = getOp(&parentDs, data, size);
2726
2.96k
        auto module = getModule(parentDs);
2727
2.96k
        if ( module == nullptr ) {
2728
2.16k
            continue;
2729
2.16k
        }
2730
2731
804
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
804
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
23
            break;
2736
23
        }
2737
2.94k
    } while ( parentDs.Get<bool>() == true );
2738
2739
485
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
474
#if 1
2745
474
    {
2746
474
        std::set<uint64_t> moduleIDs;
2747
840
        for (const auto& m : modules ) {
2748
840
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
840
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
840
            moduleIDs.insert(moduleID);
2756
840
        }
2757
2758
474
        std::set<uint64_t> operationModuleIDs;
2759
744
        for (const auto& op : operations) {
2760
744
            operationModuleIDs.insert(op.first->ID);
2761
744
        }
2762
2763
474
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
474
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
474
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
474
        for (const auto& id : addModuleIDs) {
2768
407
            operations.push_back({ modules.at(id), operations[0].second});
2769
407
        }
2770
474
    }
2771
474
#endif
2772
2773
474
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
474
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.62k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.15k
        auto& operation = operations[i];
2782
2783
1.15k
        auto& module = operation.first;
2784
1.15k
        auto& op = operation.second;
2785
2786
1.15k
        if ( i > 0 ) {
2787
731
            auto& prevModule = operations[i-1].first;
2788
731
            auto& prevOp = operations[i].second;
2789
2790
731
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
297
                auto& curModifier = op.modifier.GetVectorPtr();
2792
297
                if ( curModifier.size() == 0 ) {
2793
123k
                    for (size_t j = 0; j < 512; j++) {
2794
123k
                        curModifier.push_back(1);
2795
123k
                    }
2796
241
                } else {
2797
602
                    for (auto& c : curModifier) {
2798
602
                        c++;
2799
602
                    }
2800
56
                }
2801
297
            }
2802
731
        }
2803
2804
1.15k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.15k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.15k
        const auto& result = results.back();
2811
2812
1.15k
        if ( result.second != std::nullopt ) {
2813
448
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
448
        }
2820
2821
1.15k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.15k
        if ( options.disableTests == false ) {
2830
1.15k
            tests::test(op, result.second);
2831
1.15k
        }
2832
2833
1.15k
        postprocess(module, op, result);
2834
1.15k
    }
2835
2836
474
    if ( options.noCompare == false ) {
2837
420
        compare(operations, results, data, size);
2838
420
    }
2839
474
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
229
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
229
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
229
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.58k
    do {
2725
2.58k
        auto op = getOp(&parentDs, data, size);
2726
2.58k
        auto module = getModule(parentDs);
2727
2.58k
        if ( module == nullptr ) {
2728
2.07k
            continue;
2729
2.07k
        }
2730
2731
508
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
508
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
2.57k
    } while ( parentDs.Get<bool>() == true );
2738
2739
229
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
225
#if 1
2745
225
    {
2746
225
        std::set<uint64_t> moduleIDs;
2747
338
        for (const auto& m : modules ) {
2748
338
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
338
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
338
            moduleIDs.insert(moduleID);
2756
338
        }
2757
2758
225
        std::set<uint64_t> operationModuleIDs;
2759
426
        for (const auto& op : operations) {
2760
426
            operationModuleIDs.insert(op.first->ID);
2761
426
        }
2762
2763
225
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
225
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
225
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
225
        for (const auto& id : addModuleIDs) {
2768
157
            operations.push_back({ modules.at(id), operations[0].second});
2769
157
        }
2770
225
    }
2771
225
#endif
2772
2773
225
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
225
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
808
    for (size_t i = 0; i < operations.size(); i++) {
2781
583
        auto& operation = operations[i];
2782
2783
583
        auto& module = operation.first;
2784
583
        auto& op = operation.second;
2785
2786
583
        if ( i > 0 ) {
2787
414
            auto& prevModule = operations[i-1].first;
2788
414
            auto& prevOp = operations[i].second;
2789
2790
414
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
239
                auto& curModifier = op.modifier.GetVectorPtr();
2792
239
                if ( curModifier.size() == 0 ) {
2793
80.0k
                    for (size_t j = 0; j < 512; j++) {
2794
79.8k
                        curModifier.push_back(1);
2795
79.8k
                    }
2796
156
                } else {
2797
3.67k
                    for (auto& c : curModifier) {
2798
3.67k
                        c++;
2799
3.67k
                    }
2800
83
                }
2801
239
            }
2802
414
        }
2803
2804
583
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
583
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
583
        const auto& result = results.back();
2811
2812
583
        if ( result.second != std::nullopt ) {
2813
140
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
140
        }
2820
2821
583
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
583
        if ( options.disableTests == false ) {
2830
583
            tests::test(op, result.second);
2831
583
        }
2832
2833
583
        postprocess(module, op, result);
2834
583
    }
2835
2836
225
    if ( options.noCompare == false ) {
2837
169
        compare(operations, results, data, size);
2838
169
    }
2839
225
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
125
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
125
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
125
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.30k
    do {
2725
2.30k
        auto op = getOp(&parentDs, data, size);
2726
2.30k
        auto module = getModule(parentDs);
2727
2.30k
        if ( module == nullptr ) {
2728
2.08k
            continue;
2729
2.08k
        }
2730
2731
213
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
213
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.29k
    } while ( parentDs.Get<bool>() == true );
2738
2739
125
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
113
#if 1
2745
113
    {
2746
113
        std::set<uint64_t> moduleIDs;
2747
113
        for (const auto& m : modules ) {
2748
92
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
92
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
92
            moduleIDs.insert(moduleID);
2756
92
        }
2757
2758
113
        std::set<uint64_t> operationModuleIDs;
2759
135
        for (const auto& op : operations) {
2760
135
            operationModuleIDs.insert(op.first->ID);
2761
135
        }
2762
2763
113
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
113
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
113
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
113
        for (const auto& id : addModuleIDs) {
2768
34
            operations.push_back({ modules.at(id), operations[0].second});
2769
34
        }
2770
113
    }
2771
113
#endif
2772
2773
113
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
113
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
282
    for (size_t i = 0; i < operations.size(); i++) {
2781
169
        auto& operation = operations[i];
2782
2783
169
        auto& module = operation.first;
2784
169
        auto& op = operation.second;
2785
2786
169
        if ( i > 0 ) {
2787
123
            auto& prevModule = operations[i-1].first;
2788
123
            auto& prevOp = operations[i].second;
2789
2790
123
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
69
                auto& curModifier = op.modifier.GetVectorPtr();
2792
69
                if ( curModifier.size() == 0 ) {
2793
12.8k
                    for (size_t j = 0; j < 512; j++) {
2794
12.8k
                        curModifier.push_back(1);
2795
12.8k
                    }
2796
44
                } else {
2797
1.21k
                    for (auto& c : curModifier) {
2798
1.21k
                        c++;
2799
1.21k
                    }
2800
44
                }
2801
69
            }
2802
123
        }
2803
2804
169
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
169
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
169
        const auto& result = results.back();
2811
2812
169
        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
169
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
169
        if ( options.disableTests == false ) {
2830
169
            tests::test(op, result.second);
2831
169
        }
2832
2833
169
        postprocess(module, op, result);
2834
169
    }
2835
2836
113
    if ( options.noCompare == false ) {
2837
46
        compare(operations, results, data, size);
2838
46
    }
2839
113
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::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
1.58k
    do {
2725
1.58k
        auto op = getOp(&parentDs, data, size);
2726
1.58k
        auto module = getModule(parentDs);
2727
1.58k
        if ( module == nullptr ) {
2728
1.41k
            continue;
2729
1.41k
        }
2730
2731
162
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
162
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.57k
    } while ( parentDs.Get<bool>() == true );
2738
2739
178
    if ( operations.empty() == true ) {
2740
23
        return;
2741
23
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
155
#if 1
2745
155
    {
2746
155
        std::set<uint64_t> moduleIDs;
2747
155
        for (const auto& m : modules ) {
2748
74
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
74
            moduleIDs.insert(moduleID);
2756
74
        }
2757
2758
155
        std::set<uint64_t> operationModuleIDs;
2759
155
        for (const auto& op : operations) {
2760
108
            operationModuleIDs.insert(op.first->ID);
2761
108
        }
2762
2763
155
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
155
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
155
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
155
        for (const auto& id : addModuleIDs) {
2768
23
            operations.push_back({ modules.at(id), operations[0].second});
2769
23
        }
2770
155
    }
2771
155
#endif
2772
2773
155
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
155
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
286
    for (size_t i = 0; i < operations.size(); i++) {
2781
131
        auto& operation = operations[i];
2782
2783
131
        auto& module = operation.first;
2784
131
        auto& op = operation.second;
2785
2786
131
        if ( i > 0 ) {
2787
94
            auto& prevModule = operations[i-1].first;
2788
94
            auto& prevOp = operations[i].second;
2789
2790
94
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
50
                auto& curModifier = op.modifier.GetVectorPtr();
2792
50
                if ( curModifier.size() == 0 ) {
2793
12.8k
                    for (size_t j = 0; j < 512; j++) {
2794
12.8k
                        curModifier.push_back(1);
2795
12.8k
                    }
2796
25
                } else {
2797
367
                    for (auto& c : curModifier) {
2798
367
                        c++;
2799
367
                    }
2800
25
                }
2801
50
            }
2802
94
        }
2803
2804
131
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
131
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
131
        const auto& result = results.back();
2811
2812
131
        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
131
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
131
        if ( options.disableTests == false ) {
2830
131
            tests::test(op, result.second);
2831
131
        }
2832
2833
131
        postprocess(module, op, result);
2834
131
    }
2835
2836
155
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
155
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
133
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
133
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
133
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.03k
    do {
2725
3.03k
        auto op = getOp(&parentDs, data, size);
2726
3.03k
        auto module = getModule(parentDs);
2727
3.03k
        if ( module == nullptr ) {
2728
2.84k
            continue;
2729
2.84k
        }
2730
2731
194
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
194
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
3.03k
    } while ( parentDs.Get<bool>() == true );
2738
2739
133
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
121
#if 1
2745
121
    {
2746
121
        std::set<uint64_t> moduleIDs;
2747
121
        for (const auto& m : modules ) {
2748
66
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
66
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
66
            moduleIDs.insert(moduleID);
2756
66
        }
2757
2758
121
        std::set<uint64_t> operationModuleIDs;
2759
121
        for (const auto& op : operations) {
2760
104
            operationModuleIDs.insert(op.first->ID);
2761
104
        }
2762
2763
121
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
121
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
121
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
121
        for (const auto& id : addModuleIDs) {
2768
19
            operations.push_back({ modules.at(id), operations[0].second});
2769
19
        }
2770
121
    }
2771
121
#endif
2772
2773
121
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
121
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
244
    for (size_t i = 0; i < operations.size(); i++) {
2781
123
        auto& operation = operations[i];
2782
2783
123
        auto& module = operation.first;
2784
123
        auto& op = operation.second;
2785
2786
123
        if ( i > 0 ) {
2787
90
            auto& prevModule = operations[i-1].first;
2788
90
            auto& prevOp = operations[i].second;
2789
2790
90
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
51
                auto& curModifier = op.modifier.GetVectorPtr();
2792
51
                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
29
                } else {
2797
378
                    for (auto& c : curModifier) {
2798
378
                        c++;
2799
378
                    }
2800
29
                }
2801
51
            }
2802
90
        }
2803
2804
123
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
123
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
123
        const auto& result = results.back();
2811
2812
123
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
123
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
123
        if ( options.disableTests == false ) {
2830
123
            tests::test(op, result.second);
2831
123
        }
2832
2833
123
        postprocess(module, op, result);
2834
123
    }
2835
2836
121
    if ( options.noCompare == false ) {
2837
33
        compare(operations, results, data, size);
2838
33
    }
2839
121
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
138
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
138
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
138
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.23k
    do {
2725
2.23k
        auto op = getOp(&parentDs, data, size);
2726
2.23k
        auto module = getModule(parentDs);
2727
2.23k
        if ( module == nullptr ) {
2728
2.06k
            continue;
2729
2.06k
        }
2730
2731
169
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
169
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.22k
    } while ( parentDs.Get<bool>() == true );
2738
2739
138
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
127
#if 1
2745
127
    {
2746
127
        std::set<uint64_t> moduleIDs;
2747
127
        for (const auto& m : modules ) {
2748
82
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
82
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
82
            moduleIDs.insert(moduleID);
2756
82
        }
2757
2758
127
        std::set<uint64_t> operationModuleIDs;
2759
127
        for (const auto& op : operations) {
2760
106
            operationModuleIDs.insert(op.first->ID);
2761
106
        }
2762
2763
127
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
127
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
127
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
127
        for (const auto& id : addModuleIDs) {
2768
31
            operations.push_back({ modules.at(id), operations[0].second});
2769
31
        }
2770
127
    }
2771
127
#endif
2772
2773
127
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
127
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
264
    for (size_t i = 0; i < operations.size(); i++) {
2781
137
        auto& operation = operations[i];
2782
2783
137
        auto& module = operation.first;
2784
137
        auto& op = operation.second;
2785
2786
137
        if ( i > 0 ) {
2787
96
            auto& prevModule = operations[i-1].first;
2788
96
            auto& prevOp = operations[i].second;
2789
2790
96
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
49
                auto& curModifier = op.modifier.GetVectorPtr();
2792
49
                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
27
                } else {
2797
573
                    for (auto& c : curModifier) {
2798
573
                        c++;
2799
573
                    }
2800
27
                }
2801
49
            }
2802
96
        }
2803
2804
137
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
137
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
137
        const auto& result = results.back();
2811
2812
137
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
137
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
137
        if ( options.disableTests == false ) {
2830
137
            tests::test(op, result.second);
2831
137
        }
2832
2833
137
        postprocess(module, op, result);
2834
137
    }
2835
2836
127
    if ( options.noCompare == false ) {
2837
41
        compare(operations, results, data, size);
2838
41
    }
2839
127
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
144
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
144
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
144
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.41k
    do {
2725
2.41k
        auto op = getOp(&parentDs, data, size);
2726
2.41k
        auto module = getModule(parentDs);
2727
2.41k
        if ( module == nullptr ) {
2728
2.26k
            continue;
2729
2.26k
        }
2730
2731
149
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
149
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
2.41k
    } while ( parentDs.Get<bool>() == true );
2738
2739
144
    if ( operations.empty() == true ) {
2740
36
        return;
2741
36
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
108
#if 1
2745
108
    {
2746
108
        std::set<uint64_t> moduleIDs;
2747
108
        for (const auto& m : modules ) {
2748
60
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
60
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
60
            moduleIDs.insert(moduleID);
2756
60
        }
2757
2758
108
        std::set<uint64_t> operationModuleIDs;
2759
108
        for (const auto& op : operations) {
2760
85
            operationModuleIDs.insert(op.first->ID);
2761
85
        }
2762
2763
108
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
108
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
108
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
108
        for (const auto& id : addModuleIDs) {
2768
20
            operations.push_back({ modules.at(id), operations[0].second});
2769
20
        }
2770
108
    }
2771
108
#endif
2772
2773
108
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
108
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
213
    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
75
            auto& prevModule = operations[i-1].first;
2788
75
            auto& prevOp = operations[i].second;
2789
2790
75
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
39
                auto& curModifier = op.modifier.GetVectorPtr();
2792
39
                if ( curModifier.size() == 0 ) {
2793
10.2k
                    for (size_t j = 0; j < 512; j++) {
2794
10.2k
                        curModifier.push_back(1);
2795
10.2k
                    }
2796
20
                } else {
2797
301
                    for (auto& c : curModifier) {
2798
301
                        c++;
2799
301
                    }
2800
19
                }
2801
39
            }
2802
75
        }
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
108
    if ( options.noCompare == false ) {
2837
30
        compare(operations, results, data, size);
2838
30
    }
2839
108
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
109
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
109
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
109
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.77k
    do {
2725
2.77k
        auto op = getOp(&parentDs, data, size);
2726
2.77k
        auto module = getModule(parentDs);
2727
2.77k
        if ( module == nullptr ) {
2728
2.58k
            continue;
2729
2.58k
        }
2730
2731
190
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
190
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.76k
    } while ( parentDs.Get<bool>() == true );
2738
2739
109
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
98
#if 1
2745
98
    {
2746
98
        std::set<uint64_t> moduleIDs;
2747
98
        for (const auto& m : modules ) {
2748
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
98
        std::set<uint64_t> operationModuleIDs;
2759
102
        for (const auto& op : operations) {
2760
102
            operationModuleIDs.insert(op.first->ID);
2761
102
        }
2762
2763
98
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
98
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
98
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
98
        for (const auto& id : addModuleIDs) {
2768
27
            operations.push_back({ modules.at(id), operations[0].second});
2769
27
        }
2770
98
    }
2771
98
#endif
2772
2773
98
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
98
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
227
    for (size_t i = 0; i < operations.size(); i++) {
2781
129
        auto& operation = operations[i];
2782
2783
129
        auto& module = operation.first;
2784
129
        auto& op = operation.second;
2785
2786
129
        if ( i > 0 ) {
2787
91
            auto& prevModule = operations[i-1].first;
2788
91
            auto& prevOp = operations[i].second;
2789
2790
91
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
45
                auto& curModifier = op.modifier.GetVectorPtr();
2792
45
                if ( curModifier.size() == 0 ) {
2793
13.8k
                    for (size_t j = 0; j < 512; j++) {
2794
13.8k
                        curModifier.push_back(1);
2795
13.8k
                    }
2796
27
                } else {
2797
511
                    for (auto& c : curModifier) {
2798
511
                        c++;
2799
511
                    }
2800
18
                }
2801
45
            }
2802
91
        }
2803
2804
129
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
129
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
129
        const auto& result = results.back();
2811
2812
129
        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
129
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
129
        if ( options.disableTests == false ) {
2830
129
            tests::test(op, result.second);
2831
129
        }
2832
2833
129
        postprocess(module, op, result);
2834
129
    }
2835
2836
98
    if ( options.noCompare == false ) {
2837
38
        compare(operations, results, data, size);
2838
38
    }
2839
98
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
128
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
128
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
128
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.03k
    do {
2725
3.03k
        auto op = getOp(&parentDs, data, size);
2726
3.03k
        auto module = getModule(parentDs);
2727
3.03k
        if ( module == nullptr ) {
2728
2.82k
            continue;
2729
2.82k
        }
2730
2731
211
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
211
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
3.03k
    } while ( parentDs.Get<bool>() == true );
2738
2739
128
    if ( operations.empty() == true ) {
2740
16
        return;
2741
16
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
112
#if 1
2745
112
    {
2746
112
        std::set<uint64_t> moduleIDs;
2747
112
        for (const auto& m : modules ) {
2748
84
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
84
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
84
            moduleIDs.insert(moduleID);
2756
84
        }
2757
2758
112
        std::set<uint64_t> operationModuleIDs;
2759
112
        for (const auto& op : operations) {
2760
106
            operationModuleIDs.insert(op.first->ID);
2761
106
        }
2762
2763
112
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
112
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
112
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
112
        for (const auto& id : addModuleIDs) {
2768
31
            operations.push_back({ modules.at(id), operations[0].second});
2769
31
        }
2770
112
    }
2771
112
#endif
2772
2773
112
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
112
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
249
    for (size_t i = 0; i < operations.size(); i++) {
2781
137
        auto& operation = operations[i];
2782
2783
137
        auto& module = operation.first;
2784
137
        auto& op = operation.second;
2785
2786
137
        if ( i > 0 ) {
2787
95
            auto& prevModule = operations[i-1].first;
2788
95
            auto& prevOp = operations[i].second;
2789
2790
95
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
45
                auto& curModifier = op.modifier.GetVectorPtr();
2792
45
                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
23
                } else {
2797
364
                    for (auto& c : curModifier) {
2798
364
                        c++;
2799
364
                    }
2800
23
                }
2801
45
            }
2802
95
        }
2803
2804
137
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
137
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
137
        const auto& result = results.back();
2811
2812
137
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
137
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
137
        if ( options.disableTests == false ) {
2830
137
            tests::test(op, result.second);
2831
137
        }
2832
2833
137
        postprocess(module, op, result);
2834
137
    }
2835
2836
112
    if ( options.noCompare == false ) {
2837
42
        compare(operations, results, data, size);
2838
42
    }
2839
112
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
144
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
144
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
144
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.95k
    do {
2725
1.95k
        auto op = getOp(&parentDs, data, size);
2726
1.95k
        auto module = getModule(parentDs);
2727
1.95k
        if ( module == nullptr ) {
2728
1.67k
            continue;
2729
1.67k
        }
2730
2731
280
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
280
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
1.94k
    } while ( parentDs.Get<bool>() == true );
2738
2739
144
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
136
#if 1
2745
136
    {
2746
136
        std::set<uint64_t> moduleIDs;
2747
146
        for (const auto& m : modules ) {
2748
146
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
146
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
146
            moduleIDs.insert(moduleID);
2756
146
        }
2757
2758
136
        std::set<uint64_t> operationModuleIDs;
2759
197
        for (const auto& op : operations) {
2760
197
            operationModuleIDs.insert(op.first->ID);
2761
197
        }
2762
2763
136
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
136
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
136
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
136
        for (const auto& id : addModuleIDs) {
2768
57
            operations.push_back({ modules.at(id), operations[0].second});
2769
57
        }
2770
136
    }
2771
136
#endif
2772
2773
136
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
136
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
390
    for (size_t i = 0; i < operations.size(); i++) {
2781
254
        auto& operation = operations[i];
2782
2783
254
        auto& module = operation.first;
2784
254
        auto& op = operation.second;
2785
2786
254
        if ( i > 0 ) {
2787
181
            auto& prevModule = operations[i-1].first;
2788
181
            auto& prevOp = operations[i].second;
2789
2790
181
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
99
                auto& curModifier = op.modifier.GetVectorPtr();
2792
99
                if ( curModifier.size() == 0 ) {
2793
23.0k
                    for (size_t j = 0; j < 512; j++) {
2794
23.0k
                        curModifier.push_back(1);
2795
23.0k
                    }
2796
54
                } else {
2797
415
                    for (auto& c : curModifier) {
2798
415
                        c++;
2799
415
                    }
2800
54
                }
2801
99
            }
2802
181
        }
2803
2804
254
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
254
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
254
        const auto& result = results.back();
2811
2812
254
        if ( result.second != std::nullopt ) {
2813
28
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
28
        }
2820
2821
254
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
254
        if ( options.disableTests == false ) {
2830
254
            tests::test(op, result.second);
2831
254
        }
2832
2833
254
        postprocess(module, op, result);
2834
254
    }
2835
2836
136
    if ( options.noCompare == false ) {
2837
73
        compare(operations, results, data, size);
2838
73
    }
2839
136
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
154
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
154
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
154
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.30k
    do {
2725
2.30k
        auto op = getOp(&parentDs, data, size);
2726
2.30k
        auto module = getModule(parentDs);
2727
2.30k
        if ( module == nullptr ) {
2728
2.04k
            continue;
2729
2.04k
        }
2730
2731
262
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
262
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
2.29k
    } while ( parentDs.Get<bool>() == true );
2738
2739
154
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
142
#if 1
2745
142
    {
2746
142
        std::set<uint64_t> moduleIDs;
2747
142
        for (const auto& m : modules ) {
2748
124
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
124
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
124
            moduleIDs.insert(moduleID);
2756
124
        }
2757
2758
142
        std::set<uint64_t> operationModuleIDs;
2759
160
        for (const auto& op : operations) {
2760
160
            operationModuleIDs.insert(op.first->ID);
2761
160
        }
2762
2763
142
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
142
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
142
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
142
        for (const auto& id : addModuleIDs) {
2768
51
            operations.push_back({ modules.at(id), operations[0].second});
2769
51
        }
2770
142
    }
2771
142
#endif
2772
2773
142
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
142
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
353
    for (size_t i = 0; i < operations.size(); i++) {
2781
211
        auto& operation = operations[i];
2782
2783
211
        auto& module = operation.first;
2784
211
        auto& op = operation.second;
2785
2786
211
        if ( i > 0 ) {
2787
149
            auto& prevModule = operations[i-1].first;
2788
149
            auto& prevOp = operations[i].second;
2789
2790
149
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
79
                auto& curModifier = op.modifier.GetVectorPtr();
2792
79
                if ( curModifier.size() == 0 ) {
2793
15.3k
                    for (size_t j = 0; j < 512; j++) {
2794
15.3k
                        curModifier.push_back(1);
2795
15.3k
                    }
2796
49
                } else {
2797
551
                    for (auto& c : curModifier) {
2798
551
                        c++;
2799
551
                    }
2800
49
                }
2801
79
            }
2802
149
        }
2803
2804
211
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
211
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
211
        const auto& result = results.back();
2811
2812
211
        if ( result.second != std::nullopt ) {
2813
19
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
19
        }
2820
2821
211
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
211
        if ( options.disableTests == false ) {
2830
211
            tests::test(op, result.second);
2831
211
        }
2832
2833
211
        postprocess(module, op, result);
2834
211
    }
2835
2836
142
    if ( options.noCompare == false ) {
2837
62
        compare(operations, results, data, size);
2838
62
    }
2839
142
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
576
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
576
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
576
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.18k
    do {
2725
3.18k
        auto op = getOp(&parentDs, data, size);
2726
3.18k
        auto module = getModule(parentDs);
2727
3.18k
        if ( module == nullptr ) {
2728
2.10k
            continue;
2729
2.10k
        }
2730
2731
1.07k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.07k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
21
            break;
2736
21
        }
2737
3.16k
    } while ( parentDs.Get<bool>() == true );
2738
2739
576
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
562
#if 1
2745
562
    {
2746
562
        std::set<uint64_t> moduleIDs;
2747
1.01k
        for (const auto& m : modules ) {
2748
1.01k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.01k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.01k
            moduleIDs.insert(moduleID);
2756
1.01k
        }
2757
2758
562
        std::set<uint64_t> operationModuleIDs;
2759
1.01k
        for (const auto& op : operations) {
2760
1.01k
            operationModuleIDs.insert(op.first->ID);
2761
1.01k
        }
2762
2763
562
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
562
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
562
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
562
        for (const auto& id : addModuleIDs) {
2768
494
            operations.push_back({ modules.at(id), operations[0].second});
2769
494
        }
2770
562
    }
2771
562
#endif
2772
2773
562
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
562
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.07k
    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
1.00k
            auto& prevModule = operations[i-1].first;
2788
1.00k
            auto& prevOp = operations[i].second;
2789
2790
1.00k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
490
                auto& curModifier = op.modifier.GetVectorPtr();
2792
490
                if ( curModifier.size() == 0 ) {
2793
228k
                    for (size_t j = 0; j < 512; j++) {
2794
227k
                        curModifier.push_back(1);
2795
227k
                    }
2796
445
                } else {
2797
602
                    for (auto& c : curModifier) {
2798
602
                        c++;
2799
602
                    }
2800
45
                }
2801
490
            }
2802
1.00k
        }
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
141
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
141
        }
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
562
    if ( options.noCompare == false ) {
2837
507
        compare(operations, results, data, size);
2838
507
    }
2839
562
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
171
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
171
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
171
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.06k
    do {
2725
2.06k
        auto op = getOp(&parentDs, data, size);
2726
2.06k
        auto module = getModule(parentDs);
2727
2.06k
        if ( module == nullptr ) {
2728
1.83k
            continue;
2729
1.83k
        }
2730
2731
230
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
230
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.05k
    } while ( parentDs.Get<bool>() == true );
2738
2739
171
    if ( operations.empty() == true ) {
2740
17
        return;
2741
17
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
154
#if 1
2745
154
    {
2746
154
        std::set<uint64_t> moduleIDs;
2747
154
        for (const auto& m : modules ) {
2748
120
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
120
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
120
            moduleIDs.insert(moduleID);
2756
120
        }
2757
2758
154
        std::set<uint64_t> operationModuleIDs;
2759
163
        for (const auto& op : operations) {
2760
163
            operationModuleIDs.insert(op.first->ID);
2761
163
        }
2762
2763
154
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
154
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
154
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
154
        for (const auto& id : addModuleIDs) {
2768
46
            operations.push_back({ modules.at(id), operations[0].second});
2769
46
        }
2770
154
    }
2771
154
#endif
2772
2773
154
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
154
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
363
    for (size_t i = 0; i < operations.size(); i++) {
2781
209
        auto& operation = operations[i];
2782
2783
209
        auto& module = operation.first;
2784
209
        auto& op = operation.second;
2785
2786
209
        if ( i > 0 ) {
2787
149
            auto& prevModule = operations[i-1].first;
2788
149
            auto& prevOp = operations[i].second;
2789
2790
149
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
81
                auto& curModifier = op.modifier.GetVectorPtr();
2792
81
                if ( curModifier.size() == 0 ) {
2793
16.9k
                    for (size_t j = 0; j < 512; j++) {
2794
16.8k
                        curModifier.push_back(1);
2795
16.8k
                    }
2796
48
                } else {
2797
453
                    for (auto& c : curModifier) {
2798
453
                        c++;
2799
453
                    }
2800
48
                }
2801
81
            }
2802
149
        }
2803
2804
209
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
209
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
209
        const auto& result = results.back();
2811
2812
209
        if ( result.second != std::nullopt ) {
2813
44
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
44
        }
2820
2821
209
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
209
        if ( options.disableTests == false ) {
2830
209
            tests::test(op, result.second);
2831
209
        }
2832
2833
209
        postprocess(module, op, result);
2834
209
    }
2835
2836
154
    if ( options.noCompare == false ) {
2837
60
        compare(operations, results, data, size);
2838
60
    }
2839
154
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
167
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
167
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
167
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.69k
    do {
2725
1.69k
        auto op = getOp(&parentDs, data, size);
2726
1.69k
        auto module = getModule(parentDs);
2727
1.69k
        if ( module == nullptr ) {
2728
1.45k
            continue;
2729
1.45k
        }
2730
2731
241
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
241
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
1.68k
    } while ( parentDs.Get<bool>() == true );
2738
2739
167
    if ( operations.empty() == true ) {
2740
20
        return;
2741
20
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
147
#if 1
2745
147
    {
2746
147
        std::set<uint64_t> moduleIDs;
2747
147
        for (const auto& m : modules ) {
2748
124
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
124
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
124
            moduleIDs.insert(moduleID);
2756
124
        }
2757
2758
147
        std::set<uint64_t> operationModuleIDs;
2759
156
        for (const auto& op : operations) {
2760
156
            operationModuleIDs.insert(op.first->ID);
2761
156
        }
2762
2763
147
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
147
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
147
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
147
        for (const auto& id : addModuleIDs) {
2768
50
            operations.push_back({ modules.at(id), operations[0].second});
2769
50
        }
2770
147
    }
2771
147
#endif
2772
2773
147
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
147
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
353
    for (size_t i = 0; i < operations.size(); i++) {
2781
206
        auto& operation = operations[i];
2782
2783
206
        auto& module = operation.first;
2784
206
        auto& op = operation.second;
2785
2786
206
        if ( i > 0 ) {
2787
144
            auto& prevModule = operations[i-1].first;
2788
144
            auto& prevOp = operations[i].second;
2789
2790
144
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
74
                auto& curModifier = op.modifier.GetVectorPtr();
2792
74
                if ( curModifier.size() == 0 ) {
2793
23.0k
                    for (size_t j = 0; j < 512; j++) {
2794
23.0k
                        curModifier.push_back(1);
2795
23.0k
                    }
2796
45
                } else {
2797
410
                    for (auto& c : curModifier) {
2798
410
                        c++;
2799
410
                    }
2800
29
                }
2801
74
            }
2802
144
        }
2803
2804
206
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
206
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
206
        const auto& result = results.back();
2811
2812
206
        if ( result.second != std::nullopt ) {
2813
25
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
25
        }
2820
2821
206
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
206
        if ( options.disableTests == false ) {
2830
206
            tests::test(op, result.second);
2831
206
        }
2832
2833
206
        postprocess(module, op, result);
2834
206
    }
2835
2836
147
    if ( options.noCompare == false ) {
2837
62
        compare(operations, results, data, size);
2838
62
    }
2839
147
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
132
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
132
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
132
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.04k
    do {
2725
2.04k
        auto op = getOp(&parentDs, data, size);
2726
2.04k
        auto module = getModule(parentDs);
2727
2.04k
        if ( module == nullptr ) {
2728
1.80k
            continue;
2729
1.80k
        }
2730
2731
241
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
241
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.04k
    } while ( parentDs.Get<bool>() == true );
2738
2739
132
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
122
#if 1
2745
122
    {
2746
122
        std::set<uint64_t> moduleIDs;
2747
132
        for (const auto& m : modules ) {
2748
132
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
132
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
132
            moduleIDs.insert(moduleID);
2756
132
        }
2757
2758
122
        std::set<uint64_t> operationModuleIDs;
2759
183
        for (const auto& op : operations) {
2760
183
            operationModuleIDs.insert(op.first->ID);
2761
183
        }
2762
2763
122
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
122
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
122
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
122
        for (const auto& id : addModuleIDs) {
2768
56
            operations.push_back({ modules.at(id), operations[0].second});
2769
56
        }
2770
122
    }
2771
122
#endif
2772
2773
122
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
122
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
361
    for (size_t i = 0; i < operations.size(); i++) {
2781
239
        auto& operation = operations[i];
2782
2783
239
        auto& module = operation.first;
2784
239
        auto& op = operation.second;
2785
2786
239
        if ( i > 0 ) {
2787
173
            auto& prevModule = operations[i-1].first;
2788
173
            auto& prevOp = operations[i].second;
2789
2790
173
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
101
                auto& curModifier = op.modifier.GetVectorPtr();
2792
101
                if ( curModifier.size() == 0 ) {
2793
34.3k
                    for (size_t j = 0; j < 512; j++) {
2794
34.3k
                        curModifier.push_back(1);
2795
34.3k
                    }
2796
67
                } else {
2797
837
                    for (auto& c : curModifier) {
2798
837
                        c++;
2799
837
                    }
2800
34
                }
2801
101
            }
2802
173
        }
2803
2804
239
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
239
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
239
        const auto& result = results.back();
2811
2812
239
        if ( result.second != std::nullopt ) {
2813
23
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
23
        }
2820
2821
239
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
239
        if ( options.disableTests == false ) {
2830
239
            tests::test(op, result.second);
2831
239
        }
2832
2833
239
        postprocess(module, op, result);
2834
239
    }
2835
2836
122
    if ( options.noCompare == false ) {
2837
66
        compare(operations, results, data, size);
2838
66
    }
2839
122
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
158
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
158
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
158
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.43k
    do {
2725
2.43k
        auto op = getOp(&parentDs, data, size);
2726
2.43k
        auto module = getModule(parentDs);
2727
2.43k
        if ( module == nullptr ) {
2728
2.26k
            continue;
2729
2.26k
        }
2730
2731
173
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
173
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
2.42k
    } while ( parentDs.Get<bool>() == true );
2738
2739
158
    if ( operations.empty() == true ) {
2740
22
        return;
2741
22
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
136
#if 1
2745
136
    {
2746
136
        std::set<uint64_t> moduleIDs;
2747
136
        for (const auto& m : modules ) {
2748
80
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
80
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
80
            moduleIDs.insert(moduleID);
2756
80
        }
2757
2758
136
        std::set<uint64_t> operationModuleIDs;
2759
136
        for (const auto& op : operations) {
2760
110
            operationModuleIDs.insert(op.first->ID);
2761
110
        }
2762
2763
136
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
136
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
136
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
136
        for (const auto& id : addModuleIDs) {
2768
27
            operations.push_back({ modules.at(id), operations[0].second});
2769
27
        }
2770
136
    }
2771
136
#endif
2772
2773
136
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
136
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
273
    for (size_t i = 0; i < operations.size(); i++) {
2781
137
        auto& operation = operations[i];
2782
2783
137
        auto& module = operation.first;
2784
137
        auto& op = operation.second;
2785
2786
137
        if ( i > 0 ) {
2787
97
            auto& prevModule = operations[i-1].first;
2788
97
            auto& prevOp = operations[i].second;
2789
2790
97
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
45
                auto& curModifier = op.modifier.GetVectorPtr();
2792
45
                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
27
                } else {
2797
784
                    for (auto& c : curModifier) {
2798
784
                        c++;
2799
784
                    }
2800
27
                }
2801
45
            }
2802
97
        }
2803
2804
137
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
137
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
137
        const auto& result = results.back();
2811
2812
137
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
137
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
137
        if ( options.disableTests == false ) {
2830
137
            tests::test(op, result.second);
2831
137
        }
2832
2833
137
        postprocess(module, op, result);
2834
137
    }
2835
2836
136
    if ( options.noCompare == false ) {
2837
40
        compare(operations, results, data, size);
2838
40
    }
2839
136
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
279
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
279
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
279
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.14k
    do {
2725
3.14k
        auto op = getOp(&parentDs, data, size);
2726
3.14k
        auto module = getModule(parentDs);
2727
3.14k
        if ( module == nullptr ) {
2728
2.66k
            continue;
2729
2.66k
        }
2730
2731
473
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
473
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
3.13k
    } while ( parentDs.Get<bool>() == true );
2738
2739
279
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
273
#if 1
2745
273
    {
2746
273
        std::set<uint64_t> moduleIDs;
2747
408
        for (const auto& m : modules ) {
2748
408
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
408
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
408
            moduleIDs.insert(moduleID);
2756
408
        }
2757
2758
273
        std::set<uint64_t> operationModuleIDs;
2759
401
        for (const auto& op : operations) {
2760
401
            operationModuleIDs.insert(op.first->ID);
2761
401
        }
2762
2763
273
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
273
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
273
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
273
        for (const auto& id : addModuleIDs) {
2768
194
            operations.push_back({ modules.at(id), operations[0].second});
2769
194
        }
2770
273
    }
2771
273
#endif
2772
2773
273
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
273
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
868
    for (size_t i = 0; i < operations.size(); i++) {
2781
595
        auto& operation = operations[i];
2782
2783
595
        auto& module = operation.first;
2784
595
        auto& op = operation.second;
2785
2786
595
        if ( i > 0 ) {
2787
391
            auto& prevModule = operations[i-1].first;
2788
391
            auto& prevOp = operations[i].second;
2789
2790
391
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
181
                auto& curModifier = op.modifier.GetVectorPtr();
2792
181
                if ( curModifier.size() == 0 ) {
2793
27.7k
                    for (size_t j = 0; j < 512; j++) {
2794
27.6k
                        curModifier.push_back(1);
2795
27.6k
                    }
2796
127
                } else {
2797
3.87k
                    for (auto& c : curModifier) {
2798
3.87k
                        c++;
2799
3.87k
                    }
2800
127
                }
2801
181
            }
2802
391
        }
2803
2804
595
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
595
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
595
        const auto& result = results.back();
2811
2812
595
        if ( result.second != std::nullopt ) {
2813
48
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
48
        }
2820
2821
595
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
595
        if ( options.disableTests == false ) {
2830
595
            tests::test(op, result.second);
2831
595
        }
2832
2833
595
        postprocess(module, op, result);
2834
595
    }
2835
2836
273
    if ( options.noCompare == false ) {
2837
204
        compare(operations, results, data, size);
2838
204
    }
2839
273
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
6.14k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
6.14k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
6.14k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
15.9k
    do {
2725
15.9k
        auto op = getOp(&parentDs, data, size);
2726
15.9k
        auto module = getModule(parentDs);
2727
15.9k
        if ( module == nullptr ) {
2728
7.58k
            continue;
2729
7.58k
        }
2730
2731
8.41k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
8.41k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
98
            break;
2736
98
        }
2737
15.8k
    } while ( parentDs.Get<bool>() == true );
2738
2739
6.14k
    if ( operations.empty() == true ) {
2740
81
        return;
2741
81
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
6.06k
#if 1
2745
6.06k
    {
2746
6.06k
        std::set<uint64_t> moduleIDs;
2747
11.5k
        for (const auto& m : modules ) {
2748
11.5k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
11.5k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
11.5k
            moduleIDs.insert(moduleID);
2756
11.5k
        }
2757
2758
6.06k
        std::set<uint64_t> operationModuleIDs;
2759
8.11k
        for (const auto& op : operations) {
2760
8.11k
            operationModuleIDs.insert(op.first->ID);
2761
8.11k
        }
2762
2763
6.06k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
6.06k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
6.06k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
6.06k
        for (const auto& id : addModuleIDs) {
2768
5.77k
            operations.push_back({ modules.at(id), operations[0].second});
2769
5.77k
        }
2770
6.06k
    }
2771
6.06k
#endif
2772
2773
6.06k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
6.06k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
19.9k
    for (size_t i = 0; i < operations.size(); i++) {
2781
13.8k
        auto& operation = operations[i];
2782
2783
13.8k
        auto& module = operation.first;
2784
13.8k
        auto& op = operation.second;
2785
2786
13.8k
        if ( i > 0 ) {
2787
8.09k
            auto& prevModule = operations[i-1].first;
2788
8.09k
            auto& prevOp = operations[i].second;
2789
2790
8.09k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2.28k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2.28k
                if ( curModifier.size() == 0 ) {
2793
603k
                    for (size_t j = 0; j < 512; j++) {
2794
602k
                        curModifier.push_back(1);
2795
602k
                    }
2796
1.17k
                } else {
2797
51.9k
                    for (auto& c : curModifier) {
2798
51.9k
                        c++;
2799
51.9k
                    }
2800
1.10k
                }
2801
2.28k
            }
2802
8.09k
        }
2803
2804
13.8k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
13.8k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
13.8k
        const auto& result = results.back();
2811
2812
13.8k
        if ( result.second != std::nullopt ) {
2813
3.51k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.51k
        }
2820
2821
13.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
13.8k
        if ( options.disableTests == false ) {
2830
13.8k
            tests::test(op, result.second);
2831
13.8k
        }
2832
2833
13.8k
        postprocess(module, op, result);
2834
13.8k
    }
2835
2836
6.06k
    if ( options.noCompare == false ) {
2837
5.79k
        compare(operations, results, data, size);
2838
5.79k
    }
2839
6.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
126
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
126
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
126
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.35k
    do {
2725
2.35k
        auto op = getOp(&parentDs, data, size);
2726
2.35k
        auto module = getModule(parentDs);
2727
2.35k
        if ( module == nullptr ) {
2728
2.09k
            continue;
2729
2.09k
        }
2730
2731
254
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
254
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
2.34k
    } while ( parentDs.Get<bool>() == true );
2738
2739
126
    if ( operations.empty() == true ) {
2740
3
        return;
2741
3
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
123
#if 1
2745
123
    {
2746
123
        std::set<uint64_t> moduleIDs;
2747
130
        for (const auto& m : modules ) {
2748
130
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
130
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
130
            moduleIDs.insert(moduleID);
2756
130
        }
2757
2758
123
        std::set<uint64_t> operationModuleIDs;
2759
160
        for (const auto& op : operations) {
2760
160
            operationModuleIDs.insert(op.first->ID);
2761
160
        }
2762
2763
123
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
123
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
123
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
123
        for (const auto& id : addModuleIDs) {
2768
55
            operations.push_back({ modules.at(id), operations[0].second});
2769
55
        }
2770
123
    }
2771
123
#endif
2772
2773
123
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
123
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
338
    for (size_t i = 0; i < operations.size(); i++) {
2781
215
        auto& operation = operations[i];
2782
2783
215
        auto& module = operation.first;
2784
215
        auto& op = operation.second;
2785
2786
215
        if ( i > 0 ) {
2787
150
            auto& prevModule = operations[i-1].first;
2788
150
            auto& prevOp = operations[i].second;
2789
2790
150
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
79
                auto& curModifier = op.modifier.GetVectorPtr();
2792
79
                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
50
                } else {
2797
628
                    for (auto& c : curModifier) {
2798
628
                        c++;
2799
628
                    }
2800
29
                }
2801
79
            }
2802
150
        }
2803
2804
215
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
215
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
215
        const auto& result = results.back();
2811
2812
215
        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
215
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
215
        if ( options.disableTests == false ) {
2830
215
            tests::test(op, result.second);
2831
215
        }
2832
2833
215
        postprocess(module, op, result);
2834
215
    }
2835
2836
123
    if ( options.noCompare == false ) {
2837
65
        compare(operations, results, data, size);
2838
65
    }
2839
123
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
339
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
339
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
339
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.87k
    do {
2725
2.87k
        auto op = getOp(&parentDs, data, size);
2726
2.87k
        auto module = getModule(parentDs);
2727
2.87k
        if ( module == nullptr ) {
2728
2.28k
            continue;
2729
2.28k
        }
2730
2731
593
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
593
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
32
            break;
2736
32
        }
2737
2.84k
    } while ( parentDs.Get<bool>() == true );
2738
2739
339
    if ( operations.empty() == true ) {
2740
19
        return;
2741
19
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
320
#if 1
2745
320
    {
2746
320
        std::set<uint64_t> moduleIDs;
2747
516
        for (const auto& m : modules ) {
2748
516
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
516
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
516
            moduleIDs.insert(moduleID);
2756
516
        }
2757
2758
320
        std::set<uint64_t> operationModuleIDs;
2759
520
        for (const auto& op : operations) {
2760
520
            operationModuleIDs.insert(op.first->ID);
2761
520
        }
2762
2763
320
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
320
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
320
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
320
        for (const auto& id : addModuleIDs) {
2768
247
            operations.push_back({ modules.at(id), operations[0].second});
2769
247
        }
2770
320
    }
2771
320
#endif
2772
2773
320
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
320
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.08k
    for (size_t i = 0; i < operations.size(); i++) {
2781
767
        auto& operation = operations[i];
2782
2783
767
        auto& module = operation.first;
2784
767
        auto& op = operation.second;
2785
2786
767
        if ( i > 0 ) {
2787
509
            auto& prevModule = operations[i-1].first;
2788
509
            auto& prevOp = operations[i].second;
2789
2790
509
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
242
                auto& curModifier = op.modifier.GetVectorPtr();
2792
242
                if ( curModifier.size() == 0 ) {
2793
110k
                    for (size_t j = 0; j < 512; j++) {
2794
110k
                        curModifier.push_back(1);
2795
110k
                    }
2796
216
                } else {
2797
31.2k
                    for (auto& c : curModifier) {
2798
31.2k
                        c++;
2799
31.2k
                    }
2800
26
                }
2801
242
            }
2802
509
        }
2803
2804
767
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
767
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
767
        const auto& result = results.back();
2811
2812
767
        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
767
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
767
        if ( options.disableTests == false ) {
2830
767
            tests::test(op, result.second);
2831
767
        }
2832
2833
767
        postprocess(module, op, result);
2834
767
    }
2835
2836
320
    if ( options.noCompare == false ) {
2837
258
        compare(operations, results, data, size);
2838
258
    }
2839
320
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
121
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
121
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
121
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.51k
    do {
2725
1.51k
        auto op = getOp(&parentDs, data, size);
2726
1.51k
        auto module = getModule(parentDs);
2727
1.51k
        if ( module == nullptr ) {
2728
1.36k
            continue;
2729
1.36k
        }
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
7
            break;
2736
7
        }
2737
1.51k
    } while ( parentDs.Get<bool>() == true );
2738
2739
121
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
106
#if 1
2745
106
    {
2746
106
        std::set<uint64_t> moduleIDs;
2747
106
        for (const auto& m : modules ) {
2748
86
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
86
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
86
            moduleIDs.insert(moduleID);
2756
86
        }
2757
2758
106
        std::set<uint64_t> operationModuleIDs;
2759
106
        for (const auto& op : operations) {
2760
95
            operationModuleIDs.insert(op.first->ID);
2761
95
        }
2762
2763
106
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
106
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
106
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
106
        for (const auto& id : addModuleIDs) {
2768
34
            operations.push_back({ modules.at(id), operations[0].second});
2769
34
        }
2770
106
    }
2771
106
#endif
2772
2773
106
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
106
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
235
    for (size_t i = 0; i < operations.size(); i++) {
2781
129
        auto& operation = operations[i];
2782
2783
129
        auto& module = operation.first;
2784
129
        auto& op = operation.second;
2785
2786
129
        if ( i > 0 ) {
2787
86
            auto& prevModule = operations[i-1].first;
2788
86
            auto& prevOp = operations[i].second;
2789
2790
86
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
35
                auto& curModifier = op.modifier.GetVectorPtr();
2792
35
                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
20
                } else {
2797
286
                    for (auto& c : curModifier) {
2798
286
                        c++;
2799
286
                    }
2800
20
                }
2801
35
            }
2802
86
        }
2803
2804
129
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
129
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
129
        const auto& result = results.back();
2811
2812
129
        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
129
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
129
        if ( options.disableTests == false ) {
2830
129
            tests::test(op, result.second);
2831
129
        }
2832
2833
129
        postprocess(module, op, result);
2834
129
    }
2835
2836
106
    if ( options.noCompare == false ) {
2837
43
        compare(operations, results, data, size);
2838
43
    }
2839
106
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
150
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
150
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
150
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.67k
    do {
2725
1.67k
        auto op = getOp(&parentDs, data, size);
2726
1.67k
        auto module = getModule(parentDs);
2727
1.67k
        if ( module == nullptr ) {
2728
1.44k
            continue;
2729
1.44k
        }
2730
2731
230
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
230
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
1.66k
    } while ( parentDs.Get<bool>() == true );
2738
2739
150
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
136
#if 1
2745
136
    {
2746
136
        std::set<uint64_t> moduleIDs;
2747
136
        for (const auto& m : modules ) {
2748
108
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
108
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
108
            moduleIDs.insert(moduleID);
2756
108
        }
2757
2758
136
        std::set<uint64_t> operationModuleIDs;
2759
136
        for (const auto& op : operations) {
2760
132
            operationModuleIDs.insert(op.first->ID);
2761
132
        }
2762
2763
136
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
136
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
136
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
136
        for (const auto& id : addModuleIDs) {
2768
42
            operations.push_back({ modules.at(id), operations[0].second});
2769
42
        }
2770
136
    }
2771
136
#endif
2772
2773
136
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
136
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
310
    for (size_t i = 0; i < operations.size(); i++) {
2781
174
        auto& operation = operations[i];
2782
2783
174
        auto& module = operation.first;
2784
174
        auto& op = operation.second;
2785
2786
174
        if ( i > 0 ) {
2787
120
            auto& prevModule = operations[i-1].first;
2788
120
            auto& prevOp = operations[i].second;
2789
2790
120
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
56
                auto& curModifier = op.modifier.GetVectorPtr();
2792
56
                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
30
                } else {
2797
330
                    for (auto& c : curModifier) {
2798
330
                        c++;
2799
330
                    }
2800
30
                }
2801
56
            }
2802
120
        }
2803
2804
174
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
174
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
174
        const auto& result = results.back();
2811
2812
174
        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
174
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
174
        if ( options.disableTests == false ) {
2830
174
            tests::test(op, result.second);
2831
174
        }
2832
2833
174
        postprocess(module, op, result);
2834
174
    }
2835
2836
136
    if ( options.noCompare == false ) {
2837
54
        compare(operations, results, data, size);
2838
54
    }
2839
136
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
179
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
179
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
179
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.03k
    do {
2725
3.03k
        auto op = getOp(&parentDs, data, size);
2726
3.03k
        auto module = getModule(parentDs);
2727
3.03k
        if ( module == nullptr ) {
2728
2.78k
            continue;
2729
2.78k
        }
2730
2731
245
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
245
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
3.02k
    } while ( parentDs.Get<bool>() == true );
2738
2739
179
    if ( operations.empty() == true ) {
2740
27
        return;
2741
27
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
152
#if 1
2745
152
    {
2746
152
        std::set<uint64_t> moduleIDs;
2747
152
        for (const auto& m : modules ) {
2748
82
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
82
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
82
            moduleIDs.insert(moduleID);
2756
82
        }
2757
2758
152
        std::set<uint64_t> operationModuleIDs;
2759
152
        for (const auto& op : operations) {
2760
114
            operationModuleIDs.insert(op.first->ID);
2761
114
        }
2762
2763
152
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
152
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
152
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
152
        for (const auto& id : addModuleIDs) {
2768
27
            operations.push_back({ modules.at(id), operations[0].second});
2769
27
        }
2770
152
    }
2771
152
#endif
2772
2773
152
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
152
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
293
    for (size_t i = 0; i < operations.size(); i++) {
2781
141
        auto& operation = operations[i];
2782
2783
141
        auto& module = operation.first;
2784
141
        auto& op = operation.second;
2785
2786
141
        if ( i > 0 ) {
2787
100
            auto& prevModule = operations[i-1].first;
2788
100
            auto& prevOp = operations[i].second;
2789
2790
100
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
51
                auto& curModifier = op.modifier.GetVectorPtr();
2792
51
                if ( curModifier.size() == 0 ) {
2793
8.20k
                    for (size_t j = 0; j < 512; j++) {
2794
8.19k
                        curModifier.push_back(1);
2795
8.19k
                    }
2796
35
                } else {
2797
579
                    for (auto& c : curModifier) {
2798
579
                        c++;
2799
579
                    }
2800
35
                }
2801
51
            }
2802
100
        }
2803
2804
141
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
141
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
141
        const auto& result = results.back();
2811
2812
141
        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
141
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
141
        if ( options.disableTests == false ) {
2830
141
            tests::test(op, result.second);
2831
141
        }
2832
2833
141
        postprocess(module, op, result);
2834
141
    }
2835
2836
152
    if ( options.noCompare == false ) {
2837
41
        compare(operations, results, data, size);
2838
41
    }
2839
152
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
95
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
95
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
95
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.53k
    do {
2725
2.53k
        auto op = getOp(&parentDs, data, size);
2726
2.53k
        auto module = getModule(parentDs);
2727
2.53k
        if ( module == nullptr ) {
2728
2.39k
            continue;
2729
2.39k
        }
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
6
            break;
2736
6
        }
2737
2.52k
    } while ( parentDs.Get<bool>() == true );
2738
2739
95
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
86
#if 1
2745
86
    {
2746
86
        std::set<uint64_t> moduleIDs;
2747
86
        for (const auto& m : modules ) {
2748
60
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
60
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
60
            moduleIDs.insert(moduleID);
2756
60
        }
2757
2758
86
        std::set<uint64_t> operationModuleIDs;
2759
87
        for (const auto& op : operations) {
2760
87
            operationModuleIDs.insert(op.first->ID);
2761
87
        }
2762
2763
86
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
86
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
86
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
86
        for (const auto& id : addModuleIDs) {
2768
21
            operations.push_back({ modules.at(id), operations[0].second});
2769
21
        }
2770
86
    }
2771
86
#endif
2772
2773
86
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
86
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
194
    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
78
            auto& prevModule = operations[i-1].first;
2788
78
            auto& prevOp = operations[i].second;
2789
2790
78
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
42
                auto& curModifier = op.modifier.GetVectorPtr();
2792
42
                if ( curModifier.size() == 0 ) {
2793
10.2k
                    for (size_t j = 0; j < 512; j++) {
2794
10.2k
                        curModifier.push_back(1);
2795
10.2k
                    }
2796
22
                } else {
2797
1.37k
                    for (auto& c : curModifier) {
2798
1.37k
                        c++;
2799
1.37k
                    }
2800
22
                }
2801
42
            }
2802
78
        }
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
86
    if ( options.noCompare == false ) {
2837
30
        compare(operations, results, data, size);
2838
30
    }
2839
86
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
181
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
181
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
181
    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
1.76k
            continue;
2729
1.76k
        }
2730
2731
268
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
268
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
2.02k
    } while ( parentDs.Get<bool>() == true );
2738
2739
181
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
176
#if 1
2745
176
    {
2746
176
        std::set<uint64_t> moduleIDs;
2747
176
        for (const auto& m : modules ) {
2748
104
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
104
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
104
            moduleIDs.insert(moduleID);
2756
104
        }
2757
2758
176
        std::set<uint64_t> operationModuleIDs;
2759
176
        for (const auto& op : operations) {
2760
144
            operationModuleIDs.insert(op.first->ID);
2761
144
        }
2762
2763
176
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
176
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
176
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
176
        for (const auto& id : addModuleIDs) {
2768
39
            operations.push_back({ modules.at(id), operations[0].second});
2769
39
        }
2770
176
    }
2771
176
#endif
2772
2773
176
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
176
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
359
    for (size_t i = 0; i < operations.size(); i++) {
2781
183
        auto& operation = operations[i];
2782
2783
183
        auto& module = operation.first;
2784
183
        auto& op = operation.second;
2785
2786
183
        if ( i > 0 ) {
2787
131
            auto& prevModule = operations[i-1].first;
2788
131
            auto& prevOp = operations[i].second;
2789
2790
131
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
69
                auto& curModifier = op.modifier.GetVectorPtr();
2792
69
                if ( curModifier.size() == 0 ) {
2793
17.9k
                    for (size_t j = 0; j < 512; j++) {
2794
17.9k
                        curModifier.push_back(1);
2795
17.9k
                    }
2796
35
                } else {
2797
330
                    for (auto& c : curModifier) {
2798
330
                        c++;
2799
330
                    }
2800
34
                }
2801
69
            }
2802
131
        }
2803
2804
183
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
183
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
183
        const auto& result = results.back();
2811
2812
183
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
183
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
183
        if ( options.disableTests == false ) {
2830
183
            tests::test(op, result.second);
2831
183
        }
2832
2833
183
        postprocess(module, op, result);
2834
183
    }
2835
2836
176
    if ( options.noCompare == false ) {
2837
52
        compare(operations, results, data, size);
2838
52
    }
2839
176
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
211
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
211
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
211
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.93k
    do {
2725
1.93k
        auto op = getOp(&parentDs, data, size);
2726
1.93k
        auto module = getModule(parentDs);
2727
1.93k
        if ( module == nullptr ) {
2728
1.69k
            continue;
2729
1.69k
        }
2730
2731
243
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
243
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.92k
    } while ( parentDs.Get<bool>() == true );
2738
2739
211
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
205
#if 1
2745
205
    {
2746
205
        std::set<uint64_t> moduleIDs;
2747
205
        for (const auto& m : modules ) {
2748
68
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
68
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
68
            moduleIDs.insert(moduleID);
2756
68
        }
2757
2758
205
        std::set<uint64_t> operationModuleIDs;
2759
205
        for (const auto& op : operations) {
2760
95
            operationModuleIDs.insert(op.first->ID);
2761
95
        }
2762
2763
205
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
205
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
205
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
205
        for (const auto& id : addModuleIDs) {
2768
23
            operations.push_back({ modules.at(id), operations[0].second});
2769
23
        }
2770
205
    }
2771
205
#endif
2772
2773
205
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
205
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
323
    for (size_t i = 0; i < operations.size(); i++) {
2781
118
        auto& operation = operations[i];
2782
2783
118
        auto& module = operation.first;
2784
118
        auto& op = operation.second;
2785
2786
118
        if ( i > 0 ) {
2787
84
            auto& prevModule = operations[i-1].first;
2788
84
            auto& prevOp = operations[i].second;
2789
2790
84
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                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
618
                    for (auto& c : curModifier) {
2798
618
                        c++;
2799
618
                    }
2800
21
                }
2801
43
            }
2802
84
        }
2803
2804
118
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
118
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
118
        const auto& result = results.back();
2811
2812
118
        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
118
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
118
        if ( options.disableTests == false ) {
2830
118
            tests::test(op, result.second);
2831
118
        }
2832
2833
118
        postprocess(module, op, result);
2834
118
    }
2835
2836
205
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
205
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
201
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
201
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
201
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.99k
    do {
2725
1.99k
        auto op = getOp(&parentDs, data, size);
2726
1.99k
        auto module = getModule(parentDs);
2727
1.99k
        if ( module == nullptr ) {
2728
1.73k
            continue;
2729
1.73k
        }
2730
2731
259
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
259
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.98k
    } while ( parentDs.Get<bool>() == true );
2738
2739
201
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
190
#if 1
2745
190
    {
2746
190
        std::set<uint64_t> moduleIDs;
2747
190
        for (const auto& m : modules ) {
2748
80
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
80
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
80
            moduleIDs.insert(moduleID);
2756
80
        }
2757
2758
190
        std::set<uint64_t> operationModuleIDs;
2759
190
        for (const auto& op : operations) {
2760
117
            operationModuleIDs.insert(op.first->ID);
2761
117
        }
2762
2763
190
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
190
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
190
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
190
        for (const auto& id : addModuleIDs) {
2768
28
            operations.push_back({ modules.at(id), operations[0].second});
2769
28
        }
2770
190
    }
2771
190
#endif
2772
2773
190
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
190
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
335
    for (size_t i = 0; i < operations.size(); i++) {
2781
145
        auto& operation = operations[i];
2782
2783
145
        auto& module = operation.first;
2784
145
        auto& op = operation.second;
2785
2786
145
        if ( i > 0 ) {
2787
105
            auto& prevModule = operations[i-1].first;
2788
105
            auto& prevOp = operations[i].second;
2789
2790
105
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
57
                auto& curModifier = op.modifier.GetVectorPtr();
2792
57
                if ( curModifier.size() == 0 ) {
2793
11.7k
                    for (size_t j = 0; j < 512; j++) {
2794
11.7k
                        curModifier.push_back(1);
2795
11.7k
                    }
2796
34
                } else {
2797
370
                    for (auto& c : curModifier) {
2798
370
                        c++;
2799
370
                    }
2800
34
                }
2801
57
            }
2802
105
        }
2803
2804
145
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
145
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
145
        const auto& result = results.back();
2811
2812
145
        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
145
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
145
        if ( options.disableTests == false ) {
2830
145
            tests::test(op, result.second);
2831
145
        }
2832
2833
145
        postprocess(module, op, result);
2834
145
    }
2835
2836
190
    if ( options.noCompare == false ) {
2837
40
        compare(operations, results, data, size);
2838
40
    }
2839
190
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
128
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
128
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
128
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.14k
    do {
2725
2.14k
        auto op = getOp(&parentDs, data, size);
2726
2.14k
        auto module = getModule(parentDs);
2727
2.14k
        if ( module == nullptr ) {
2728
1.97k
            continue;
2729
1.97k
        }
2730
2731
173
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
173
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.14k
    } while ( parentDs.Get<bool>() == true );
2738
2739
128
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
116
#if 1
2745
116
    {
2746
116
        std::set<uint64_t> moduleIDs;
2747
116
        for (const auto& m : modules ) {
2748
66
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
66
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
66
            moduleIDs.insert(moduleID);
2756
66
        }
2757
2758
116
        std::set<uint64_t> operationModuleIDs;
2759
116
        for (const auto& op : operations) {
2760
98
            operationModuleIDs.insert(op.first->ID);
2761
98
        }
2762
2763
116
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
116
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
116
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
116
        for (const auto& id : addModuleIDs) {
2768
21
            operations.push_back({ modules.at(id), operations[0].second});
2769
21
        }
2770
116
    }
2771
116
#endif
2772
2773
116
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
116
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
235
    for (size_t i = 0; i < operations.size(); i++) {
2781
119
        auto& operation = operations[i];
2782
2783
119
        auto& module = operation.first;
2784
119
        auto& op = operation.second;
2785
2786
119
        if ( i > 0 ) {
2787
86
            auto& prevModule = operations[i-1].first;
2788
86
            auto& prevOp = operations[i].second;
2789
2790
86
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
45
                auto& curModifier = op.modifier.GetVectorPtr();
2792
45
                if ( curModifier.size() == 0 ) {
2793
12.8k
                    for (size_t j = 0; j < 512; j++) {
2794
12.8k
                        curModifier.push_back(1);
2795
12.8k
                    }
2796
25
                } else {
2797
331
                    for (auto& c : curModifier) {
2798
331
                        c++;
2799
331
                    }
2800
20
                }
2801
45
            }
2802
86
        }
2803
2804
119
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
119
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
119
        const auto& result = results.back();
2811
2812
119
        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
119
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
119
        if ( options.disableTests == false ) {
2830
119
            tests::test(op, result.second);
2831
119
        }
2832
2833
119
        postprocess(module, op, result);
2834
119
    }
2835
2836
116
    if ( options.noCompare == false ) {
2837
33
        compare(operations, results, data, size);
2838
33
    }
2839
116
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
138
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
138
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
138
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.48k
    do {
2725
2.48k
        auto op = getOp(&parentDs, data, size);
2726
2.48k
        auto module = getModule(parentDs);
2727
2.48k
        if ( module == nullptr ) {
2728
2.28k
            continue;
2729
2.28k
        }
2730
2731
201
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
201
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.47k
    } while ( parentDs.Get<bool>() == true );
2738
2739
138
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
128
#if 1
2745
128
    {
2746
128
        std::set<uint64_t> moduleIDs;
2747
128
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
128
        std::set<uint64_t> operationModuleIDs;
2759
128
        for (const auto& op : operations) {
2760
102
            operationModuleIDs.insert(op.first->ID);
2761
102
        }
2762
2763
128
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
128
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
128
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
128
        for (const auto& id : addModuleIDs) {
2768
21
            operations.push_back({ modules.at(id), operations[0].second});
2769
21
        }
2770
128
    }
2771
128
#endif
2772
2773
128
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
128
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
251
    for (size_t i = 0; i < operations.size(); i++) {
2781
123
        auto& operation = operations[i];
2782
2783
123
        auto& module = operation.first;
2784
123
        auto& op = operation.second;
2785
2786
123
        if ( i > 0 ) {
2787
87
            auto& prevModule = operations[i-1].first;
2788
87
            auto& prevOp = operations[i].second;
2789
2790
87
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                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
25
                } else {
2797
327
                    for (auto& c : curModifier) {
2798
327
                        c++;
2799
327
                    }
2800
25
                }
2801
43
            }
2802
87
        }
2803
2804
123
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
123
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
123
        const auto& result = results.back();
2811
2812
123
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
123
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
123
        if ( options.disableTests == false ) {
2830
123
            tests::test(op, result.second);
2831
123
        }
2832
2833
123
        postprocess(module, op, result);
2834
123
    }
2835
2836
128
    if ( options.noCompare == false ) {
2837
36
        compare(operations, results, data, size);
2838
36
    }
2839
128
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
116
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
116
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
116
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.96k
    do {
2725
1.96k
        auto op = getOp(&parentDs, data, size);
2726
1.96k
        auto module = getModule(parentDs);
2727
1.96k
        if ( module == nullptr ) {
2728
1.76k
            continue;
2729
1.76k
        }
2730
2731
201
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
201
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
1.96k
    } while ( parentDs.Get<bool>() == true );
2738
2739
116
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
107
#if 1
2745
107
    {
2746
107
        std::set<uint64_t> moduleIDs;
2747
107
        for (const auto& m : modules ) {
2748
60
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
60
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
60
            moduleIDs.insert(moduleID);
2756
60
        }
2757
2758
107
        std::set<uint64_t> operationModuleIDs;
2759
107
        for (const auto& op : operations) {
2760
99
            operationModuleIDs.insert(op.first->ID);
2761
99
        }
2762
2763
107
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
107
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
107
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
107
        for (const auto& id : addModuleIDs) {
2768
18
            operations.push_back({ modules.at(id), operations[0].second});
2769
18
        }
2770
107
    }
2771
107
#endif
2772
2773
107
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
107
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
224
    for (size_t i = 0; i < operations.size(); i++) {
2781
117
        auto& operation = operations[i];
2782
2783
117
        auto& module = operation.first;
2784
117
        auto& op = operation.second;
2785
2786
117
        if ( i > 0 ) {
2787
87
            auto& prevModule = operations[i-1].first;
2788
87
            auto& prevOp = operations[i].second;
2789
2790
87
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                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
28
                } else {
2797
1.81k
                    for (auto& c : curModifier) {
2798
1.81k
                        c++;
2799
1.81k
                    }
2800
28
                }
2801
43
            }
2802
87
        }
2803
2804
117
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
117
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
117
        const auto& result = results.back();
2811
2812
117
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
117
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
117
        if ( options.disableTests == false ) {
2830
117
            tests::test(op, result.second);
2831
117
        }
2832
2833
117
        postprocess(module, op, result);
2834
117
    }
2835
2836
107
    if ( options.noCompare == false ) {
2837
30
        compare(operations, results, data, size);
2838
30
    }
2839
107
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
152
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
152
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
152
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.12k
    do {
2725
2.12k
        auto op = getOp(&parentDs, data, size);
2726
2.12k
        auto module = getModule(parentDs);
2727
2.12k
        if ( module == nullptr ) {
2728
1.88k
            continue;
2729
1.88k
        }
2730
2731
240
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
240
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.11k
    } while ( parentDs.Get<bool>() == true );
2738
2739
152
    if ( operations.empty() == true ) {
2740
19
        return;
2741
19
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
133
#if 1
2745
133
    {
2746
133
        std::set<uint64_t> moduleIDs;
2747
133
        for (const auto& m : modules ) {
2748
94
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
94
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
94
            moduleIDs.insert(moduleID);
2756
94
        }
2757
2758
133
        std::set<uint64_t> operationModuleIDs;
2759
133
        for (const auto& op : operations) {
2760
129
            operationModuleIDs.insert(op.first->ID);
2761
129
        }
2762
2763
133
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
133
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
133
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
133
        for (const auto& id : addModuleIDs) {
2768
34
            operations.push_back({ modules.at(id), operations[0].second});
2769
34
        }
2770
133
    }
2771
133
#endif
2772
2773
133
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
133
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
296
    for (size_t i = 0; i < operations.size(); i++) {
2781
163
        auto& operation = operations[i];
2782
2783
163
        auto& module = operation.first;
2784
163
        auto& op = operation.second;
2785
2786
163
        if ( i > 0 ) {
2787
116
            auto& prevModule = operations[i-1].first;
2788
116
            auto& prevOp = operations[i].second;
2789
2790
116
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
61
                auto& curModifier = op.modifier.GetVectorPtr();
2792
61
                if ( curModifier.size() == 0 ) {
2793
17.9k
                    for (size_t j = 0; j < 512; j++) {
2794
17.9k
                        curModifier.push_back(1);
2795
17.9k
                    }
2796
35
                } else {
2797
606
                    for (auto& c : curModifier) {
2798
606
                        c++;
2799
606
                    }
2800
26
                }
2801
61
            }
2802
116
        }
2803
2804
163
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
163
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
163
        const auto& result = results.back();
2811
2812
163
        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
163
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
163
        if ( options.disableTests == false ) {
2830
163
            tests::test(op, result.second);
2831
163
        }
2832
2833
163
        postprocess(module, op, result);
2834
163
    }
2835
2836
133
    if ( options.noCompare == false ) {
2837
47
        compare(operations, results, data, size);
2838
47
    }
2839
133
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
107
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
107
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
107
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.24k
    do {
2725
2.24k
        auto op = getOp(&parentDs, data, size);
2726
2.24k
        auto module = getModule(parentDs);
2727
2.24k
        if ( module == nullptr ) {
2728
2.05k
            continue;
2729
2.05k
        }
2730
2731
197
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
197
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.24k
    } while ( parentDs.Get<bool>() == true );
2738
2739
107
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
103
#if 1
2745
103
    {
2746
103
        std::set<uint64_t> moduleIDs;
2747
103
        for (const auto& m : modules ) {
2748
80
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
80
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
80
            moduleIDs.insert(moduleID);
2756
80
        }
2757
2758
103
        std::set<uint64_t> operationModuleIDs;
2759
114
        for (const auto& op : operations) {
2760
114
            operationModuleIDs.insert(op.first->ID);
2761
114
        }
2762
2763
103
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
103
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
103
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
103
        for (const auto& id : addModuleIDs) {
2768
30
            operations.push_back({ modules.at(id), operations[0].second});
2769
30
        }
2770
103
    }
2771
103
#endif
2772
2773
103
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
103
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
247
    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
104
            auto& prevModule = operations[i-1].first;
2788
104
            auto& prevOp = operations[i].second;
2789
2790
104
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
56
                auto& curModifier = op.modifier.GetVectorPtr();
2792
56
                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
34
                } else {
2797
278
                    for (auto& c : curModifier) {
2798
278
                        c++;
2799
278
                    }
2800
34
                }
2801
56
            }
2802
104
        }
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
103
    if ( options.noCompare == false ) {
2837
40
        compare(operations, results, data, size);
2838
40
    }
2839
103
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
132
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
132
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
132
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.65k
    do {
2725
2.65k
        auto op = getOp(&parentDs, data, size);
2726
2.65k
        auto module = getModule(parentDs);
2727
2.65k
        if ( module == nullptr ) {
2728
2.46k
            continue;
2729
2.46k
        }
2730
2731
185
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
185
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.64k
    } while ( parentDs.Get<bool>() == true );
2738
2739
132
    if ( operations.empty() == true ) {
2740
23
        return;
2741
23
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
109
#if 1
2745
109
    {
2746
109
        std::set<uint64_t> moduleIDs;
2747
109
        for (const auto& m : modules ) {
2748
80
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
80
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
80
            moduleIDs.insert(moduleID);
2756
80
        }
2757
2758
109
        std::set<uint64_t> operationModuleIDs;
2759
116
        for (const auto& op : operations) {
2760
116
            operationModuleIDs.insert(op.first->ID);
2761
116
        }
2762
2763
109
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
109
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
109
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
109
        for (const auto& id : addModuleIDs) {
2768
29
            operations.push_back({ modules.at(id), operations[0].second});
2769
29
        }
2770
109
    }
2771
109
#endif
2772
2773
109
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
109
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
254
    for (size_t i = 0; i < operations.size(); i++) {
2781
145
        auto& operation = operations[i];
2782
2783
145
        auto& module = operation.first;
2784
145
        auto& op = operation.second;
2785
2786
145
        if ( i > 0 ) {
2787
105
            auto& prevModule = operations[i-1].first;
2788
105
            auto& prevOp = operations[i].second;
2789
2790
105
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
59
                auto& curModifier = op.modifier.GetVectorPtr();
2792
59
                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
31
                } else {
2797
780
                    for (auto& c : curModifier) {
2798
780
                        c++;
2799
780
                    }
2800
31
                }
2801
59
            }
2802
105
        }
2803
2804
145
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
145
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
145
        const auto& result = results.back();
2811
2812
145
        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
145
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
145
        if ( options.disableTests == false ) {
2830
145
            tests::test(op, result.second);
2831
145
        }
2832
2833
145
        postprocess(module, op, result);
2834
145
    }
2835
2836
109
    if ( options.noCompare == false ) {
2837
40
        compare(operations, results, data, size);
2838
40
    }
2839
109
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
118
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
118
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
118
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.50k
    do {
2725
2.50k
        auto op = getOp(&parentDs, data, size);
2726
2.50k
        auto module = getModule(parentDs);
2727
2.50k
        if ( module == nullptr ) {
2728
2.35k
            continue;
2729
2.35k
        }
2730
2731
155
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
155
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.50k
    } while ( parentDs.Get<bool>() == true );
2738
2739
118
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
97
#if 1
2745
97
    {
2746
97
        std::set<uint64_t> moduleIDs;
2747
97
        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
97
        std::set<uint64_t> operationModuleIDs;
2759
97
        for (const auto& op : operations) {
2760
96
            operationModuleIDs.insert(op.first->ID);
2761
96
        }
2762
2763
97
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
97
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
97
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
97
        for (const auto& id : addModuleIDs) {
2768
22
            operations.push_back({ modules.at(id), operations[0].second});
2769
22
        }
2770
97
    }
2771
97
#endif
2772
2773
97
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
97
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
215
    for (size_t i = 0; i < operations.size(); i++) {
2781
118
        auto& operation = operations[i];
2782
2783
118
        auto& module = operation.first;
2784
118
        auto& op = operation.second;
2785
2786
118
        if ( i > 0 ) {
2787
86
            auto& prevModule = operations[i-1].first;
2788
86
            auto& prevOp = operations[i].second;
2789
2790
86
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
48
                auto& curModifier = op.modifier.GetVectorPtr();
2792
48
                if ( curModifier.size() == 0 ) {
2793
10.7k
                    for (size_t j = 0; j < 512; j++) {
2794
10.7k
                        curModifier.push_back(1);
2795
10.7k
                    }
2796
27
                } else {
2797
258
                    for (auto& c : curModifier) {
2798
258
                        c++;
2799
258
                    }
2800
27
                }
2801
48
            }
2802
86
        }
2803
2804
118
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
118
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
118
        const auto& result = results.back();
2811
2812
118
        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
118
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
118
        if ( options.disableTests == false ) {
2830
118
            tests::test(op, result.second);
2831
118
        }
2832
2833
118
        postprocess(module, op, result);
2834
118
    }
2835
2836
97
    if ( options.noCompare == false ) {
2837
32
        compare(operations, results, data, size);
2838
32
    }
2839
97
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
113
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
113
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
113
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.19k
    do {
2725
2.19k
        auto op = getOp(&parentDs, data, size);
2726
2.19k
        auto module = getModule(parentDs);
2727
2.19k
        if ( module == nullptr ) {
2728
1.98k
            continue;
2729
1.98k
        }
2730
2731
206
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
206
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.18k
    } while ( parentDs.Get<bool>() == true );
2738
2739
113
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
109
#if 1
2745
109
    {
2746
109
        std::set<uint64_t> moduleIDs;
2747
109
        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
109
        std::set<uint64_t> operationModuleIDs;
2759
113
        for (const auto& op : operations) {
2760
113
            operationModuleIDs.insert(op.first->ID);
2761
113
        }
2762
2763
109
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
109
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
109
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
109
        for (const auto& id : addModuleIDs) {
2768
22
            operations.push_back({ modules.at(id), operations[0].second});
2769
22
        }
2770
109
    }
2771
109
#endif
2772
2773
109
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
109
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
244
    for (size_t i = 0; i < operations.size(); i++) {
2781
135
        auto& operation = operations[i];
2782
2783
135
        auto& module = operation.first;
2784
135
        auto& op = operation.second;
2785
2786
135
        if ( i > 0 ) {
2787
97
            auto& prevModule = operations[i-1].first;
2788
97
            auto& prevOp = operations[i].second;
2789
2790
97
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
50
                auto& curModifier = op.modifier.GetVectorPtr();
2792
50
                if ( curModifier.size() == 0 ) {
2793
10.2k
                    for (size_t j = 0; j < 512; j++) {
2794
10.2k
                        curModifier.push_back(1);
2795
10.2k
                    }
2796
30
                } else {
2797
264
                    for (auto& c : curModifier) {
2798
264
                        c++;
2799
264
                    }
2800
30
                }
2801
50
            }
2802
97
        }
2803
2804
135
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
135
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
135
        const auto& result = results.back();
2811
2812
135
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
135
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
135
        if ( options.disableTests == false ) {
2830
135
            tests::test(op, result.second);
2831
135
        }
2832
2833
135
        postprocess(module, op, result);
2834
135
    }
2835
2836
109
    if ( options.noCompare == false ) {
2837
38
        compare(operations, results, data, size);
2838
38
    }
2839
109
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
154
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
154
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
154
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.33k
    do {
2725
1.33k
        auto op = getOp(&parentDs, data, size);
2726
1.33k
        auto module = getModule(parentDs);
2727
1.33k
        if ( module == nullptr ) {
2728
1.15k
            continue;
2729
1.15k
        }
2730
2731
176
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
176
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
1.32k
    } while ( parentDs.Get<bool>() == true );
2738
2739
154
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
133
#if 1
2745
133
    {
2746
133
        std::set<uint64_t> moduleIDs;
2747
133
        for (const auto& m : modules ) {
2748
80
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
80
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
80
            moduleIDs.insert(moduleID);
2756
80
        }
2757
2758
133
        std::set<uint64_t> operationModuleIDs;
2759
133
        for (const auto& op : operations) {
2760
105
            operationModuleIDs.insert(op.first->ID);
2761
105
        }
2762
2763
133
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
133
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
133
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
133
        for (const auto& id : addModuleIDs) {
2768
28
            operations.push_back({ modules.at(id), operations[0].second});
2769
28
        }
2770
133
    }
2771
133
#endif
2772
2773
133
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
133
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
266
    for (size_t i = 0; i < operations.size(); i++) {
2781
133
        auto& operation = operations[i];
2782
2783
133
        auto& module = operation.first;
2784
133
        auto& op = operation.second;
2785
2786
133
        if ( i > 0 ) {
2787
93
            auto& prevModule = operations[i-1].first;
2788
93
            auto& prevOp = operations[i].second;
2789
2790
93
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
47
                auto& curModifier = op.modifier.GetVectorPtr();
2792
47
                if ( curModifier.size() == 0 ) {
2793
13.8k
                    for (size_t j = 0; j < 512; j++) {
2794
13.8k
                        curModifier.push_back(1);
2795
13.8k
                    }
2796
27
                } else {
2797
250
                    for (auto& c : curModifier) {
2798
250
                        c++;
2799
250
                    }
2800
20
                }
2801
47
            }
2802
93
        }
2803
2804
133
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
133
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
133
        const auto& result = results.back();
2811
2812
133
        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
133
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
133
        if ( options.disableTests == false ) {
2830
133
            tests::test(op, result.second);
2831
133
        }
2832
2833
133
        postprocess(module, op, result);
2834
133
    }
2835
2836
133
    if ( options.noCompare == false ) {
2837
40
        compare(operations, results, data, size);
2838
40
    }
2839
133
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
120
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
120
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
120
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.93k
    do {
2725
1.93k
        auto op = getOp(&parentDs, data, size);
2726
1.93k
        auto module = getModule(parentDs);
2727
1.93k
        if ( module == nullptr ) {
2728
1.72k
            continue;
2729
1.72k
        }
2730
2731
206
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
206
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.92k
    } while ( parentDs.Get<bool>() == true );
2738
2739
120
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
115
#if 1
2745
115
    {
2746
115
        std::set<uint64_t> moduleIDs;
2747
115
        for (const auto& m : modules ) {
2748
88
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
88
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
88
            moduleIDs.insert(moduleID);
2756
88
        }
2757
2758
115
        std::set<uint64_t> operationModuleIDs;
2759
115
        for (const auto& op : operations) {
2760
106
            operationModuleIDs.insert(op.first->ID);
2761
106
        }
2762
2763
115
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
115
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
115
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
115
        for (const auto& id : addModuleIDs) {
2768
32
            operations.push_back({ modules.at(id), operations[0].second});
2769
32
        }
2770
115
    }
2771
115
#endif
2772
2773
115
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
115
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
253
    for (size_t i = 0; i < operations.size(); i++) {
2781
138
        auto& operation = operations[i];
2782
2783
138
        auto& module = operation.first;
2784
138
        auto& op = operation.second;
2785
2786
138
        if ( i > 0 ) {
2787
94
            auto& prevModule = operations[i-1].first;
2788
94
            auto& prevOp = operations[i].second;
2789
2790
94
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
41
                auto& curModifier = op.modifier.GetVectorPtr();
2792
41
                if ( curModifier.size() == 0 ) {
2793
10.7k
                    for (size_t j = 0; j < 512; j++) {
2794
10.7k
                        curModifier.push_back(1);
2795
10.7k
                    }
2796
21
                } else {
2797
791
                    for (auto& c : curModifier) {
2798
791
                        c++;
2799
791
                    }
2800
20
                }
2801
41
            }
2802
94
        }
2803
2804
138
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
138
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
138
        const auto& result = results.back();
2811
2812
138
        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
138
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
138
        if ( options.disableTests == false ) {
2830
138
            tests::test(op, result.second);
2831
138
        }
2832
2833
138
        postprocess(module, op, result);
2834
138
    }
2835
2836
115
    if ( options.noCompare == false ) {
2837
44
        compare(operations, results, data, size);
2838
44
    }
2839
115
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
147
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
147
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
147
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.21k
    do {
2725
2.21k
        auto op = getOp(&parentDs, data, size);
2726
2.21k
        auto module = getModule(parentDs);
2727
2.21k
        if ( module == nullptr ) {
2728
2.00k
            continue;
2729
2.00k
        }
2730
2731
206
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
206
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.20k
    } while ( parentDs.Get<bool>() == true );
2738
2739
147
    if ( operations.empty() == true ) {
2740
19
        return;
2741
19
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
128
#if 1
2745
128
    {
2746
128
        std::set<uint64_t> moduleIDs;
2747
128
        for (const auto& m : modules ) {
2748
86
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
86
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
86
            moduleIDs.insert(moduleID);
2756
86
        }
2757
2758
128
        std::set<uint64_t> operationModuleIDs;
2759
128
        for (const auto& op : operations) {
2760
121
            operationModuleIDs.insert(op.first->ID);
2761
121
        }
2762
2763
128
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
128
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
128
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
128
        for (const auto& id : addModuleIDs) {
2768
32
            operations.push_back({ modules.at(id), operations[0].second});
2769
32
        }
2770
128
    }
2771
128
#endif
2772
2773
128
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
128
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
281
    for (size_t i = 0; i < operations.size(); i++) {
2781
153
        auto& operation = operations[i];
2782
2783
153
        auto& module = operation.first;
2784
153
        auto& op = operation.second;
2785
2786
153
        if ( i > 0 ) {
2787
110
            auto& prevModule = operations[i-1].first;
2788
110
            auto& prevOp = operations[i].second;
2789
2790
110
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
61
                auto& curModifier = op.modifier.GetVectorPtr();
2792
61
                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
32
                } else {
2797
299
                    for (auto& c : curModifier) {
2798
299
                        c++;
2799
299
                    }
2800
32
                }
2801
61
            }
2802
110
        }
2803
2804
153
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
153
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
153
        const auto& result = results.back();
2811
2812
153
        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
153
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
153
        if ( options.disableTests == false ) {
2830
153
            tests::test(op, result.second);
2831
153
        }
2832
2833
153
        postprocess(module, op, result);
2834
153
    }
2835
2836
128
    if ( options.noCompare == false ) {
2837
43
        compare(operations, results, data, size);
2838
43
    }
2839
128
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
135
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
135
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
135
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.55k
    do {
2725
1.55k
        auto op = getOp(&parentDs, data, size);
2726
1.55k
        auto module = getModule(parentDs);
2727
1.55k
        if ( module == nullptr ) {
2728
1.36k
            continue;
2729
1.36k
        }
2730
2731
185
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
185
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.54k
    } while ( parentDs.Get<bool>() == true );
2738
2739
135
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
117
#if 1
2745
117
    {
2746
117
        std::set<uint64_t> moduleIDs;
2747
117
        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
117
        std::set<uint64_t> operationModuleIDs;
2759
117
        for (const auto& op : operations) {
2760
97
            operationModuleIDs.insert(op.first->ID);
2761
97
        }
2762
2763
117
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
117
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
117
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
117
        for (const auto& id : addModuleIDs) {
2768
21
            operations.push_back({ modules.at(id), operations[0].second});
2769
21
        }
2770
117
    }
2771
117
#endif
2772
2773
117
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
117
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
235
    for (size_t i = 0; i < operations.size(); i++) {
2781
118
        auto& operation = operations[i];
2782
2783
118
        auto& module = operation.first;
2784
118
        auto& op = operation.second;
2785
2786
118
        if ( i > 0 ) {
2787
86
            auto& prevModule = operations[i-1].first;
2788
86
            auto& prevOp = operations[i].second;
2789
2790
86
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
48
                auto& curModifier = op.modifier.GetVectorPtr();
2792
48
                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
33
                } else {
2797
303
                    for (auto& c : curModifier) {
2798
303
                        c++;
2799
303
                    }
2800
33
                }
2801
48
            }
2802
86
        }
2803
2804
118
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
118
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
118
        const auto& result = results.back();
2811
2812
118
        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
118
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
118
        if ( options.disableTests == false ) {
2830
118
            tests::test(op, result.second);
2831
118
        }
2832
2833
118
        postprocess(module, op, result);
2834
118
    }
2835
2836
117
    if ( options.noCompare == false ) {
2837
32
        compare(operations, results, data, size);
2838
32
    }
2839
117
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
112
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
112
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
112
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.76k
    do {
2725
1.76k
        auto op = getOp(&parentDs, data, size);
2726
1.76k
        auto module = getModule(parentDs);
2727
1.76k
        if ( module == nullptr ) {
2728
1.59k
            continue;
2729
1.59k
        }
2730
2731
177
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
177
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.76k
    } while ( parentDs.Get<bool>() == true );
2738
2739
112
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
97
#if 1
2745
97
    {
2746
97
        std::set<uint64_t> moduleIDs;
2747
97
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
97
        std::set<uint64_t> operationModuleIDs;
2759
102
        for (const auto& op : operations) {
2760
102
            operationModuleIDs.insert(op.first->ID);
2761
102
        }
2762
2763
97
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
97
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
97
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
97
        for (const auto& id : addModuleIDs) {
2768
25
            operations.push_back({ modules.at(id), operations[0].second});
2769
25
        }
2770
97
    }
2771
97
#endif
2772
2773
97
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
97
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
224
    for (size_t i = 0; i < operations.size(); i++) {
2781
127
        auto& operation = operations[i];
2782
2783
127
        auto& module = operation.first;
2784
127
        auto& op = operation.second;
2785
2786
127
        if ( i > 0 ) {
2787
91
            auto& prevModule = operations[i-1].first;
2788
91
            auto& prevOp = operations[i].second;
2789
2790
91
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
49
                auto& curModifier = op.modifier.GetVectorPtr();
2792
49
                if ( curModifier.size() == 0 ) {
2793
11.7k
                    for (size_t j = 0; j < 512; j++) {
2794
11.7k
                        curModifier.push_back(1);
2795
11.7k
                    }
2796
26
                } else {
2797
785
                    for (auto& c : curModifier) {
2798
785
                        c++;
2799
785
                    }
2800
26
                }
2801
49
            }
2802
91
        }
2803
2804
127
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
127
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
127
        const auto& result = results.back();
2811
2812
127
        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
127
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
127
        if ( options.disableTests == false ) {
2830
127
            tests::test(op, result.second);
2831
127
        }
2832
2833
127
        postprocess(module, op, result);
2834
127
    }
2835
2836
97
    if ( options.noCompare == false ) {
2837
36
        compare(operations, results, data, size);
2838
36
    }
2839
97
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
107
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
107
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
107
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.83k
    do {
2725
1.83k
        auto op = getOp(&parentDs, data, size);
2726
1.83k
        auto module = getModule(parentDs);
2727
1.83k
        if ( module == nullptr ) {
2728
1.66k
            continue;
2729
1.66k
        }
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
5
            break;
2736
5
        }
2737
1.82k
    } while ( parentDs.Get<bool>() == true );
2738
2739
107
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
98
#if 1
2745
98
    {
2746
98
        std::set<uint64_t> moduleIDs;
2747
98
        for (const auto& m : modules ) {
2748
74
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
74
            moduleIDs.insert(moduleID);
2756
74
        }
2757
2758
98
        std::set<uint64_t> operationModuleIDs;
2759
98
        for (const auto& op : operations) {
2760
96
            operationModuleIDs.insert(op.first->ID);
2761
96
        }
2762
2763
98
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
98
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
98
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
98
        for (const auto& id : addModuleIDs) {
2768
27
            operations.push_back({ modules.at(id), operations[0].second});
2769
27
        }
2770
98
    }
2771
98
#endif
2772
2773
98
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
98
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
221
    for (size_t i = 0; i < operations.size(); i++) {
2781
123
        auto& operation = operations[i];
2782
2783
123
        auto& module = operation.first;
2784
123
        auto& op = operation.second;
2785
2786
123
        if ( i > 0 ) {
2787
86
            auto& prevModule = operations[i-1].first;
2788
86
            auto& prevOp = operations[i].second;
2789
2790
86
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                if ( curModifier.size() == 0 ) {
2793
11.7k
                    for (size_t j = 0; j < 512; j++) {
2794
11.7k
                        curModifier.push_back(1);
2795
11.7k
                    }
2796
23
                } else {
2797
587
                    for (auto& c : curModifier) {
2798
587
                        c++;
2799
587
                    }
2800
20
                }
2801
43
            }
2802
86
        }
2803
2804
123
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
123
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
123
        const auto& result = results.back();
2811
2812
123
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
123
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
123
        if ( options.disableTests == false ) {
2830
123
            tests::test(op, result.second);
2831
123
        }
2832
2833
123
        postprocess(module, op, result);
2834
123
    }
2835
2836
98
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
98
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
143
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
143
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
143
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.53k
    do {
2725
2.53k
        auto op = getOp(&parentDs, data, size);
2726
2.53k
        auto module = getModule(parentDs);
2727
2.53k
        if ( module == nullptr ) {
2728
2.32k
            continue;
2729
2.32k
        }
2730
2731
209
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
209
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.52k
    } while ( parentDs.Get<bool>() == true );
2738
2739
143
    if ( operations.empty() == true ) {
2740
16
        return;
2741
16
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
127
#if 1
2745
127
    {
2746
127
        std::set<uint64_t> moduleIDs;
2747
127
        for (const auto& m : modules ) {
2748
66
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
66
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
66
            moduleIDs.insert(moduleID);
2756
66
        }
2757
2758
127
        std::set<uint64_t> operationModuleIDs;
2759
127
        for (const auto& op : operations) {
2760
96
            operationModuleIDs.insert(op.first->ID);
2761
96
        }
2762
2763
127
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
127
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
127
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
127
        for (const auto& id : addModuleIDs) {
2768
19
            operations.push_back({ modules.at(id), operations[0].second});
2769
19
        }
2770
127
    }
2771
127
#endif
2772
2773
127
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
127
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
242
    for (size_t i = 0; i < operations.size(); i++) {
2781
115
        auto& operation = operations[i];
2782
2783
115
        auto& module = operation.first;
2784
115
        auto& op = operation.second;
2785
2786
115
        if ( i > 0 ) {
2787
82
            auto& prevModule = operations[i-1].first;
2788
82
            auto& prevOp = operations[i].second;
2789
2790
82
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                if ( curModifier.size() == 0 ) {
2793
9.74k
                    for (size_t j = 0; j < 512; j++) {
2794
9.72k
                        curModifier.push_back(1);
2795
9.72k
                    }
2796
24
                } else {
2797
290
                    for (auto& c : curModifier) {
2798
290
                        c++;
2799
290
                    }
2800
24
                }
2801
43
            }
2802
82
        }
2803
2804
115
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
115
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
115
        const auto& result = results.back();
2811
2812
115
        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
115
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
115
        if ( options.disableTests == false ) {
2830
115
            tests::test(op, result.second);
2831
115
        }
2832
2833
115
        postprocess(module, op, result);
2834
115
    }
2835
2836
127
    if ( options.noCompare == false ) {
2837
33
        compare(operations, results, data, size);
2838
33
    }
2839
127
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
146
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
146
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
146
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.06k
    do {
2725
2.06k
        auto op = getOp(&parentDs, data, size);
2726
2.06k
        auto module = getModule(parentDs);
2727
2.06k
        if ( module == nullptr ) {
2728
1.83k
            continue;
2729
1.83k
        }
2730
2731
231
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
231
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.06k
    } while ( parentDs.Get<bool>() == true );
2738
2739
146
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
136
#if 1
2745
136
    {
2746
136
        std::set<uint64_t> moduleIDs;
2747
136
        for (const auto& m : modules ) {
2748
104
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
104
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
104
            moduleIDs.insert(moduleID);
2756
104
        }
2757
2758
136
        std::set<uint64_t> operationModuleIDs;
2759
136
        for (const auto& op : operations) {
2760
125
            operationModuleIDs.insert(op.first->ID);
2761
125
        }
2762
2763
136
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
136
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
136
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
136
        for (const auto& id : addModuleIDs) {
2768
37
            operations.push_back({ modules.at(id), operations[0].second});
2769
37
        }
2770
136
    }
2771
136
#endif
2772
2773
136
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
136
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
298
    for (size_t i = 0; i < operations.size(); i++) {
2781
162
        auto& operation = operations[i];
2782
2783
162
        auto& module = operation.first;
2784
162
        auto& op = operation.second;
2785
2786
162
        if ( i > 0 ) {
2787
110
            auto& prevModule = operations[i-1].first;
2788
110
            auto& prevOp = operations[i].second;
2789
2790
110
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
50
                auto& curModifier = op.modifier.GetVectorPtr();
2792
50
                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
508
                    for (auto& c : curModifier) {
2798
508
                        c++;
2799
508
                    }
2800
21
                }
2801
50
            }
2802
110
        }
2803
2804
162
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
162
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
162
        const auto& result = results.back();
2811
2812
162
        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
162
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
162
        if ( options.disableTests == false ) {
2830
162
            tests::test(op, result.second);
2831
162
        }
2832
2833
162
        postprocess(module, op, result);
2834
162
    }
2835
2836
136
    if ( options.noCompare == false ) {
2837
52
        compare(operations, results, data, size);
2838
52
    }
2839
136
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
111
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
111
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
111
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.29k
    do {
2725
2.29k
        auto op = getOp(&parentDs, data, size);
2726
2.29k
        auto module = getModule(parentDs);
2727
2.29k
        if ( module == nullptr ) {
2728
2.13k
            continue;
2729
2.13k
        }
2730
2731
156
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
156
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.28k
    } while ( parentDs.Get<bool>() == true );
2738
2739
111
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
97
#if 1
2745
97
    {
2746
97
        std::set<uint64_t> moduleIDs;
2747
97
        for (const auto& m : modules ) {
2748
58
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
58
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
58
            moduleIDs.insert(moduleID);
2756
58
        }
2757
2758
97
        std::set<uint64_t> operationModuleIDs;
2759
97
        for (const auto& op : operations) {
2760
84
            operationModuleIDs.insert(op.first->ID);
2761
84
        }
2762
2763
97
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
97
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
97
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
97
        for (const auto& id : addModuleIDs) {
2768
18
            operations.push_back({ modules.at(id), operations[0].second});
2769
18
        }
2770
97
    }
2771
97
#endif
2772
2773
97
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
97
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
199
    for (size_t i = 0; i < operations.size(); i++) {
2781
102
        auto& operation = operations[i];
2782
2783
102
        auto& module = operation.first;
2784
102
        auto& op = operation.second;
2785
2786
102
        if ( i > 0 ) {
2787
73
            auto& prevModule = operations[i-1].first;
2788
73
            auto& prevOp = operations[i].second;
2789
2790
73
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
36
                auto& curModifier = op.modifier.GetVectorPtr();
2792
36
                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
302
                    for (auto& c : curModifier) {
2798
302
                        c++;
2799
302
                    }
2800
18
                }
2801
36
            }
2802
73
        }
2803
2804
102
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
102
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
102
        const auto& result = results.back();
2811
2812
102
        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
102
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
102
        if ( options.disableTests == false ) {
2830
102
            tests::test(op, result.second);
2831
102
        }
2832
2833
102
        postprocess(module, op, result);
2834
102
    }
2835
2836
97
    if ( options.noCompare == false ) {
2837
29
        compare(operations, results, data, size);
2838
29
    }
2839
97
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
134
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
134
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
134
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.16k
    do {
2725
2.16k
        auto op = getOp(&parentDs, data, size);
2726
2.16k
        auto module = getModule(parentDs);
2727
2.16k
        if ( module == nullptr ) {
2728
1.96k
            continue;
2729
1.96k
        }
2730
2731
195
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
195
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.15k
    } while ( parentDs.Get<bool>() == true );
2738
2739
134
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
128
#if 1
2745
128
    {
2746
128
        std::set<uint64_t> moduleIDs;
2747
128
        for (const auto& m : modules ) {
2748
112
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
112
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
112
            moduleIDs.insert(moduleID);
2756
112
        }
2757
2758
128
        std::set<uint64_t> operationModuleIDs;
2759
128
        for (const auto& op : operations) {
2760
116
            operationModuleIDs.insert(op.first->ID);
2761
116
        }
2762
2763
128
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
128
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
128
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
128
        for (const auto& id : addModuleIDs) {
2768
45
            operations.push_back({ modules.at(id), operations[0].second});
2769
45
        }
2770
128
    }
2771
128
#endif
2772
2773
128
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
128
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
289
    for (size_t i = 0; i < operations.size(); i++) {
2781
161
        auto& operation = operations[i];
2782
2783
161
        auto& module = operation.first;
2784
161
        auto& op = operation.second;
2785
2786
161
        if ( i > 0 ) {
2787
105
            auto& prevModule = operations[i-1].first;
2788
105
            auto& prevOp = operations[i].second;
2789
2790
105
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
41
                auto& curModifier = op.modifier.GetVectorPtr();
2792
41
                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
23
                } else {
2797
1.32k
                    for (auto& c : curModifier) {
2798
1.32k
                        c++;
2799
1.32k
                    }
2800
23
                }
2801
41
            }
2802
105
        }
2803
2804
161
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
161
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
161
        const auto& result = results.back();
2811
2812
161
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
161
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
161
        if ( options.disableTests == false ) {
2830
161
            tests::test(op, result.second);
2831
161
        }
2832
2833
161
        postprocess(module, op, result);
2834
161
    }
2835
2836
128
    if ( options.noCompare == false ) {
2837
56
        compare(operations, results, data, size);
2838
56
    }
2839
128
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
116
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
116
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
116
    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
1.54k
            continue;
2729
1.54k
        }
2730
2731
201
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
201
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
1.73k
    } while ( parentDs.Get<bool>() == true );
2738
2739
116
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
108
#if 1
2745
108
    {
2746
108
        std::set<uint64_t> moduleIDs;
2747
108
        for (const auto& m : modules ) {
2748
102
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
102
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
102
            moduleIDs.insert(moduleID);
2756
102
        }
2757
2758
108
        std::set<uint64_t> operationModuleIDs;
2759
123
        for (const auto& op : operations) {
2760
123
            operationModuleIDs.insert(op.first->ID);
2761
123
        }
2762
2763
108
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
108
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
108
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
108
        for (const auto& id : addModuleIDs) {
2768
38
            operations.push_back({ modules.at(id), operations[0].second});
2769
38
        }
2770
108
    }
2771
108
#endif
2772
2773
108
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
108
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
269
    for (size_t i = 0; i < operations.size(); i++) {
2781
161
        auto& operation = operations[i];
2782
2783
161
        auto& module = operation.first;
2784
161
        auto& op = operation.second;
2785
2786
161
        if ( i > 0 ) {
2787
110
            auto& prevModule = operations[i-1].first;
2788
110
            auto& prevOp = operations[i].second;
2789
2790
110
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
53
                auto& curModifier = op.modifier.GetVectorPtr();
2792
53
                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
251
                    for (auto& c : curModifier) {
2798
251
                        c++;
2799
251
                    }
2800
25
                }
2801
53
            }
2802
110
        }
2803
2804
161
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
161
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
161
        const auto& result = results.back();
2811
2812
161
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
161
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
161
        if ( options.disableTests == false ) {
2830
161
            tests::test(op, result.second);
2831
161
        }
2832
2833
161
        postprocess(module, op, result);
2834
161
    }
2835
2836
108
    if ( options.noCompare == false ) {
2837
51
        compare(operations, results, data, size);
2838
51
    }
2839
108
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
167
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
167
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
167
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.41k
    do {
2725
2.41k
        auto op = getOp(&parentDs, data, size);
2726
2.41k
        auto module = getModule(parentDs);
2727
2.41k
        if ( module == nullptr ) {
2728
2.14k
            continue;
2729
2.14k
        }
2730
2731
270
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
270
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
2.40k
    } while ( parentDs.Get<bool>() == true );
2738
2739
167
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
161
#if 1
2745
161
    {
2746
161
        std::set<uint64_t> moduleIDs;
2747
164
        for (const auto& m : modules ) {
2748
164
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
164
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
164
            moduleIDs.insert(moduleID);
2756
164
        }
2757
2758
161
        std::set<uint64_t> operationModuleIDs;
2759
183
        for (const auto& op : operations) {
2760
183
            operationModuleIDs.insert(op.first->ID);
2761
183
        }
2762
2763
161
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
161
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
161
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
161
        for (const auto& id : addModuleIDs) {
2768
60
            operations.push_back({ modules.at(id), operations[0].second});
2769
60
        }
2770
161
    }
2771
161
#endif
2772
2773
161
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
161
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
404
    for (size_t i = 0; i < operations.size(); i++) {
2781
243
        auto& operation = operations[i];
2782
2783
243
        auto& module = operation.first;
2784
243
        auto& op = operation.second;
2785
2786
243
        if ( i > 0 ) {
2787
161
            auto& prevModule = operations[i-1].first;
2788
161
            auto& prevOp = operations[i].second;
2789
2790
161
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
68
                auto& curModifier = op.modifier.GetVectorPtr();
2792
68
                if ( curModifier.size() == 0 ) {
2793
15.9k
                    for (size_t j = 0; j < 512; j++) {
2794
15.8k
                        curModifier.push_back(1);
2795
15.8k
                    }
2796
37
                } else {
2797
1.08k
                    for (auto& c : curModifier) {
2798
1.08k
                        c++;
2799
1.08k
                    }
2800
37
                }
2801
68
            }
2802
161
        }
2803
2804
243
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
243
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
243
        const auto& result = results.back();
2811
2812
243
        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
243
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
243
        if ( options.disableTests == false ) {
2830
243
            tests::test(op, result.second);
2831
243
        }
2832
2833
243
        postprocess(module, op, result);
2834
243
    }
2835
2836
161
    if ( options.noCompare == false ) {
2837
82
        compare(operations, results, data, size);
2838
82
    }
2839
161
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
111
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
111
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
111
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.13k
    do {
2725
2.13k
        auto op = getOp(&parentDs, data, size);
2726
2.13k
        auto module = getModule(parentDs);
2727
2.13k
        if ( module == nullptr ) {
2728
1.94k
            continue;
2729
1.94k
        }
2730
2731
191
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
191
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.12k
    } while ( parentDs.Get<bool>() == true );
2738
2739
111
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
107
#if 1
2745
107
    {
2746
107
        std::set<uint64_t> moduleIDs;
2747
126
        for (const auto& m : modules ) {
2748
126
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
126
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
126
            moduleIDs.insert(moduleID);
2756
126
        }
2757
2758
107
        std::set<uint64_t> operationModuleIDs;
2759
128
        for (const auto& op : operations) {
2760
128
            operationModuleIDs.insert(op.first->ID);
2761
128
        }
2762
2763
107
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
107
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
107
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
107
        for (const auto& id : addModuleIDs) {
2768
52
            operations.push_back({ modules.at(id), operations[0].second});
2769
52
        }
2770
107
    }
2771
107
#endif
2772
2773
107
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
107
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
287
    for (size_t i = 0; i < operations.size(); i++) {
2781
180
        auto& operation = operations[i];
2782
2783
180
        auto& module = operation.first;
2784
180
        auto& op = operation.second;
2785
2786
180
        if ( i > 0 ) {
2787
117
            auto& prevModule = operations[i-1].first;
2788
117
            auto& prevOp = operations[i].second;
2789
2790
117
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
48
                auto& curModifier = op.modifier.GetVectorPtr();
2792
48
                if ( curModifier.size() == 0 ) {
2793
10.7k
                    for (size_t j = 0; j < 512; j++) {
2794
10.7k
                        curModifier.push_back(1);
2795
10.7k
                    }
2796
27
                } else {
2797
328
                    for (auto& c : curModifier) {
2798
328
                        c++;
2799
328
                    }
2800
27
                }
2801
48
            }
2802
117
        }
2803
2804
180
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
180
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
180
        const auto& result = results.back();
2811
2812
180
        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
180
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
180
        if ( options.disableTests == false ) {
2830
180
            tests::test(op, result.second);
2831
180
        }
2832
2833
180
        postprocess(module, op, result);
2834
180
    }
2835
2836
107
    if ( options.noCompare == false ) {
2837
63
        compare(operations, results, data, size);
2838
63
    }
2839
107
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
175
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
175
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
175
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.60k
    do {
2725
2.60k
        auto op = getOp(&parentDs, data, size);
2726
2.60k
        auto module = getModule(parentDs);
2727
2.60k
        if ( module == nullptr ) {
2728
2.29k
            continue;
2729
2.29k
        }
2730
2731
313
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
313
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
2.59k
    } while ( parentDs.Get<bool>() == true );
2738
2739
175
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
168
#if 1
2745
168
    {
2746
168
        std::set<uint64_t> moduleIDs;
2747
168
        for (const auto& m : modules ) {
2748
146
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
146
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
146
            moduleIDs.insert(moduleID);
2756
146
        }
2757
2758
168
        std::set<uint64_t> operationModuleIDs;
2759
168
        for (const auto& op : operations) {
2760
161
            operationModuleIDs.insert(op.first->ID);
2761
161
        }
2762
2763
168
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
168
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
168
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
168
        for (const auto& id : addModuleIDs) {
2768
61
            operations.push_back({ modules.at(id), operations[0].second});
2769
61
        }
2770
168
    }
2771
168
#endif
2772
2773
168
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
168
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
390
    for (size_t i = 0; i < operations.size(); i++) {
2781
222
        auto& operation = operations[i];
2782
2783
222
        auto& module = operation.first;
2784
222
        auto& op = operation.second;
2785
2786
222
        if ( i > 0 ) {
2787
149
            auto& prevModule = operations[i-1].first;
2788
149
            auto& prevOp = operations[i].second;
2789
2790
149
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
68
                auto& curModifier = op.modifier.GetVectorPtr();
2792
68
                if ( curModifier.size() == 0 ) {
2793
17.4k
                    for (size_t j = 0; j < 512; j++) {
2794
17.4k
                        curModifier.push_back(1);
2795
17.4k
                    }
2796
34
                } else {
2797
1.39k
                    for (auto& c : curModifier) {
2798
1.39k
                        c++;
2799
1.39k
                    }
2800
34
                }
2801
68
            }
2802
149
        }
2803
2804
222
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
222
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
222
        const auto& result = results.back();
2811
2812
222
        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
222
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
222
        if ( options.disableTests == false ) {
2830
222
            tests::test(op, result.second);
2831
222
        }
2832
2833
222
        postprocess(module, op, result);
2834
222
    }
2835
2836
168
    if ( options.noCompare == false ) {
2837
73
        compare(operations, results, data, size);
2838
73
    }
2839
168
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
147
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
147
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
147
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.76k
    do {
2725
1.76k
        auto op = getOp(&parentDs, data, size);
2726
1.76k
        auto module = getModule(parentDs);
2727
1.76k
        if ( module == nullptr ) {
2728
1.53k
            continue;
2729
1.53k
        }
2730
2731
223
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
223
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.75k
    } while ( parentDs.Get<bool>() == true );
2738
2739
147
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
141
#if 1
2745
141
    {
2746
141
        std::set<uint64_t> moduleIDs;
2747
141
        for (const auto& m : modules ) {
2748
118
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
118
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
118
            moduleIDs.insert(moduleID);
2756
118
        }
2757
2758
141
        std::set<uint64_t> operationModuleIDs;
2759
141
        for (const auto& op : operations) {
2760
129
            operationModuleIDs.insert(op.first->ID);
2761
129
        }
2762
2763
141
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
141
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
141
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
141
        for (const auto& id : addModuleIDs) {
2768
48
            operations.push_back({ modules.at(id), operations[0].second});
2769
48
        }
2770
141
    }
2771
141
#endif
2772
2773
141
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
141
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
318
    for (size_t i = 0; i < operations.size(); i++) {
2781
177
        auto& operation = operations[i];
2782
2783
177
        auto& module = operation.first;
2784
177
        auto& op = operation.second;
2785
2786
177
        if ( i > 0 ) {
2787
118
            auto& prevModule = operations[i-1].first;
2788
118
            auto& prevOp = operations[i].second;
2789
2790
118
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
53
                auto& curModifier = op.modifier.GetVectorPtr();
2792
53
                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
27
                } else {
2797
1.33k
                    for (auto& c : curModifier) {
2798
1.33k
                        c++;
2799
1.33k
                    }
2800
27
                }
2801
53
            }
2802
118
        }
2803
2804
177
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
177
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
177
        const auto& result = results.back();
2811
2812
177
        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
177
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
177
        if ( options.disableTests == false ) {
2830
177
            tests::test(op, result.second);
2831
177
        }
2832
2833
177
        postprocess(module, op, result);
2834
177
    }
2835
2836
141
    if ( options.noCompare == false ) {
2837
59
        compare(operations, results, data, size);
2838
59
    }
2839
141
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::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
1.76k
    do {
2725
1.76k
        auto op = getOp(&parentDs, data, size);
2726
1.76k
        auto module = getModule(parentDs);
2727
1.76k
        if ( module == nullptr ) {
2728
1.50k
            continue;
2729
1.50k
        }
2730
2731
262
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
262
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.76k
    } while ( parentDs.Get<bool>() == true );
2738
2739
178
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
173
#if 1
2745
173
    {
2746
173
        std::set<uint64_t> moduleIDs;
2747
173
        for (const auto& m : modules ) {
2748
88
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
88
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
88
            moduleIDs.insert(moduleID);
2756
88
        }
2757
2758
173
        std::set<uint64_t> operationModuleIDs;
2759
173
        for (const auto& op : operations) {
2760
118
            operationModuleIDs.insert(op.first->ID);
2761
118
        }
2762
2763
173
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
173
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
173
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
173
        for (const auto& id : addModuleIDs) {
2768
32
            operations.push_back({ modules.at(id), operations[0].second});
2769
32
        }
2770
173
    }
2771
173
#endif
2772
2773
173
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
173
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
323
    for (size_t i = 0; i < operations.size(); i++) {
2781
150
        auto& operation = operations[i];
2782
2783
150
        auto& module = operation.first;
2784
150
        auto& op = operation.second;
2785
2786
150
        if ( i > 0 ) {
2787
106
            auto& prevModule = operations[i-1].first;
2788
106
            auto& prevOp = operations[i].second;
2789
2790
106
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
53
                auto& curModifier = op.modifier.GetVectorPtr();
2792
53
                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
16.3k
                    for (auto& c : curModifier) {
2798
16.3k
                        c++;
2799
16.3k
                    }
2800
24
                }
2801
53
            }
2802
106
        }
2803
2804
150
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
150
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
150
        const auto& result = results.back();
2811
2812
150
        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
150
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
150
        if ( options.disableTests == false ) {
2830
150
            tests::test(op, result.second);
2831
150
        }
2832
2833
150
        postprocess(module, op, result);
2834
150
    }
2835
2836
173
    if ( options.noCompare == false ) {
2837
44
        compare(operations, results, data, size);
2838
44
    }
2839
173
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
105
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
105
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
105
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.02k
    do {
2725
1.02k
        auto op = getOp(&parentDs, data, size);
2726
1.02k
        auto module = getModule(parentDs);
2727
1.02k
        if ( module == nullptr ) {
2728
884
            continue;
2729
884
        }
2730
2731
145
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
145
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.02k
    } while ( parentDs.Get<bool>() == true );
2738
2739
105
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
98
#if 1
2745
98
    {
2746
98
        std::set<uint64_t> moduleIDs;
2747
98
        for (const auto& m : modules ) {
2748
58
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
58
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
58
            moduleIDs.insert(moduleID);
2756
58
        }
2757
2758
98
        std::set<uint64_t> operationModuleIDs;
2759
98
        for (const auto& op : operations) {
2760
90
            operationModuleIDs.insert(op.first->ID);
2761
90
        }
2762
2763
98
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
98
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
98
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
98
        for (const auto& id : addModuleIDs) {
2768
18
            operations.push_back({ modules.at(id), operations[0].second});
2769
18
        }
2770
98
    }
2771
98
#endif
2772
2773
98
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
98
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
206
    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
79
            auto& prevModule = operations[i-1].first;
2788
79
            auto& prevOp = operations[i].second;
2789
2790
79
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
44
                auto& curModifier = op.modifier.GetVectorPtr();
2792
44
                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
452
                    for (auto& c : curModifier) {
2798
452
                        c++;
2799
452
                    }
2800
22
                }
2801
44
            }
2802
79
        }
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
98
    if ( options.noCompare == false ) {
2837
29
        compare(operations, results, data, size);
2838
29
    }
2839
98
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
124
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
124
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
124
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.26k
    do {
2725
2.26k
        auto op = getOp(&parentDs, data, size);
2726
2.26k
        auto module = getModule(parentDs);
2727
2.26k
        if ( module == nullptr ) {
2728
2.02k
            continue;
2729
2.02k
        }
2730
2731
232
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
232
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
2.25k
    } while ( parentDs.Get<bool>() == true );
2738
2739
124
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
118
#if 1
2745
118
    {
2746
118
        std::set<uint64_t> moduleIDs;
2747
118
        for (const auto& m : modules ) {
2748
86
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
86
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
86
            moduleIDs.insert(moduleID);
2756
86
        }
2757
2758
118
        std::set<uint64_t> operationModuleIDs;
2759
130
        for (const auto& op : operations) {
2760
130
            operationModuleIDs.insert(op.first->ID);
2761
130
        }
2762
2763
118
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
118
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
118
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
118
        for (const auto& id : addModuleIDs) {
2768
27
            operations.push_back({ modules.at(id), operations[0].second});
2769
27
        }
2770
118
    }
2771
118
#endif
2772
2773
118
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
118
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
275
    for (size_t i = 0; i < operations.size(); i++) {
2781
157
        auto& operation = operations[i];
2782
2783
157
        auto& module = operation.first;
2784
157
        auto& op = operation.second;
2785
2786
157
        if ( i > 0 ) {
2787
114
            auto& prevModule = operations[i-1].first;
2788
114
            auto& prevOp = operations[i].second;
2789
2790
114
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
64
                auto& curModifier = op.modifier.GetVectorPtr();
2792
64
                if ( curModifier.size() == 0 ) {
2793
16.9k
                    for (size_t j = 0; j < 512; j++) {
2794
16.8k
                        curModifier.push_back(1);
2795
16.8k
                    }
2796
33
                } else {
2797
668
                    for (auto& c : curModifier) {
2798
668
                        c++;
2799
668
                    }
2800
31
                }
2801
64
            }
2802
114
        }
2803
2804
157
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
157
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
157
        const auto& result = results.back();
2811
2812
157
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
157
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
157
        if ( options.disableTests == false ) {
2830
157
            tests::test(op, result.second);
2831
157
        }
2832
2833
157
        postprocess(module, op, result);
2834
157
    }
2835
2836
118
    if ( options.noCompare == false ) {
2837
43
        compare(operations, results, data, size);
2838
43
    }
2839
118
}
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 */