Coverage Report

Created: 2024-02-25 06:16

/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
153k
#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
8.74k
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
8.74k
    (void)module;
53
8.74k
    (void)op;
54
55
8.74k
    if ( result.second != std::nullopt ) {
56
4.86k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
4.86k
    }
58
8.74k
}
59
60
8.74k
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
8.74k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
8.74k
    return module->OpDigest(op);
64
8.74k
}
65
66
/* Specialization for operation::HMAC */
67
4.55k
template<> void ExecutorBase<component::MAC, operation::HMAC>::postprocess(std::shared_ptr<Module> module, operation::HMAC& op, const ExecutorBase<component::MAC, operation::HMAC>::ResultPair& result) const {
68
4.55k
    (void)module;
69
4.55k
    (void)op;
70
71
4.55k
    if ( result.second != std::nullopt ) {
72
2.00k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
2.00k
    }
74
4.55k
}
75
76
4.55k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
4.55k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
4.55k
    return module->OpHMAC(op);
80
4.55k
}
81
82
/* Specialization for operation::UMAC */
83
5.88k
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
5.88k
    (void)module;
85
5.88k
    (void)op;
86
87
5.88k
    if ( result.second != std::nullopt ) {
88
2.83k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
2.83k
    }
90
5.88k
}
91
92
5.88k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
5.88k
    return module->OpUMAC(op);
94
5.88k
}
95
96
/* Specialization for operation::CMAC */
97
5.36k
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
5.36k
    (void)module;
99
5.36k
    (void)op;
100
101
5.36k
    if ( result.second != std::nullopt ) {
102
2.53k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
2.53k
    }
104
5.36k
}
105
106
5.36k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
5.36k
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
5.36k
    return module->OpCMAC(op);
110
5.36k
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
26.8k
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
26.8k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
26.8k
    if ( result.second != std::nullopt ) {
119
9.61k
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
9.61k
        if ( result.second->tag != std::nullopt ) {
121
4.19k
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
4.19k
        }
123
9.61k
    }
124
125
26.8k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
8.71k
        using fuzzing::datasource::ID;
127
128
8.71k
        bool tryDecrypt = true;
129
130
8.71k
        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
8.71k
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
8.71k
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
8.71k
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
8.71k
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
8.71k
                    op.cleartext.GetSize() + 32,
171
172
8.71k
                    op.aad,
173
174
                    /* Empty modifier */
175
8.71k
                    {});
176
177
8.71k
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
8.71k
            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
8.71k
            } 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
8.71k
        }
208
8.71k
    }
209
26.8k
}
210
211
26.8k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
26.8k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
26.8k
    return module->OpSymmetricEncrypt(op);
215
26.8k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
21.6k
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
21.6k
    (void)module;
220
21.6k
    (void)op;
221
222
21.6k
    if ( result.second != std::nullopt ) {
223
1.86k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
1.86k
    }
225
21.6k
}
226
227
21.6k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
21.6k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
21.6k
    return module->OpSymmetricDecrypt(op);
231
21.6k
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
1.47k
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
1.47k
    (void)module;
236
1.47k
    (void)op;
237
238
1.47k
    if ( result.second != std::nullopt ) {
239
440
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
440
    }
241
1.47k
}
242
243
1.47k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
1.47k
    return module->OpKDF_SCRYPT(op);
245
1.47k
}
246
247
/* Specialization for operation::KDF_HKDF */
248
11.6k
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
11.6k
    (void)module;
250
11.6k
    (void)op;
251
252
11.6k
    if ( result.second != std::nullopt ) {
253
5.12k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
5.12k
    }
255
11.6k
}
256
257
11.6k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
11.6k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
11.6k
    return module->OpKDF_HKDF(op);
261
11.6k
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
786
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
786
    (void)module;
266
786
    (void)op;
267
268
786
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
786
}
272
273
786
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
786
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
786
    return module->OpKDF_PBKDF(op);
277
786
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
695
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
695
    (void)module;
282
695
    (void)op;
283
284
695
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
695
}
288
289
695
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
695
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
695
    return module->OpKDF_PBKDF1(op);
293
695
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
4.04k
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
4.04k
    (void)module;
298
4.04k
    (void)op;
299
300
4.04k
    if ( result.second != std::nullopt ) {
301
1.48k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
1.48k
    }
303
4.04k
}
304
305
4.04k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
4.04k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
4.04k
    return module->OpKDF_PBKDF2(op);
309
4.04k
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
1.08k
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
1.08k
    (void)module;
314
1.08k
    (void)op;
315
316
1.08k
    if ( result.second != std::nullopt ) {
317
495
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
495
    }
319
1.08k
}
320
321
1.08k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
1.08k
    return module->OpKDF_ARGON2(op);
323
1.08k
}
324
325
/* Specialization for operation::KDF_SSH */
326
724
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
724
    (void)module;
328
724
    (void)op;
329
330
724
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
724
}
334
335
724
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
724
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
724
    return module->OpKDF_SSH(op);
339
724
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
1.06k
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
1.06k
    (void)module;
344
1.06k
    (void)op;
345
346
1.06k
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
1.06k
}
350
351
1.06k
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
1.06k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
1.06k
    return module->OpKDF_TLS1_PRF(op);
355
1.06k
}
356
357
/* Specialization for operation::KDF_X963 */
358
722
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
722
    (void)module;
360
722
    (void)op;
361
362
722
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
722
}
366
367
722
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
722
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
722
    return module->OpKDF_X963(op);
371
722
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
389
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
389
    (void)module;
376
389
    (void)op;
377
378
389
    if ( result.second != std::nullopt ) {
379
70
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
70
    }
381
389
}
382
383
389
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
389
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
389
    return module->OpKDF_BCRYPT(op);
387
389
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
3.20k
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
3.20k
    (void)module;
392
3.20k
    (void)op;
393
394
3.20k
    if ( result.second != std::nullopt ) {
395
1.47k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
1.47k
    }
397
3.20k
}
398
399
3.20k
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
3.20k
    if ( op.mech.mode == true ) {
401
1.82k
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
1.82k
    }
403
404
3.20k
    return module->OpKDF_SP_800_108(op);
405
3.20k
}
406
407
/* Specialization for operation::KDF_SRTP */
408
713
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
713
    (void)module;
410
713
    (void)op;
411
713
    (void)result;
412
713
}
413
414
713
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const {
415
713
    return module->OpKDF_SRTP(op);
416
713
}
417
418
/* Specialization for operation::KDF_SRTCP */
419
758
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
758
    (void)module;
421
758
    (void)op;
422
758
    (void)result;
423
758
}
424
425
758
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const {
426
758
    return module->OpKDF_SRTCP(op);
427
758
}
428
429
/* Specialization for operation::ECC_PrivateToPublic */
430
3.57k
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
3.57k
    (void)module;
432
433
3.57k
    if ( result.second != std::nullopt  ) {
434
1.09k
        const auto curveID = op.curveType.Get();
435
1.09k
        const auto privkey = op.priv.ToTrimmedString();
436
1.09k
        const auto pub_x = result.second->first.ToTrimmedString();
437
1.09k
        const auto pub_y = result.second->second.ToTrimmedString();
438
439
1.09k
        Pool_CurvePrivkey.Set({ curveID, privkey });
440
1.09k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
441
1.09k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
442
443
1.09k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
444
1.09k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
445
1.09k
    }
446
3.57k
}
447
448
3.57k
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
3.57k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
450
451
3.57k
    const size_t size = op.priv.ToTrimmedString().size();
452
453
3.57k
    if ( size == 0 || size > 4096 ) {
454
0
        return std::nullopt;
455
0
    }
456
457
3.57k
    return module->OpECC_PrivateToPublic(op);
458
3.57k
}
459
460
/* Specialization for operation::ECC_ValidatePubkey */
461
2.05k
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
2.05k
    (void)module;
463
2.05k
    (void)op;
464
2.05k
    (void)result;
465
2.05k
}
466
467
2.05k
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
468
2.05k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
469
470
2.05k
    return module->OpECC_ValidatePubkey(op);
471
2.05k
}
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
81
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
81
    (void)operations;
479
81
    (void)results;
480
81
    (void)data;
481
81
    (void)size;
482
81
}
483
484
3.39k
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
3.39k
    (void)module;
486
487
3.39k
    if ( result.second != std::nullopt  ) {
488
751
        const auto curveID = op.curveType.Get();
489
751
        const auto privkey = result.second->priv.ToTrimmedString();
490
751
        const auto pub_x = result.second->pub.first.ToTrimmedString();
491
751
        const auto pub_y = result.second->pub.second.ToTrimmedString();
492
493
751
        Pool_CurvePrivkey.Set({ curveID, privkey });
494
751
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
495
751
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
496
497
751
        {
498
751
            auto opValidate = operation::ECC_ValidatePubkey(
499
751
                    op.curveType,
500
751
                    result.second->pub,
501
751
                    op.modifier);
502
503
751
            const auto validateResult = module->OpECC_ValidatePubkey(opValidate);
504
751
            CF_ASSERT(
505
751
                    validateResult == std::nullopt ||
506
751
                    *validateResult == true,
507
751
                    "Cannot validate generated public key");
508
751
        }
509
751
    }
510
3.39k
}
511
512
3.39k
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
3.39k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
514
515
3.39k
    return module->OpECC_GenerateKeyPair(op);
516
3.39k
}
517
518
/* Specialization for operation::ECCSI_Sign */
519
271
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
271
    (void)module;
521
522
271
    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
271
}
565
566
271
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
271
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
568
271
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
569
570
271
    const size_t size = op.priv.ToTrimmedString().size();
571
572
271
    if ( size == 0 || size > 4096 ) {
573
0
        return std::nullopt;
574
0
    }
575
576
271
    return module->OpECCSI_Sign(op);
577
271
}
578
579
/* Specialization for operation::ECDSA_Sign */
580
2.53k
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
2.53k
    (void)module;
582
583
2.53k
    if ( result.second != std::nullopt  ) {
584
1.17k
        const auto curveID = op.curveType.Get();
585
1.17k
        const auto cleartext = op.cleartext.ToHex();
586
1.17k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
587
1.17k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
588
1.17k
        const auto sig_r = result.second->signature.first.ToTrimmedString();
589
1.17k
        const auto sig_s = result.second->signature.second.ToTrimmedString();
590
591
1.17k
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
592
1.17k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
593
1.17k
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
594
595
1.17k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
596
1.17k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
597
1.17k
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
598
1.17k
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
599
600
1.17k
        {
601
1.17k
            auto opVerify = operation::ECDSA_Verify(
602
1.17k
                    op,
603
1.17k
                    *(result.second),
604
1.17k
                    op.modifier);
605
606
1.17k
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
607
1.17k
            CF_ASSERT(
608
1.17k
                    verifyResult == std::nullopt ||
609
1.17k
                    *verifyResult == true,
610
1.17k
                    "Cannot verify generated signature");
611
1.17k
        }
612
1.17k
    }
613
2.53k
}
614
615
2.53k
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
2.53k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
617
2.53k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
618
619
2.53k
    const size_t size = op.priv.ToTrimmedString().size();
620
621
2.53k
    if ( size == 0 || size > 4096 ) {
622
2
        return std::nullopt;
623
2
    }
624
625
2.53k
    return module->OpECDSA_Sign(op);
626
2.53k
}
627
628
/* Specialization for operation::ECGDSA_Sign */
629
799
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
799
    (void)module;
631
632
799
    if ( result.second != std::nullopt  ) {
633
119
        const auto curveID = op.curveType.Get();
634
119
        const auto cleartext = op.cleartext.ToHex();
635
119
        const auto pub_x = result.second->pub.first.ToTrimmedString();
636
119
        const auto pub_y = result.second->pub.second.ToTrimmedString();
637
119
        const auto sig_r = result.second->signature.first.ToTrimmedString();
638
119
        const auto sig_s = result.second->signature.second.ToTrimmedString();
639
640
119
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
641
119
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
642
119
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
643
644
119
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
645
119
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
646
119
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
647
119
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
648
119
    }
649
799
}
650
651
799
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
799
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
653
799
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
654
655
799
    const size_t size = op.priv.ToTrimmedString().size();
656
657
799
    if ( size == 0 || size > 4096 ) {
658
0
        return std::nullopt;
659
0
    }
660
661
799
    return module->OpECGDSA_Sign(op);
662
799
}
663
664
/* Specialization for operation::ECRDSA_Sign */
665
285
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
285
    (void)module;
667
668
285
    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
285
}
686
687
285
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
285
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
689
285
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
690
691
285
    const size_t size = op.priv.ToTrimmedString().size();
692
693
285
    if ( size == 0 || size > 4096 ) {
694
0
        return std::nullopt;
695
0
    }
696
697
285
    return module->OpECRDSA_Sign(op);
698
285
}
699
700
/* Specialization for operation::Schnorr_Sign */
701
239
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
239
    (void)module;
703
704
239
    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
239
}
722
723
239
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
239
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
239
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
726
727
239
    const size_t size = op.priv.ToTrimmedString().size();
728
729
239
    if ( size == 0 || size > 4096 ) {
730
0
        return std::nullopt;
731
0
    }
732
733
239
    return module->OpSchnorr_Sign(op);
734
239
}
735
736
/* Specialization for operation::ECCSI_Verify */
737
241
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
241
    (void)module;
739
241
    (void)op;
740
241
    (void)result;
741
241
}
742
743
241
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
744
241
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
745
241
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
746
747
241
    return module->OpECCSI_Verify(op);
748
241
}
749
750
/* Specialization for operation::ECDSA_Verify */
751
1.49k
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
1.49k
    (void)module;
753
1.49k
    (void)op;
754
1.49k
    (void)result;
755
1.49k
}
756
757
1.49k
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
758
1.49k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
759
1.49k
    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
1.49k
    return module->OpECDSA_Verify(op);
772
1.49k
}
773
774
/* Specialization for operation::ECGDSA_Verify */
775
900
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
900
    (void)module;
777
900
    (void)op;
778
900
    (void)result;
779
900
}
780
781
900
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
782
900
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
783
900
    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
900
    return module->OpECGDSA_Verify(op);
796
900
}
797
798
/* Specialization for operation::ECRDSA_Verify */
799
235
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
235
    (void)module;
801
235
    (void)op;
802
235
    (void)result;
803
235
}
804
805
235
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
806
235
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
807
235
    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
235
    return module->OpECRDSA_Verify(op);
820
235
}
821
822
/* Specialization for operation::Schnorr_Verify */
823
228
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
228
    (void)module;
825
228
    (void)op;
826
228
    (void)result;
827
228
}
828
829
228
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
830
228
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
831
228
    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
228
    return module->OpSchnorr_Verify(op);
844
228
}
845
846
2.60k
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
2.60k
    (void)module;
848
2.60k
    (void)op;
849
2.60k
    (void)result;
850
2.60k
}
851
852
2.60k
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
2.60k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
854
2.60k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
855
856
2.60k
    return module->OpECDSA_Recover(op);
857
2.60k
}
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
1.12k
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
1.12k
    (void)module;
869
1.12k
    (void)op;
870
1.12k
    (void)result;
871
1.12k
}
872
873
1.12k
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
874
1.12k
    const std::vector<size_t> sizes = {
875
1.12k
        op.parameters.p.ToTrimmedString().size(),
876
1.12k
        op.parameters.q.ToTrimmedString().size(),
877
1.12k
        op.parameters.g.ToTrimmedString().size(),
878
1.12k
        op.pub.ToTrimmedString().size(),
879
1.12k
        op.signature.first.ToTrimmedString().size(),
880
1.12k
        op.signature.second.ToTrimmedString().size(),
881
1.12k
    };
882
883
6.71k
    for (const auto& size : sizes) {
884
6.71k
        if ( size == 0 || size > 4096 ) {
885
2
            return std::nullopt;
886
2
        }
887
6.71k
    }
888
889
1.11k
    return module->OpDSA_Verify(op);
890
1.12k
}
891
892
/* Specialization for operation::DSA_Sign */
893
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
894
template <>
895
91
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
91
    (void)operations;
897
91
    (void)results;
898
91
    (void)data;
899
91
    (void)size;
900
91
}
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
318
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
318
    (void)module;
910
318
    (void)op;
911
318
    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
318
}
934
935
318
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
318
    const std::vector<size_t> sizes = {
937
318
        op.parameters.p.ToTrimmedString().size(),
938
318
        op.parameters.q.ToTrimmedString().size(),
939
318
        op.parameters.g.ToTrimmedString().size(),
940
318
        op.priv.ToTrimmedString().size(),
941
318
    };
942
943
1.26k
    for (const auto& size : sizes) {
944
1.26k
        if ( size == 0 || size > 4096 ) {
945
2
            return std::nullopt;
946
2
        }
947
1.26k
    }
948
949
316
    return module->OpDSA_Sign(op);
950
318
}
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
273
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
273
    (void)result;
963
273
    (void)module;
964
273
    (void)op;
965
273
    if ( result.second != std::nullopt ) {
966
        //Pool_DSA_PubPriv.Set({pub, priv});
967
0
    }
968
273
}
969
970
273
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
971
273
    return module->OpDSA_PrivateToPublic(op);
972
273
}
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
89
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
89
    (void)operations;
980
89
    (void)results;
981
89
    (void)data;
982
89
    (void)size;
983
89
}
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
302
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
302
    (void)result;
994
302
    (void)module;
995
302
    (void)op;
996
302
    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
302
}
1003
1004
302
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
302
    const std::vector<size_t> sizes = {
1006
302
        op.p.ToTrimmedString().size(),
1007
302
        op.q.ToTrimmedString().size(),
1008
302
        op.g.ToTrimmedString().size(),
1009
302
    };
1010
1011
906
    for (const auto& size : sizes) {
1012
906
        if ( size == 0 || size > 4096 ) {
1013
0
            return std::nullopt;
1014
0
        }
1015
906
    }
1016
1017
302
    return module->OpDSA_GenerateKeyPair(op);
1018
302
}
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
67
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
67
    (void)operations;
1026
67
    (void)results;
1027
67
    (void)data;
1028
67
    (void)size;
1029
67
}
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
242
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
242
    (void)result;
1040
242
    (void)module;
1041
242
    (void)op;
1042
242
    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
242
}
1054
1055
242
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
242
    return module->OpDSA_GenerateParameters(op);
1057
242
}
1058
1059
/* Specialization for operation::ECDH_Derive */
1060
216
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
216
    (void)module;
1062
216
    (void)op;
1063
216
    (void)result;
1064
216
}
1065
1066
216
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1067
216
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1068
1069
216
    return module->OpECDH_Derive(op);
1070
216
}
1071
1072
/* Specialization for operation::ECIES_Encrypt */
1073
template <>
1074
83
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
83
    (void)operations;
1076
83
    (void)results;
1077
83
    (void)data;
1078
83
    (void)size;
1079
83
}
1080
285
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
285
    (void)module;
1082
285
    (void)op;
1083
285
    (void)result;
1084
285
}
1085
1086
285
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1087
285
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1088
1089
285
    return module->OpECIES_Encrypt(op);
1090
285
}
1091
1092
/* Specialization for operation::ECIES_Decrypt */
1093
292
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
292
    (void)module;
1095
292
    (void)op;
1096
292
    (void)result;
1097
292
}
1098
1099
292
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1100
292
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1101
1102
292
    return module->OpECIES_Decrypt(op);
1103
292
}
1104
1105
/* Specialization for operation::ECC_Point_Add */
1106
460
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
460
    (void)module;
1108
1109
460
    if ( result.second != std::nullopt  ) {
1110
63
        const auto curveID = op.curveType.Get();
1111
63
        const auto x = result.second->first.ToTrimmedString();
1112
63
        const auto y = result.second->second.ToTrimmedString();
1113
1114
63
        Pool_CurveECC_Point.Set({ curveID, x, y });
1115
1116
63
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1117
63
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1118
63
    }
1119
460
}
1120
1121
460
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
460
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1123
1124
460
    return module->OpECC_Point_Add(op);
1125
460
}
1126
1127
/* Specialization for operation::ECC_Point_Sub */
1128
545
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
545
    (void)module;
1130
1131
545
    if ( result.second != std::nullopt  ) {
1132
78
        const auto curveID = op.curveType.Get();
1133
78
        const auto x = result.second->first.ToTrimmedString();
1134
78
        const auto y = result.second->second.ToTrimmedString();
1135
1136
78
        Pool_CurveECC_Point.Set({ curveID, x, y });
1137
1138
78
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1139
78
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1140
78
    }
1141
545
}
1142
1143
545
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
545
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1145
1146
545
    return module->OpECC_Point_Sub(op);
1147
545
}
1148
1149
/* Specialization for operation::ECC_Point_Mul */
1150
1.91k
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.91k
    (void)module;
1152
1153
1.91k
    if ( result.second != std::nullopt  ) {
1154
263
        const auto curveID = op.curveType.Get();
1155
263
        const auto x = result.second->first.ToTrimmedString();
1156
263
        const auto y = result.second->second.ToTrimmedString();
1157
1158
263
        Pool_CurveECC_Point.Set({ curveID, x, y });
1159
1160
263
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1161
263
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1162
263
    }
1163
1.91k
}
1164
1165
1.91k
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.91k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1167
1168
1.91k
    return module->OpECC_Point_Mul(op);
1169
1.91k
}
1170
1171
/* Specialization for operation::ECC_Point_Neg */
1172
430
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
430
    (void)module;
1174
1175
430
    if ( result.second != std::nullopt  ) {
1176
73
        const auto curveID = op.curveType.Get();
1177
73
        const auto x = result.second->first.ToTrimmedString();
1178
73
        const auto y = result.second->second.ToTrimmedString();
1179
1180
73
        Pool_CurveECC_Point.Set({ curveID, x, y });
1181
1182
73
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1183
73
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1184
73
    }
1185
430
}
1186
1187
430
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
430
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1189
1190
430
    return module->OpECC_Point_Neg(op);
1191
430
}
1192
1193
/* Specialization for operation::ECC_Point_Dbl */
1194
437
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
437
    (void)module;
1196
1197
437
    if ( result.second != std::nullopt  ) {
1198
56
        const auto curveID = op.curveType.Get();
1199
56
        const auto x = result.second->first.ToTrimmedString();
1200
56
        const auto y = result.second->second.ToTrimmedString();
1201
1202
56
        Pool_CurveECC_Point.Set({ curveID, x, y });
1203
1204
56
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1205
56
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1206
56
    }
1207
437
}
1208
1209
437
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
437
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1211
1212
437
    return module->OpECC_Point_Dbl(op);
1213
437
}
1214
1215
/* Specialization for operation::ECC_Point_Cmp */
1216
415
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
415
    (void)module;
1218
415
    (void)result;
1219
415
    (void)op;
1220
415
}
1221
1222
415
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1223
415
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1224
1225
415
    return module->OpECC_Point_Cmp(op);
1226
415
}
1227
1228
/* Specialization for operation::DH_Derive */
1229
1.03k
template<> void ExecutorBase<component::Bignum, operation::DH_Derive>::postprocess(std::shared_ptr<Module> module, operation::DH_Derive& op, const ExecutorBase<component::Bignum, operation::DH_Derive>::ResultPair& result) const {
1230
1.03k
    (void)module;
1231
1.03k
    (void)op;
1232
1.03k
    (void)result;
1233
1.03k
}
1234
1235
1.03k
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1236
1.03k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1237
1.02k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1238
1.01k
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1239
1.00k
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1240
1241
997
    return module->OpDH_Derive(op);
1242
1.00k
}
1243
1244
/* Specialization for operation::DH_GenerateKeyPair */
1245
281
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
281
    (void)result;
1247
281
    (void)op;
1248
281
    (void)module;
1249
1250
281
    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
281
}
1258
1259
281
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
281
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1261
272
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1262
1263
263
    return module->OpDH_GenerateKeyPair(op);
1264
272
}
1265
1266
/* Specialization for operation::BignumCalc */
1267
24.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
24.8k
    (void)module;
1269
24.8k
    (void)op;
1270
1271
24.8k
    if ( result.second != std::nullopt  ) {
1272
7.14k
        const auto bignum = result.second->ToTrimmedString();
1273
1274
7.14k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1275
7.11k
            Pool_Bignum.Set(bignum);
1276
7.11k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1277
1.22k
                Pool_Bignum_Primes.Set(bignum);
1278
1.22k
            }
1279
7.11k
        }
1280
7.14k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1281
284
            if ( bignum == "1" ) {
1282
172
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1283
172
            }
1284
284
        }
1285
7.14k
    }
1286
24.8k
}
1287
1288
24.8k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1289
24.8k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1290
1291
    /* Prevent timeouts */
1292
24.8k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1293
24.8k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1294
24.8k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1295
24.8k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1296
1297
24.8k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1298
2.23k
        return std::nullopt;
1299
2.23k
    }
1300
1301
22.5k
    switch ( op.calcOp.Get() ) {
1302
99
        case    CF_CALCOP("SetBit(A,B)"):
1303
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1304
99
            if ( op.bn1.GetSize() > 4 ) {
1305
16
                return std::nullopt;
1306
16
            }
1307
83
            break;
1308
140
        case    CF_CALCOP("Exp(A,B)"):
1309
140
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1310
40
                return std::nullopt;
1311
40
            }
1312
100
            break;
1313
100
        case    CF_CALCOP("ModLShift(A,B,C)"):
1314
44
            if ( op.bn1.GetSize() > 4 ) {
1315
23
                return std::nullopt;
1316
23
            }
1317
21
            break;
1318
157
        case    CF_CALCOP("Exp2(A)"):
1319
157
            if ( op.bn0.GetSize() > 4 ) {
1320
21
                return std::nullopt;
1321
21
            }
1322
136
            break;
1323
22.5k
    }
1324
1325
22.4k
    return module->OpBignumCalc(op);
1326
22.5k
}
1327
1328
/* Specialization for operation::BignumCalc_Fp2 */
1329
455
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
455
    (void)module;
1331
455
    (void)op;
1332
1333
455
    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
455
}
1345
1346
455
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1347
455
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1348
1349
    /* Prevent timeouts */
1350
455
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1351
437
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1352
428
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1353
410
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1354
390
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1355
370
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1356
357
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1357
333
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1358
1359
315
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1360
0
        return std::nullopt;
1361
0
    }
1362
1363
315
    return module->OpBignumCalc_Fp2(op);
1364
315
}
1365
1366
/* Specialization for operation::BignumCalc_Fp12 */
1367
1.42k
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
1.42k
    (void)module;
1369
1.42k
    (void)op;
1370
1371
1.42k
    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
1.42k
}
1400
1401
1.42k
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1402
1.42k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1403
1404
    /* Prevent timeouts */
1405
1.42k
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1406
1.40k
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1407
1.39k
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1408
1.37k
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1409
1.35k
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1410
1.33k
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1411
1.31k
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1412
1.29k
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1413
1.27k
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1414
1.25k
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1415
1.23k
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1416
1.21k
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1417
1418
1.19k
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1419
1.17k
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1420
1.15k
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1421
1.13k
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1422
1.11k
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1423
1.10k
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1424
1.08k
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1425
1.06k
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1426
1.04k
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1427
1.03k
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1428
1.01k
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1429
995
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1430
1431
974
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1432
954
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1433
935
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1434
920
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1435
902
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1436
887
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1437
867
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1438
849
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1439
829
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1440
813
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1441
793
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1442
774
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1443
1444
755
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1445
735
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1446
715
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1447
695
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1448
673
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1449
655
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1450
637
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1451
617
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1452
602
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1453
582
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1454
563
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1455
544
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1456
1457
524
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1458
0
        return std::nullopt;
1459
0
    }
1460
1461
524
    return module->OpBignumCalc_Fp12(op);
1462
524
}
1463
1464
/* Specialization for operation::BLS_PrivateToPublic */
1465
260
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
260
    (void)module;
1467
1468
260
    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
260
}
1479
1480
260
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
260
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1482
1483
260
    const size_t size = op.priv.ToTrimmedString().size();
1484
1485
260
    if ( size == 0 || size > 4096 ) {
1486
0
        return std::nullopt;
1487
0
    }
1488
1489
260
    return module->OpBLS_PrivateToPublic(op);
1490
260
}
1491
1492
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1493
311
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
311
    (void)module;
1495
311
    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
311
}
1510
1511
311
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
311
    const size_t size = op.priv.ToTrimmedString().size();
1513
1514
311
    if ( size == 0 || size > 4096 ) {
1515
0
        return std::nullopt;
1516
0
    }
1517
1518
311
    return module->OpBLS_PrivateToPublic_G2(op);
1519
311
}
1520
1521
/* Specialization for operation::BLS_Sign */
1522
260
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
260
    (void)module;
1524
1525
260
    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
260
}
1553
1554
260
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
260
    const size_t size = op.priv.ToTrimmedString().size();
1556
1557
260
    if ( size == 0 || size > 4096 ) {
1558
0
        return std::nullopt;
1559
0
    }
1560
1561
260
    return module->OpBLS_Sign(op);
1562
260
}
1563
1564
/* Specialization for operation::BLS_Verify */
1565
271
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
271
    (void)module;
1567
271
    (void)op;
1568
271
    (void)result;
1569
271
}
1570
1571
271
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
271
    return module->OpBLS_Verify(op);
1588
271
}
1589
1590
/* Specialization for operation::BLS_BatchSign */
1591
319
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
319
    (void)module;
1593
319
    (void)op;
1594
1595
319
    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
319
}
1624
1625
319
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
319
    return module->OpBLS_BatchSign(op);
1627
319
}
1628
1629
/* Specialization for operation::BLS_BatchVerify */
1630
290
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
290
    (void)module;
1632
290
    (void)op;
1633
290
    (void)result;
1634
290
}
1635
1636
290
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1637
290
    return module->OpBLS_BatchVerify(op);
1638
290
}
1639
1640
/* Specialization for operation::BLS_Aggregate_G1 */
1641
255
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
255
    (void)module;
1643
255
    (void)op;
1644
255
    (void)result;
1645
255
}
1646
1647
255
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
255
    return module->OpBLS_Aggregate_G1(op);
1649
255
}
1650
1651
/* Specialization for operation::BLS_Aggregate_G2 */
1652
265
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
265
    (void)module;
1654
265
    (void)op;
1655
265
    (void)result;
1656
265
}
1657
1658
265
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
265
    return module->OpBLS_Aggregate_G2(op);
1660
265
}
1661
1662
/* Specialization for operation::BLS_Pairing */
1663
236
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
236
    (void)module;
1665
236
    (void)op;
1666
1667
236
    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
236
}
1684
1685
236
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1686
236
    return module->OpBLS_Pairing(op);
1687
236
}
1688
1689
/* Specialization for operation::BLS_MillerLoop */
1690
247
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
247
    (void)module;
1692
247
    (void)op;
1693
1694
247
    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
247
}
1711
1712
247
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1713
247
    return module->OpBLS_MillerLoop(op);
1714
247
}
1715
1716
/* Specialization for operation::BLS_FinalExp */
1717
290
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
290
    (void)module;
1719
290
    (void)op;
1720
1721
290
    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
290
}
1738
1739
290
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1740
290
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1741
290
    return module->OpBLS_FinalExp(op);
1742
290
}
1743
1744
/* Specialization for operation::BLS_HashToG1 */
1745
262
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
262
    (void)module;
1747
1748
262
    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
262
}
1759
1760
262
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1761
262
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1762
262
    return module->OpBLS_HashToG1(op);
1763
262
}
1764
1765
/* Specialization for operation::BLS_MapToG1 */
1766
254
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
254
    (void)module;
1768
1769
254
    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
254
}
1780
1781
254
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1782
254
    return module->OpBLS_MapToG1(op);
1783
254
}
1784
1785
/* Specialization for operation::BLS_MapToG2 */
1786
235
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
235
    (void)module;
1788
1789
235
    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
235
}
1804
1805
235
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1806
235
    return module->OpBLS_MapToG2(op);
1807
235
}
1808
1809
/* Specialization for operation::BLS_IsG1OnCurve */
1810
264
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
264
    (void)module;
1812
264
    (void)op;
1813
264
    (void)result;
1814
264
}
1815
1816
264
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1817
264
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1818
264
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1819
264
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1820
1821
262
    return module->OpBLS_IsG1OnCurve(op);
1822
264
}
1823
1824
/* Specialization for operation::BLS_IsG2OnCurve */
1825
287
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
287
    (void)module;
1827
287
    (void)op;
1828
287
    (void)result;
1829
287
}
1830
1831
287
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1832
287
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1833
278
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1834
269
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1835
260
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1836
1837
251
    return module->OpBLS_IsG2OnCurve(op);
1838
260
}
1839
1840
/* Specialization for operation::BLS_GenerateKeyPair */
1841
268
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
268
    (void)module;
1843
1844
268
    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
268
}
1857
1858
268
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
268
    return module->OpBLS_GenerateKeyPair(op);
1860
268
}
1861
1862
/* Specialization for operation::BLS_Decompress_G1 */
1863
258
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
258
    (void)module;
1865
1866
258
    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
258
}
1877
1878
258
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
258
    return module->OpBLS_Decompress_G1(op);
1880
258
}
1881
1882
/* Specialization for operation::BLS_Compress_G1 */
1883
249
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
249
    (void)module;
1885
249
    (void)op;
1886
1887
249
    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
249
}
1893
1894
249
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
249
    return module->OpBLS_Compress_G1(op);
1896
249
}
1897
1898
/* Specialization for operation::BLS_Decompress_G2 */
1899
220
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
220
    (void)module;
1901
1902
220
    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
220
}
1917
1918
220
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
220
    return module->OpBLS_Decompress_G2(op);
1920
220
}
1921
1922
/* Specialization for operation::BLS_Compress_G2 */
1923
211
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
211
    (void)module;
1925
1926
211
    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
211
}
1937
1938
211
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
211
    return module->OpBLS_Compress_G2(op);
1940
211
}
1941
1942
/* Specialization for operation::BLS_G1_Add */
1943
296
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
296
    (void)module;
1945
1946
296
    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
296
}
1957
1958
296
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
296
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1960
296
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1961
287
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1962
278
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1963
269
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1964
1965
260
    return module->OpBLS_G1_Add(op);
1966
269
}
1967
1968
/* Specialization for operation::BLS_G1_Mul */
1969
273
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
273
    (void)module;
1971
1972
273
    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
273
}
1983
1984
273
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
273
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1986
273
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1987
273
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1988
273
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1989
1990
273
    return module->OpBLS_G1_Mul(op);
1991
273
}
1992
1993
/* Specialization for operation::BLS_G1_IsEq */
1994
422
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
422
    (void)module;
1996
422
    (void)op;
1997
422
    (void)result;
1998
422
}
1999
2000
422
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
2001
422
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2002
422
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2003
404
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2004
386
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2005
377
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2006
2007
366
    return module->OpBLS_G1_IsEq(op);
2008
377
}
2009
2010
/* Specialization for operation::BLS_G1_Neg */
2011
274
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
274
    (void)module;
2013
2014
274
    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
274
}
2025
2026
274
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
274
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2028
274
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
272
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
2031
272
    return module->OpBLS_G1_Neg(op);
2032
272
}
2033
2034
/* Specialization for operation::BLS_G2_Add */
2035
471
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
471
    (void)module;
2037
2038
471
    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
471
}
2053
2054
471
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
471
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2056
471
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2057
462
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2058
453
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2059
434
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2060
416
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2061
396
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2062
379
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2063
361
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2064
2065
343
    return module->OpBLS_G2_Add(op);
2066
361
}
2067
2068
/* Specialization for operation::BLS_G2_Mul */
2069
261
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
261
    (void)module;
2071
2072
261
    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
261
}
2087
2088
261
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
261
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2090
261
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2091
261
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2092
261
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2093
261
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2094
261
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2095
2096
252
    return module->OpBLS_G2_Mul(op);
2097
261
}
2098
2099
/* Specialization for operation::BLS_G2_IsEq */
2100
393
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
393
    (void)module;
2102
393
    (void)op;
2103
393
    (void)result;
2104
393
}
2105
2106
393
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2107
393
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2108
393
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2109
373
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2110
356
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2111
338
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2112
318
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2113
309
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2114
300
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2115
291
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2116
2117
289
    return module->OpBLS_G2_IsEq(op);
2118
291
}
2119
2120
/* Specialization for operation::BLS_G2_Neg */
2121
288
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
288
    (void)module;
2123
2124
288
    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
288
}
2139
2140
288
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
288
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2142
288
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2143
279
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2144
272
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2145
263
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2146
2147
254
    return module->OpBLS_G2_Neg(op);
2148
263
}
2149
2150
/* Specialization for operation::BLS_G1_MultiExp */
2151
418
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
418
    (void)module;
2153
2154
418
    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
418
}
2165
2166
418
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
418
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2168
2169
2.63k
    for (const auto& point_scalar : op.points_scalars.points_scalars) {
2170
2.63k
        if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2171
2.62k
        if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2172
2.61k
        if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2173
2.61k
    }
2174
2175
391
    return module->OpBLS_G1_MultiExp(op);
2176
418
}
2177
2178
/* Specialization for operation::Misc */
2179
207
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2180
207
    (void)module;
2181
207
    (void)op;
2182
207
    (void)result;
2183
207
}
2184
2185
207
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2186
207
    return module->OpMisc(op);
2187
207
}
2188
2189
/* Specialization for operation::BLS_HashToG2 */
2190
283
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
283
    (void)module;
2192
2193
283
    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
283
}
2208
2209
283
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2210
283
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2211
283
    return module->OpBLS_HashToG2(op);
2212
283
}
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
46
{ }
2217
44
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2218
44
    this->modulo = component::Bignum(modulo);
2219
44
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2223
2
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2224
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2228
2
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2229
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2233
2
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2234
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2238
2
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2239
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2243
2
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2244
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2248
2
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2249
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2253
2
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337"));
2254
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2258
2
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097"));
2259
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2263
2
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2264
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2268
2
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2269
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2273
2
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2274
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2278
2
    CF_NORET(SetModulo("18446744069414584321"));
2279
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2283
2
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2284
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2288
2
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2289
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2293
2
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2294
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2298
2
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2299
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2303
2
    CF_NORET(SetModulo("18446744073709551616"));
2304
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2308
2
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2309
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2313
2
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2314
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2318
2
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2319
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2323
2
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2324
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2328
2
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2329
2
}
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
2
{ }
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
2
{ }
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
214
{
2351
214
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
46
{
2351
46
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
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
2
{
2351
2
}
2352
2353
/* Specialization for operation::SR25519_Verify */
2354
282
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
282
    (void)module;
2356
282
    (void)op;
2357
282
    (void)result;
2358
282
}
2359
2360
282
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2361
282
    return module->OpSR25519_Verify(op);
2362
282
}
2363
2364
template <class ResultType, class OperationType>
2365
214
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
214
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2365
46
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
46
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
2367
2368
/* Filter away the values in the set that are std::nullopt */
2369
template <class ResultType, class OperationType>
2370
46.9k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
46.9k
    ResultSet ret;
2372
2373
159k
    for (const auto& result : results) {
2374
159k
        if ( result.second == std::nullopt ) {
2375
112k
            continue;
2376
112k
        }
2377
2378
46.6k
        ret.push_back(result);
2379
46.6k
    }
2380
2381
46.9k
    return ret;
2382
46.9k
}
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
2.85k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2.85k
    ResultSet ret;
2372
2373
8.74k
    for (const auto& result : results) {
2374
8.74k
        if ( result.second == std::nullopt ) {
2375
3.88k
            continue;
2376
3.88k
        }
2377
2378
4.86k
        ret.push_back(result);
2379
4.86k
    }
2380
2381
2.85k
    return ret;
2382
2.85k
}
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
1.37k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.37k
    ResultSet ret;
2372
2373
4.55k
    for (const auto& result : results) {
2374
4.55k
        if ( result.second == std::nullopt ) {
2375
2.55k
            continue;
2376
2.55k
        }
2377
2378
2.00k
        ret.push_back(result);
2379
2.00k
    }
2380
2381
1.37k
    return ret;
2382
1.37k
}
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
1.07k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.07k
    ResultSet ret;
2372
2373
5.88k
    for (const auto& result : results) {
2374
5.88k
        if ( result.second == std::nullopt ) {
2375
3.05k
            continue;
2376
3.05k
        }
2377
2378
2.83k
        ret.push_back(result);
2379
2.83k
    }
2380
2381
1.07k
    return ret;
2382
1.07k
}
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
1.19k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.19k
    ResultSet ret;
2372
2373
5.36k
    for (const auto& result : results) {
2374
5.36k
        if ( result.second == std::nullopt ) {
2375
2.82k
            continue;
2376
2.82k
        }
2377
2378
2.53k
        ret.push_back(result);
2379
2.53k
    }
2380
2381
1.19k
    return ret;
2382
1.19k
}
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
6.13k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
6.13k
    ResultSet ret;
2372
2373
26.8k
    for (const auto& result : results) {
2374
26.8k
        if ( result.second == std::nullopt ) {
2375
17.2k
            continue;
2376
17.2k
        }
2377
2378
9.61k
        ret.push_back(result);
2379
9.61k
    }
2380
2381
6.13k
    return ret;
2382
6.13k
}
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
5.77k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
5.77k
    ResultSet ret;
2372
2373
21.6k
    for (const auto& result : results) {
2374
21.6k
        if ( result.second == std::nullopt ) {
2375
19.8k
            continue;
2376
19.8k
        }
2377
2378
1.86k
        ret.push_back(result);
2379
1.86k
    }
2380
2381
5.77k
    return ret;
2382
5.77k
}
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
238
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
238
    ResultSet ret;
2372
2373
1.47k
    for (const auto& result : results) {
2374
1.47k
        if ( result.second == std::nullopt ) {
2375
1.03k
            continue;
2376
1.03k
        }
2377
2378
440
        ret.push_back(result);
2379
440
    }
2380
2381
238
    return ret;
2382
238
}
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
3.61k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3.61k
    ResultSet ret;
2372
2373
11.6k
    for (const auto& result : results) {
2374
11.6k
        if ( result.second == std::nullopt ) {
2375
6.51k
            continue;
2376
6.51k
        }
2377
2378
5.12k
        ret.push_back(result);
2379
5.12k
    }
2380
2381
3.61k
    return ret;
2382
3.61k
}
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
185
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
185
    ResultSet ret;
2372
2373
1.06k
    for (const auto& result : results) {
2374
1.06k
        if ( result.second == std::nullopt ) {
2375
1.06k
            continue;
2376
1.06k
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
185
    return ret;
2382
185
}
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
102
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
102
    ResultSet ret;
2372
2373
786
    for (const auto& result : results) {
2374
786
        if ( result.second == std::nullopt ) {
2375
786
            continue;
2376
786
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
102
    return ret;
2382
102
}
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
108
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
108
    ResultSet ret;
2372
2373
695
    for (const auto& result : results) {
2374
695
        if ( result.second == std::nullopt ) {
2375
695
            continue;
2376
695
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
108
    return ret;
2382
108
}
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
1.21k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.21k
    ResultSet ret;
2372
2373
4.04k
    for (const auto& result : results) {
2374
4.04k
        if ( result.second == std::nullopt ) {
2375
2.56k
            continue;
2376
2.56k
        }
2377
2378
1.48k
        ret.push_back(result);
2379
1.48k
    }
2380
2381
1.21k
    return ret;
2382
1.21k
}
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
428
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
428
    ResultSet ret;
2372
2373
1.08k
    for (const auto& result : results) {
2374
1.08k
        if ( result.second == std::nullopt ) {
2375
585
            continue;
2376
585
        }
2377
2378
495
        ret.push_back(result);
2379
495
    }
2380
2381
428
    return ret;
2382
428
}
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
110
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
110
    ResultSet ret;
2372
2373
724
    for (const auto& result : results) {
2374
724
        if ( result.second == std::nullopt ) {
2375
724
            continue;
2376
724
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
110
    return ret;
2382
110
}
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
92
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
92
    ResultSet ret;
2372
2373
722
    for (const auto& result : results) {
2374
722
        if ( result.second == std::nullopt ) {
2375
722
            continue;
2376
722
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
92
    return ret;
2382
92
}
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
179
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
179
    ResultSet ret;
2372
2373
389
    for (const auto& result : results) {
2374
389
        if ( result.second == std::nullopt ) {
2375
319
            continue;
2376
319
        }
2377
2378
70
        ret.push_back(result);
2379
70
    }
2380
2381
179
    return ret;
2382
179
}
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
714
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
714
    ResultSet ret;
2372
2373
3.20k
    for (const auto& result : results) {
2374
3.20k
        if ( result.second == std::nullopt ) {
2375
1.72k
            continue;
2376
1.72k
        }
2377
2378
1.47k
        ret.push_back(result);
2379
1.47k
    }
2380
2381
714
    return ret;
2382
714
}
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
111
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
111
    ResultSet ret;
2372
2373
713
    for (const auto& result : results) {
2374
713
        if ( result.second == std::nullopt ) {
2375
713
            continue;
2376
713
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
111
    return ret;
2382
111
}
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
104
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
104
    ResultSet ret;
2372
2373
758
    for (const auto& result : results) {
2374
758
        if ( result.second == std::nullopt ) {
2375
758
            continue;
2376
758
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
104
    return ret;
2382
104
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
1.46k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.46k
    ResultSet ret;
2372
2373
3.57k
    for (const auto& result : results) {
2374
3.57k
        if ( result.second == std::nullopt ) {
2375
2.47k
            continue;
2376
2.47k
        }
2377
2378
1.09k
        ret.push_back(result);
2379
1.09k
    }
2380
2381
1.46k
    return ret;
2382
1.46k
}
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
852
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
852
    ResultSet ret;
2372
2373
2.05k
    for (const auto& result : results) {
2374
2.05k
        if ( result.second == std::nullopt ) {
2375
567
            continue;
2376
567
        }
2377
2378
1.48k
        ret.push_back(result);
2379
1.48k
    }
2380
2381
852
    return ret;
2382
852
}
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
75
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
75
    ResultSet ret;
2372
2373
271
    for (const auto& result : results) {
2374
271
        if ( result.second == std::nullopt ) {
2375
271
            continue;
2376
271
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
75
    return ret;
2382
75
}
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
843
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
843
    ResultSet ret;
2372
2373
2.53k
    for (const auto& result : results) {
2374
2.53k
        if ( result.second == std::nullopt ) {
2375
1.36k
            continue;
2376
1.36k
        }
2377
2378
1.17k
        ret.push_back(result);
2379
1.17k
    }
2380
2381
843
    return ret;
2382
843
}
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
270
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
270
    ResultSet ret;
2372
2373
799
    for (const auto& result : results) {
2374
799
        if ( result.second == std::nullopt ) {
2375
680
            continue;
2376
680
        }
2377
2378
119
        ret.push_back(result);
2379
119
    }
2380
2381
270
    return ret;
2382
270
}
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
82
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
82
    ResultSet ret;
2372
2373
285
    for (const auto& result : results) {
2374
285
        if ( result.second == std::nullopt ) {
2375
285
            continue;
2376
285
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
82
    return ret;
2382
82
}
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
67
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
67
    ResultSet ret;
2372
2373
239
    for (const auto& result : results) {
2374
239
        if ( result.second == std::nullopt ) {
2375
239
            continue;
2376
239
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
67
    return ret;
2382
67
}
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
64
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
64
    ResultSet ret;
2372
2373
241
    for (const auto& result : results) {
2374
241
        if ( result.second == std::nullopt ) {
2375
241
            continue;
2376
241
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
64
    return ret;
2382
64
}
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
481
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
481
    ResultSet ret;
2372
2373
1.49k
    for (const auto& result : results) {
2374
1.49k
        if ( result.second == std::nullopt ) {
2375
702
            continue;
2376
702
        }
2377
2378
790
        ret.push_back(result);
2379
790
    }
2380
2381
481
    return ret;
2382
481
}
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
324
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
324
    ResultSet ret;
2372
2373
900
    for (const auto& result : results) {
2374
900
        if ( result.second == std::nullopt ) {
2375
626
            continue;
2376
626
        }
2377
2378
274
        ret.push_back(result);
2379
274
    }
2380
2381
324
    return ret;
2382
324
}
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
66
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
66
    ResultSet ret;
2372
2373
235
    for (const auto& result : results) {
2374
235
        if ( result.second == std::nullopt ) {
2375
235
            continue;
2376
235
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
66
    return ret;
2382
66
}
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
64
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
64
    ResultSet ret;
2372
2373
228
    for (const auto& result : results) {
2374
228
        if ( result.second == std::nullopt ) {
2375
228
            continue;
2376
228
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
64
    return ret;
2382
64
}
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
1.01k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.01k
    ResultSet ret;
2372
2373
2.60k
    for (const auto& result : results) {
2374
2.60k
        if ( result.second == std::nullopt ) {
2375
1.61k
            continue;
2376
1.61k
        }
2377
2378
986
        ret.push_back(result);
2379
986
    }
2380
2381
1.01k
    return ret;
2382
1.01k
}
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
339
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
339
    ResultSet ret;
2372
2373
1.12k
    for (const auto& result : results) {
2374
1.12k
        if ( result.second == std::nullopt ) {
2375
935
            continue;
2376
935
        }
2377
2378
185
        ret.push_back(result);
2379
185
    }
2380
2381
339
    return ret;
2382
339
}
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
75
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
75
    ResultSet ret;
2372
2373
273
    for (const auto& result : results) {
2374
273
        if ( result.second == std::nullopt ) {
2375
273
            continue;
2376
273
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
75
    return ret;
2382
75
}
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
60
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
60
    ResultSet ret;
2372
2373
216
    for (const auto& result : results) {
2374
216
        if ( result.second == std::nullopt ) {
2375
216
            continue;
2376
216
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
60
    return ret;
2382
60
}
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
83
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
83
    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
83
    return ret;
2382
83
}
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
126
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
126
    ResultSet ret;
2372
2373
460
    for (const auto& result : results) {
2374
460
        if ( result.second == std::nullopt ) {
2375
397
            continue;
2376
397
        }
2377
2378
63
        ret.push_back(result);
2379
63
    }
2380
2381
126
    return ret;
2382
126
}
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
159
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
159
    ResultSet ret;
2372
2373
545
    for (const auto& result : results) {
2374
545
        if ( result.second == std::nullopt ) {
2375
467
            continue;
2376
467
        }
2377
2378
78
        ret.push_back(result);
2379
78
    }
2380
2381
159
    return ret;
2382
159
}
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
624
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
624
    ResultSet ret;
2372
2373
1.91k
    for (const auto& result : results) {
2374
1.91k
        if ( result.second == std::nullopt ) {
2375
1.65k
            continue;
2376
1.65k
        }
2377
2378
263
        ret.push_back(result);
2379
263
    }
2380
2381
624
    return ret;
2382
624
}
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
131
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
131
    ResultSet ret;
2372
2373
430
    for (const auto& result : results) {
2374
430
        if ( result.second == std::nullopt ) {
2375
357
            continue;
2376
357
        }
2377
2378
73
        ret.push_back(result);
2379
73
    }
2380
2381
131
    return ret;
2382
131
}
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
132
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
132
    ResultSet ret;
2372
2373
437
    for (const auto& result : results) {
2374
437
        if ( result.second == std::nullopt ) {
2375
381
            continue;
2376
381
        }
2377
2378
56
        ret.push_back(result);
2379
56
    }
2380
2381
132
    return ret;
2382
132
}
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
113
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
113
    ResultSet ret;
2372
2373
415
    for (const auto& result : results) {
2374
415
        if ( result.second == std::nullopt ) {
2375
377
            continue;
2376
377
        }
2377
2378
38
        ret.push_back(result);
2379
38
    }
2380
2381
113
    return ret;
2382
113
}
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
344
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
344
    ResultSet ret;
2372
2373
1.03k
    for (const auto& result : results) {
2374
1.03k
        if ( result.second == std::nullopt ) {
2375
985
            continue;
2376
985
        }
2377
2378
54
        ret.push_back(result);
2379
54
    }
2380
2381
344
    return ret;
2382
344
}
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
10.1k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
10.1k
    ResultSet ret;
2372
2373
24.8k
    for (const auto& result : results) {
2374
24.8k
        if ( result.second == std::nullopt ) {
2375
17.7k
            continue;
2376
17.7k
        }
2377
2378
7.14k
        ret.push_back(result);
2379
7.14k
    }
2380
2381
10.1k
    return ret;
2382
10.1k
}
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
156
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
156
    ResultSet ret;
2372
2373
455
    for (const auto& result : results) {
2374
455
        if ( result.second == std::nullopt ) {
2375
455
            continue;
2376
455
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
156
    return ret;
2382
156
}
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
477
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
477
    ResultSet ret;
2372
2373
1.42k
    for (const auto& result : results) {
2374
1.42k
        if ( result.second == std::nullopt ) {
2375
1.42k
            continue;
2376
1.42k
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
477
    return ret;
2382
477
}
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
76
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
76
    ResultSet ret;
2372
2373
260
    for (const auto& result : results) {
2374
260
        if ( result.second == std::nullopt ) {
2375
260
            continue;
2376
260
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
76
    return ret;
2382
76
}
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
97
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
97
    ResultSet ret;
2372
2373
311
    for (const auto& result : results) {
2374
311
        if ( result.second == std::nullopt ) {
2375
311
            continue;
2376
311
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
97
    return ret;
2382
97
}
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
71
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
71
    ResultSet ret;
2372
2373
260
    for (const auto& result : results) {
2374
260
        if ( result.second == std::nullopt ) {
2375
260
            continue;
2376
260
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
71
    return ret;
2382
71
}
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
71
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
71
    ResultSet ret;
2372
2373
271
    for (const auto& result : results) {
2374
271
        if ( result.second == std::nullopt ) {
2375
271
            continue;
2376
271
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
71
    return ret;
2382
71
}
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
97
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
97
    ResultSet ret;
2372
2373
319
    for (const auto& result : results) {
2374
319
        if ( result.second == std::nullopt ) {
2375
319
            continue;
2376
319
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
97
    return ret;
2382
97
}
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
81
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
81
    ResultSet ret;
2372
2373
290
    for (const auto& result : results) {
2374
290
        if ( result.second == std::nullopt ) {
2375
290
            continue;
2376
290
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
81
    return ret;
2382
81
}
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
70
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
70
    ResultSet ret;
2372
2373
255
    for (const auto& result : results) {
2374
255
        if ( result.second == std::nullopt ) {
2375
255
            continue;
2376
255
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
70
    return ret;
2382
70
}
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
75
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
75
    ResultSet ret;
2372
2373
265
    for (const auto& result : results) {
2374
265
        if ( result.second == std::nullopt ) {
2375
265
            continue;
2376
265
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
75
    return ret;
2382
75
}
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
65
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
65
    ResultSet ret;
2372
2373
236
    for (const auto& result : results) {
2374
236
        if ( result.second == std::nullopt ) {
2375
236
            continue;
2376
236
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
65
    return ret;
2382
65
}
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
69
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
69
    ResultSet ret;
2372
2373
247
    for (const auto& result : results) {
2374
247
        if ( result.second == std::nullopt ) {
2375
247
            continue;
2376
247
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
69
    return ret;
2382
69
}
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
82
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
82
    ResultSet ret;
2372
2373
290
    for (const auto& result : results) {
2374
290
        if ( result.second == std::nullopt ) {
2375
290
            continue;
2376
290
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
82
    return ret;
2382
82
}
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
72
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
72
    ResultSet ret;
2372
2373
262
    for (const auto& result : results) {
2374
262
        if ( result.second == std::nullopt ) {
2375
262
            continue;
2376
262
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
72
    return ret;
2382
72
}
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
78
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
78
    ResultSet ret;
2372
2373
283
    for (const auto& result : results) {
2374
283
        if ( result.second == std::nullopt ) {
2375
283
            continue;
2376
283
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
78
    return ret;
2382
78
}
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
70
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
70
    ResultSet ret;
2372
2373
254
    for (const auto& result : results) {
2374
254
        if ( result.second == std::nullopt ) {
2375
254
            continue;
2376
254
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
70
    return ret;
2382
70
}
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
66
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
66
    ResultSet ret;
2372
2373
235
    for (const auto& result : results) {
2374
235
        if ( result.second == std::nullopt ) {
2375
235
            continue;
2376
235
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
66
    return ret;
2382
66
}
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
76
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
76
    ResultSet ret;
2372
2373
264
    for (const auto& result : results) {
2374
264
        if ( result.second == std::nullopt ) {
2375
264
            continue;
2376
264
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
76
    return ret;
2382
76
}
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
80
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
80
    ResultSet ret;
2372
2373
287
    for (const auto& result : results) {
2374
287
        if ( result.second == std::nullopt ) {
2375
287
            continue;
2376
287
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
80
    return ret;
2382
80
}
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
72
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
72
    ResultSet ret;
2372
2373
268
    for (const auto& result : results) {
2374
268
        if ( result.second == std::nullopt ) {
2375
268
            continue;
2376
268
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
72
    return ret;
2382
72
}
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
78
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
78
    ResultSet ret;
2372
2373
258
    for (const auto& result : results) {
2374
258
        if ( result.second == std::nullopt ) {
2375
258
            continue;
2376
258
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
78
    return ret;
2382
78
}
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
72
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
72
    ResultSet ret;
2372
2373
249
    for (const auto& result : results) {
2374
249
        if ( result.second == std::nullopt ) {
2375
249
            continue;
2376
249
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
72
    return ret;
2382
72
}
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
64
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
64
    ResultSet ret;
2372
2373
220
    for (const auto& result : results) {
2374
220
        if ( result.second == std::nullopt ) {
2375
220
            continue;
2376
220
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
64
    return ret;
2382
64
}
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
56
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
56
    ResultSet ret;
2372
2373
211
    for (const auto& result : results) {
2374
211
        if ( result.second == std::nullopt ) {
2375
211
            continue;
2376
211
        }
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_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
98
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
98
    ResultSet ret;
2372
2373
296
    for (const auto& result : results) {
2374
296
        if ( result.second == std::nullopt ) {
2375
296
            continue;
2376
296
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
98
    return ret;
2382
98
}
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
84
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
84
    ResultSet ret;
2372
2373
273
    for (const auto& result : results) {
2374
273
        if ( result.second == std::nullopt ) {
2375
273
            continue;
2376
273
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
84
    return ret;
2382
84
}
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
144
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
144
    ResultSet ret;
2372
2373
422
    for (const auto& result : results) {
2374
422
        if ( result.second == std::nullopt ) {
2375
422
            continue;
2376
422
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
144
    return ret;
2382
144
}
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
86
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
86
    ResultSet ret;
2372
2373
274
    for (const auto& result : results) {
2374
274
        if ( result.second == std::nullopt ) {
2375
274
            continue;
2376
274
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
86
    return ret;
2382
86
}
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
156
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
156
    ResultSet ret;
2372
2373
471
    for (const auto& result : results) {
2374
471
        if ( result.second == std::nullopt ) {
2375
471
            continue;
2376
471
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
156
    return ret;
2382
156
}
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
77
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
77
    ResultSet ret;
2372
2373
261
    for (const auto& result : results) {
2374
261
        if ( result.second == std::nullopt ) {
2375
261
            continue;
2376
261
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
77
    return ret;
2382
77
}
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
123
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
123
    ResultSet ret;
2372
2373
393
    for (const auto& result : results) {
2374
393
        if ( result.second == std::nullopt ) {
2375
393
            continue;
2376
393
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
123
    return ret;
2382
123
}
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
90
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
90
    ResultSet ret;
2372
2373
288
    for (const auto& result : results) {
2374
288
        if ( result.second == std::nullopt ) {
2375
288
            continue;
2376
288
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
90
    return ret;
2382
90
}
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
127
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
127
    ResultSet ret;
2372
2373
418
    for (const auto& result : results) {
2374
418
        if ( result.second == std::nullopt ) {
2375
418
            continue;
2376
418
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
127
    return ret;
2382
127
}
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
56
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
56
    ResultSet ret;
2372
2373
207
    for (const auto& result : results) {
2374
207
        if ( result.second == std::nullopt ) {
2375
207
            continue;
2376
207
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
56
    return ret;
2382
56
}
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
83
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
83
    ResultSet ret;
2372
2373
282
    for (const auto& result : results) {
2374
282
        if ( result.second == std::nullopt ) {
2375
282
            continue;
2376
282
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
83
    return ret;
2382
83
}
2383
2384
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2385
template <>
2386
1.54k
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
1.54k
    (void)operations;
2388
1.54k
    (void)results;
2389
1.54k
    (void)data;
2390
1.54k
    (void)size;
2391
1.54k
}
2392
2393
template <class ResultType, class OperationType>
2394
4.76k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
4.76k
    (void)operation;
2396
2397
4.76k
    return false;
2398
4.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2394
1.08k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
1.08k
    (void)operation;
2396
2397
1.08k
    return false;
2398
1.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
Line
Count
Source
2394
366
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
366
    (void)operation;
2396
2397
366
    return false;
2398
366
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const
Line
Count
Source
2394
49
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
49
    (void)operation;
2396
2397
49
    return false;
2398
49
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
Line
Count
Source
2394
1.13k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
1.13k
    (void)operation;
2396
2397
1.13k
    return false;
2398
1.13k
}
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
275
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
275
    (void)operation;
2396
2397
275
    return false;
2398
275
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const
Line
Count
Source
2394
80
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
80
    (void)operation;
2396
2397
80
    return false;
2398
80
}
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
9
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
9
    (void)operation;
2396
2397
9
    return false;
2398
9
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
Line
Count
Source
2394
176
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
176
    (void)operation;
2396
2397
176
    return false;
2398
176
}
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
330
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
330
    (void)operation;
2396
2397
330
    return false;
2398
330
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2394
610
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
610
    (void)operation;
2396
2397
610
    return false;
2398
610
}
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
228
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
228
    (void)operation;
2396
2397
228
    return false;
2398
228
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const
Line
Count
Source
2394
68
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
68
    (void)operation;
2396
2397
68
    return false;
2398
68
}
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
144
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
144
    (void)operation;
2396
2397
144
    return false;
2398
144
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const
Line
Count
Source
2394
54
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
54
    (void)operation;
2396
2397
54
    return false;
2398
54
}
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
16
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
16
    (void)operation;
2396
2397
16
    return false;
2398
16
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::dontCompare(cryptofuzz::operation::ECC_Point_Sub const&) const
Line
Count
Source
2394
21
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
21
    (void)operation;
2396
2397
21
    return false;
2398
21
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const
Line
Count
Source
2394
67
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
67
    (void)operation;
2396
2397
67
    return false;
2398
67
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2394
21
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
21
    (void)operation;
2396
2397
21
    return false;
2398
21
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
Line
Count
Source
2394
13
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
13
    (void)operation;
2396
2397
13
    return false;
2398
13
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2394
10
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
10
    (void)operation;
2396
2397
10
    return false;
2398
10
}
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
10
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
10
    (void)operation;
2396
2397
10
    return false;
2398
10
}
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
1.52k
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2402
1.52k
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2403
1.52k
    if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; }
2404
1.52k
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2405
1.28k
    if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; }
2406
2407
1.28k
    return false;
2408
1.28k
}
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
244
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2418
244
    if (
2419
244
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2420
244
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2421
137
        if ( operation.UseRandomNonce() ) {
2422
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2423
81
            return true;
2424
81
        }
2425
137
    }
2426
2427
163
    return false;
2428
244
}
2429
2430
template <>
2431
27
bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const {
2432
27
    if (
2433
27
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2434
27
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2435
27
        if ( operation.UseRandomNonce() ) {
2436
            /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */
2437
27
            return true;
2438
27
        }
2439
27
    }
2440
2441
0
    return false;
2442
27
}
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
1.43k
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2461
1.43k
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2462
2463
1.43k
    return false;
2464
1.43k
}
2465
2466
template <>
2467
275
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2468
275
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2469
2470
275
    return false;
2471
275
}
2472
2473
template <>
2474
360
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2475
360
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2476
2477
360
    return false;
2478
360
}
2479
2480
template <>
2481
417
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2482
417
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2483
2484
413
    return false;
2485
417
}
2486
2487
template <class ResultType, class OperationType>
2488
46.9k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
46.9k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
46.9k
    const auto filtered = filter(results);
2495
2496
46.9k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
37.9k
        return;
2499
37.9k
    }
2500
2501
9.05k
    if ( dontCompare(operations[0].second) == true ) {
2502
356
        return;
2503
356
    }
2504
2505
37.8k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
29.2k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
29.2k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
29.2k
        const bool equal = *prev == *cur;
2510
2511
29.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
29.2k
    }
2528
8.69k
}
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
2.85k
void ExecutorBase<ResultType, OperationType>::compare(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.85k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
2.85k
    const auto filtered = filter(results);
2495
2496
2.85k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.77k
        return;
2499
1.77k
    }
2500
2501
1.08k
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
4.47k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
3.39k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
3.39k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
3.39k
        const bool equal = *prev == *cur;
2510
2511
3.39k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.39k
    }
2528
1.08k
}
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
1.37k
void ExecutorBase<ResultType, OperationType>::compare(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.37k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1.37k
    const auto filtered = filter(results);
2495
2496
1.37k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
959
        return;
2499
959
    }
2500
2501
417
    if ( dontCompare(operations[0].second) == true ) {
2502
4
        return;
2503
4
    }
2504
2505
1.85k
    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
413
}
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
1.07k
void ExecutorBase<ResultType, OperationType>::compare(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.07k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1.07k
    const auto filtered = filter(results);
2495
2496
1.07k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
712
        return;
2499
712
    }
2500
2501
366
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
2.46k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
2.09k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
2.09k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
2.09k
        const bool equal = *prev == *cur;
2510
2511
2.09k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
2.09k
    }
2528
366
}
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
1.19k
void ExecutorBase<ResultType, OperationType>::compare(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.19k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1.19k
    const auto filtered = filter(results);
2495
2496
1.19k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
834
        return;
2499
834
    }
2500
2501
360
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
2.16k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.80k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.80k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.80k
        const bool equal = *prev == *cur;
2510
2511
1.80k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.80k
    }
2528
360
}
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
6.13k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
6.13k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
6.13k
    const auto filtered = filter(results);
2495
2496
6.13k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
4.69k
        return;
2499
4.69k
    }
2500
2501
1.43k
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
9.09k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
7.65k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
7.65k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
7.65k
        const bool equal = *prev == *cur;
2510
2511
7.65k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
7.65k
    }
2528
1.43k
}
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
5.77k
void ExecutorBase<ResultType, OperationType>::compare(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.77k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
5.77k
    const auto filtered = filter(results);
2495
2496
5.77k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
5.50k
        return;
2499
5.50k
    }
2500
2501
275
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.59k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.32k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.32k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.32k
        const bool equal = *prev == *cur;
2510
2511
1.32k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.32k
    }
2528
275
}
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
238
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
238
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
238
    const auto filtered = filter(results);
2495
2496
238
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
189
        return;
2499
189
    }
2500
2501
49
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
366
    for (size_t i = 1; i < filtered.size(); i++) {
2506
317
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
317
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
317
        const bool equal = *prev == *cur;
2510
2511
317
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
317
    }
2528
49
}
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
3.61k
void ExecutorBase<ResultType, OperationType>::compare(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.61k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
3.61k
    const auto filtered = filter(results);
2495
2496
3.61k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2.47k
        return;
2499
2.47k
    }
2500
2501
1.13k
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
4.65k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
3.51k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
3.51k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
3.51k
        const bool equal = *prev == *cur;
2510
2511
3.51k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.51k
    }
2528
1.13k
}
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
185
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
185
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
185
    const auto filtered = filter(results);
2495
2496
185
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
185
        return;
2499
185
    }
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
102
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
102
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
102
    const auto filtered = filter(results);
2495
2496
102
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
102
        return;
2499
102
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
108
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
108
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
108
    const auto filtered = filter(results);
2495
2496
108
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
108
        return;
2499
108
    }
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
1.21k
void ExecutorBase<ResultType, OperationType>::compare(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.21k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1.21k
    const auto filtered = filter(results);
2495
2496
1.21k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
937
        return;
2499
937
    }
2500
2501
275
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.23k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
959
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
959
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
959
        const bool equal = *prev == *cur;
2510
2511
959
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
959
    }
2528
275
}
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
428
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
428
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
428
    const auto filtered = filter(results);
2495
2496
428
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
348
        return;
2499
348
    }
2500
2501
80
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
222
    for (size_t i = 1; i < filtered.size(); i++) {
2506
142
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
142
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
142
        const bool equal = *prev == *cur;
2510
2511
142
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
142
    }
2528
80
}
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
110
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
110
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
110
    const auto filtered = filter(results);
2495
2496
110
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
110
        return;
2499
110
    }
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
92
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
92
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
92
    const auto filtered = filter(results);
2495
2496
92
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
92
        return;
2499
92
    }
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
179
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
179
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
179
    const auto filtered = filter(results);
2495
2496
179
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
170
        return;
2499
170
    }
2500
2501
9
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
18
    for (size_t i = 1; i < filtered.size(); i++) {
2506
9
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
9
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
9
        const bool equal = *prev == *cur;
2510
2511
9
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
9
    }
2528
9
}
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
714
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
714
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
714
    const auto filtered = filter(results);
2495
2496
714
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
538
        return;
2499
538
    }
2500
2501
176
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.10k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
928
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
928
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
928
        const bool equal = *prev == *cur;
2510
2511
928
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
928
    }
2528
176
}
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
111
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
111
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
111
    const auto filtered = filter(results);
2495
2496
111
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
111
        return;
2499
111
    }
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
104
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
104
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
104
    const auto filtered = filter(results);
2495
2496
104
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
104
        return;
2499
104
    }
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
1.46k
void ExecutorBase<ResultType, OperationType>::compare(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.46k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1.46k
    const auto filtered = filter(results);
2495
2496
1.46k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.13k
        return;
2499
1.13k
    }
2500
2501
330
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
792
    for (size_t i = 1; i < filtered.size(); i++) {
2506
462
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
462
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
462
        const bool equal = *prev == *cur;
2510
2511
462
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
462
    }
2528
330
}
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
852
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
852
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
852
    const auto filtered = filter(results);
2495
2496
852
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
242
        return;
2499
242
    }
2500
2501
610
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.42k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
818
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
818
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
818
        const bool equal = *prev == *cur;
2510
2511
818
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
818
    }
2528
610
}
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
75
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
75
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
75
    const auto filtered = filter(results);
2495
2496
75
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
75
        return;
2499
75
    }
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
843
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
843
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
843
    const auto filtered = filter(results);
2495
2496
843
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
599
        return;
2499
599
    }
2500
2501
244
    if ( dontCompare(operations[0].second) == true ) {
2502
81
        return;
2503
81
    }
2504
2505
556
    for (size_t i = 1; i < filtered.size(); i++) {
2506
393
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
393
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
393
        const bool equal = *prev == *cur;
2510
2511
393
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
393
    }
2528
163
}
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
270
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
270
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
270
    const auto filtered = filter(results);
2495
2496
270
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
243
        return;
2499
243
    }
2500
2501
27
    if ( dontCompare(operations[0].second) == true ) {
2502
27
        return;
2503
27
    }
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
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::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
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<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
64
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
64
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
64
    const auto filtered = filter(results);
2495
2496
64
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
64
        return;
2499
64
    }
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
481
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
481
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
481
    const auto filtered = filter(results);
2495
2496
481
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
253
        return;
2499
253
    }
2500
2501
228
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
664
    for (size_t i = 1; i < filtered.size(); i++) {
2506
436
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
436
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
436
        const bool equal = *prev == *cur;
2510
2511
436
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
436
    }
2528
228
}
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
324
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
324
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
324
    const auto filtered = filter(results);
2495
2496
324
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
256
        return;
2499
256
    }
2500
2501
68
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
192
    for (size_t i = 1; i < filtered.size(); i++) {
2506
124
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
124
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
124
        const bool equal = *prev == *cur;
2510
2511
124
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
124
    }
2528
68
}
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
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
66
        return;
2499
66
    }
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
64
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
64
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
64
    const auto filtered = filter(results);
2495
2496
64
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
64
        return;
2499
64
    }
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
1.01k
void ExecutorBase<ResultType, OperationType>::compare(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.01k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1.01k
    const auto filtered = filter(results);
2495
2496
1.01k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
868
        return;
2499
868
    }
2500
2501
144
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
460
    for (size_t i = 1; i < filtered.size(); i++) {
2506
316
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
316
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
316
        const bool equal = *prev == *cur;
2510
2511
316
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
316
    }
2528
144
}
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
339
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
339
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
339
    const auto filtered = filter(results);
2495
2496
339
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
285
        return;
2499
285
    }
2500
2501
54
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
168
    for (size_t i = 1; i < filtered.size(); i++) {
2506
114
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
114
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
114
        const bool equal = *prev == *cur;
2510
2511
114
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
114
    }
2528
54
}
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
75
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
75
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
75
    const auto filtered = filter(results);
2495
2496
75
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
75
        return;
2499
75
    }
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
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
60
        return;
2499
60
    }
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
83
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
83
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
83
    const auto filtered = filter(results);
2495
2496
83
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
83
        return;
2499
83
    }
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
126
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
126
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
126
    const auto filtered = filter(results);
2495
2496
126
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
110
        return;
2499
110
    }
2500
2501
16
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
53
    for (size_t i = 1; i < filtered.size(); i++) {
2506
37
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
37
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
37
        const bool equal = *prev == *cur;
2510
2511
37
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
37
    }
2528
16
}
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
159
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
159
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
159
    const auto filtered = filter(results);
2495
2496
159
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
138
        return;
2499
138
    }
2500
2501
21
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
64
    for (size_t i = 1; i < filtered.size(); i++) {
2506
43
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
43
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
43
        const bool equal = *prev == *cur;
2510
2511
43
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
43
    }
2528
21
}
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
624
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
624
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
624
    const auto filtered = filter(results);
2495
2496
624
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
557
        return;
2499
557
    }
2500
2501
67
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
218
    for (size_t i = 1; i < filtered.size(); i++) {
2506
151
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
151
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
151
        const bool equal = *prev == *cur;
2510
2511
151
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
151
    }
2528
67
}
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
131
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
131
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
131
    const auto filtered = filter(results);
2495
2496
131
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
110
        return;
2499
110
    }
2500
2501
21
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
64
    for (size_t i = 1; i < filtered.size(); i++) {
2506
43
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
43
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
43
        const bool equal = *prev == *cur;
2510
2511
43
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
43
    }
2528
21
}
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
132
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
132
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
132
    const auto filtered = filter(results);
2495
2496
132
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
119
        return;
2499
119
    }
2500
2501
13
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
44
    for (size_t i = 1; i < filtered.size(); i++) {
2506
31
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
31
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
31
        const bool equal = *prev == *cur;
2510
2511
31
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
31
    }
2528
13
}
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
113
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
113
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
113
    const auto filtered = filter(results);
2495
2496
113
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
103
        return;
2499
103
    }
2500
2501
10
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
35
    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
10
}
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
344
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
344
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
344
    const auto filtered = filter(results);
2495
2496
344
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
334
        return;
2499
334
    }
2500
2501
10
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
29
    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
10
}
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
10.1k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
10.1k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
10.1k
    const auto filtered = filter(results);
2495
2496
10.1k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
8.58k
        return;
2499
8.58k
    }
2500
2501
1.52k
    if ( dontCompare(operations[0].second) == true ) {
2502
244
        return;
2503
244
    }
2504
2505
3.88k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
2.60k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
2.60k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
2.60k
        const bool equal = *prev == *cur;
2510
2511
2.60k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
2.60k
    }
2528
1.28k
}
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
156
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
156
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
156
    const auto filtered = filter(results);
2495
2496
156
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
156
        return;
2499
156
    }
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
477
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
477
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
477
    const auto filtered = filter(results);
2495
2496
477
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
477
        return;
2499
477
    }
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
76
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
76
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
76
    const auto filtered = filter(results);
2495
2496
76
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
76
        return;
2499
76
    }
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
97
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
97
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
97
    const auto filtered = filter(results);
2495
2496
97
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
97
        return;
2499
97
    }
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
71
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
71
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
71
    const auto filtered = filter(results);
2495
2496
71
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
71
        return;
2499
71
    }
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
71
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
71
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
71
    const auto filtered = filter(results);
2495
2496
71
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
71
        return;
2499
71
    }
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
97
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
97
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
97
    const auto filtered = filter(results);
2495
2496
97
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
97
        return;
2499
97
    }
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
81
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
81
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
81
    const auto filtered = filter(results);
2495
2496
81
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
81
        return;
2499
81
    }
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
70
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
70
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
70
    const auto filtered = filter(results);
2495
2496
70
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
70
        return;
2499
70
    }
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
75
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
75
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
75
    const auto filtered = filter(results);
2495
2496
75
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
75
        return;
2499
75
    }
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
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::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
69
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
69
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
69
    const auto filtered = filter(results);
2495
2496
69
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
69
        return;
2499
69
    }
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
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::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
72
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
72
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
72
    const auto filtered = filter(results);
2495
2496
72
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
72
        return;
2499
72
    }
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
78
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
78
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
78
    const auto filtered = filter(results);
2495
2496
78
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
78
        return;
2499
78
    }
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
70
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
70
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
70
    const auto filtered = filter(results);
2495
2496
70
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
70
        return;
2499
70
    }
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
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
66
        return;
2499
66
    }
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
76
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
76
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
76
    const auto filtered = filter(results);
2495
2496
76
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
76
        return;
2499
76
    }
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
80
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
80
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
80
    const auto filtered = filter(results);
2495
2496
80
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
80
        return;
2499
80
    }
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
72
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
72
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
72
    const auto filtered = filter(results);
2495
2496
72
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
72
        return;
2499
72
    }
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
78
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
78
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
78
    const auto filtered = filter(results);
2495
2496
78
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
78
        return;
2499
78
    }
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
72
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
72
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
72
    const auto filtered = filter(results);
2495
2496
72
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
72
        return;
2499
72
    }
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
64
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
64
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
64
    const auto filtered = filter(results);
2495
2496
64
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
64
        return;
2499
64
    }
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
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_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
98
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
98
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
98
    const auto filtered = filter(results);
2495
2496
98
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
98
        return;
2499
98
    }
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
84
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
84
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
84
    const auto filtered = filter(results);
2495
2496
84
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
84
        return;
2499
84
    }
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
144
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
144
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
144
    const auto filtered = filter(results);
2495
2496
144
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
144
        return;
2499
144
    }
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
86
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
86
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
86
    const auto filtered = filter(results);
2495
2496
86
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
86
        return;
2499
86
    }
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
156
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
156
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
156
    const auto filtered = filter(results);
2495
2496
156
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
156
        return;
2499
156
    }
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
77
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
77
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
77
    const auto filtered = filter(results);
2495
2496
77
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
77
        return;
2499
77
    }
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
123
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
123
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
123
    const auto filtered = filter(results);
2495
2496
123
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
123
        return;
2499
123
    }
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
90
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
90
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
90
    const auto filtered = filter(results);
2495
2496
90
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
90
        return;
2499
90
    }
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
127
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
127
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
127
    const auto filtered = filter(results);
2495
2496
127
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
127
        return;
2499
127
    }
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
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<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
83
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
83
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
83
    const auto filtered = filter(results);
2495
2496
83
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
83
        return;
2499
83
    }
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
456k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
456k
    (void)parentDs;
2551
456k
    return op;
2552
456k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2549
10.1k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
10.1k
    (void)parentDs;
2551
10.1k
    return op;
2552
10.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2549
7.56k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
7.56k
    (void)parentDs;
2551
7.56k
    return op;
2552
7.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2549
9.65k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
9.65k
    (void)parentDs;
2551
9.65k
    return op;
2552
9.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2549
9.06k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
9.06k
    (void)parentDs;
2551
9.06k
    return op;
2552
9.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2549
31.0k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
31.0k
    (void)parentDs;
2551
31.0k
    return op;
2552
31.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2549
24.6k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
24.6k
    (void)parentDs;
2551
24.6k
    return op;
2552
24.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2549
5.14k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.14k
    (void)parentDs;
2551
5.14k
    return op;
2552
5.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2549
13.7k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
13.7k
    (void)parentDs;
2551
13.7k
    return op;
2552
13.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2549
4.95k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.95k
    (void)parentDs;
2551
4.95k
    return op;
2552
4.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2549
4.62k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.62k
    (void)parentDs;
2551
4.62k
    return op;
2552
4.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2549
5.15k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.15k
    (void)parentDs;
2551
5.15k
    return op;
2552
5.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2549
7.06k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
7.06k
    (void)parentDs;
2551
7.06k
    return op;
2552
7.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2549
5.05k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.05k
    (void)parentDs;
2551
5.05k
    return op;
2552
5.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2549
5.85k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.85k
    (void)parentDs;
2551
5.85k
    return op;
2552
5.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) 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_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2549
3.86k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.86k
    (void)parentDs;
2551
3.86k
    return op;
2552
3.86k
}
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
6.92k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
6.92k
    (void)parentDs;
2551
6.92k
    return op;
2552
6.92k
}
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
4.90k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.90k
    (void)parentDs;
2551
4.90k
    return op;
2552
4.90k
}
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
5.33k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.33k
    (void)parentDs;
2551
5.33k
    return op;
2552
5.33k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2549
5.42k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.42k
    (void)parentDs;
2551
5.42k
    return op;
2552
5.42k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2549
4.29k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.29k
    (void)parentDs;
2551
4.29k
    return op;
2552
4.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2549
4.85k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.85k
    (void)parentDs;
2551
4.85k
    return op;
2552
4.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const
Line
Count
Source
2549
4.61k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.61k
    (void)parentDs;
2551
4.61k
    return op;
2552
4.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const
Line
Count
Source
2549
5.64k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.64k
    (void)parentDs;
2551
5.64k
    return op;
2552
5.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2549
4.51k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.51k
    (void)parentDs;
2551
4.51k
    return op;
2552
4.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const
Line
Count
Source
2549
4.07k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.07k
    (void)parentDs;
2551
4.07k
    return op;
2552
4.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2549
4.00k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.00k
    (void)parentDs;
2551
4.00k
    return op;
2552
4.00k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2549
4.73k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.73k
    (void)parentDs;
2551
4.73k
    return op;
2552
4.73k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2549
3.91k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.91k
    (void)parentDs;
2551
3.91k
    return op;
2552
3.91k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2549
5.55k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.55k
    (void)parentDs;
2551
5.55k
    return op;
2552
5.55k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2549
3.85k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.85k
    (void)parentDs;
2551
3.85k
    return op;
2552
3.85k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2549
4.48k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.48k
    (void)parentDs;
2551
4.48k
    return op;
2552
4.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2549
6.40k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
6.40k
    (void)parentDs;
2551
6.40k
    return op;
2552
6.40k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2549
5.02k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.02k
    (void)parentDs;
2551
5.02k
    return op;
2552
5.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2549
4.79k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.79k
    (void)parentDs;
2551
4.79k
    return op;
2552
4.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2549
2.89k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.89k
    (void)parentDs;
2551
2.89k
    return op;
2552
2.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2549
4.73k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.73k
    (void)parentDs;
2551
4.73k
    return op;
2552
4.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const
Line
Count
Source
2549
4.15k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.15k
    (void)parentDs;
2551
4.15k
    return op;
2552
4.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2549
3.81k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.81k
    (void)parentDs;
2551
3.81k
    return op;
2552
3.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2549
4.84k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.84k
    (void)parentDs;
2551
4.84k
    return op;
2552
4.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2549
4.97k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.97k
    (void)parentDs;
2551
4.97k
    return op;
2552
4.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2549
3.46k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.46k
    (void)parentDs;
2551
3.46k
    return op;
2552
3.46k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const
Line
Count
Source
2549
4.12k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.12k
    (void)parentDs;
2551
4.12k
    return op;
2552
4.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const
Line
Count
Source
2549
5.55k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.55k
    (void)parentDs;
2551
5.55k
    return op;
2552
5.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2549
3.21k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.21k
    (void)parentDs;
2551
3.21k
    return op;
2552
3.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) 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<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2549
3.60k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.60k
    (void)parentDs;
2551
3.60k
    return op;
2552
3.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2549
4.94k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.94k
    (void)parentDs;
2551
4.94k
    return op;
2552
4.94k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2549
5.78k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.78k
    (void)parentDs;
2551
5.78k
    return op;
2552
5.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2549
16.1k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
16.1k
    (void)parentDs;
2551
16.1k
    return op;
2552
16.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2549
3.92k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.92k
    (void)parentDs;
2551
3.92k
    return op;
2552
3.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2549
3.99k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.99k
    (void)parentDs;
2551
3.99k
    return op;
2552
3.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2549
2.73k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.73k
    (void)parentDs;
2551
2.73k
    return op;
2552
2.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2549
2.85k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.85k
    (void)parentDs;
2551
2.85k
    return op;
2552
2.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2549
5.18k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.18k
    (void)parentDs;
2551
5.18k
    return op;
2552
5.18k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2549
4.37k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.37k
    (void)parentDs;
2551
4.37k
    return op;
2552
4.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2549
4.10k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.10k
    (void)parentDs;
2551
4.10k
    return op;
2552
4.10k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2549
3.68k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.68k
    (void)parentDs;
2551
3.68k
    return op;
2552
3.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2549
3.77k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.77k
    (void)parentDs;
2551
3.77k
    return op;
2552
3.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2549
3.68k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.68k
    (void)parentDs;
2551
3.68k
    return op;
2552
3.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2549
4.19k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.19k
    (void)parentDs;
2551
4.19k
    return op;
2552
4.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2549
3.70k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.70k
    (void)parentDs;
2551
3.70k
    return op;
2552
3.70k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2549
3.81k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.81k
    (void)parentDs;
2551
3.81k
    return op;
2552
3.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2549
4.16k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.16k
    (void)parentDs;
2551
4.16k
    return op;
2552
4.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2549
5.17k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.17k
    (void)parentDs;
2551
5.17k
    return op;
2552
5.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2549
4.80k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.80k
    (void)parentDs;
2551
4.80k
    return op;
2552
4.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2549
4.27k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.27k
    (void)parentDs;
2551
4.27k
    return op;
2552
4.27k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) 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<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2549
3.76k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.76k
    (void)parentDs;
2551
3.76k
    return op;
2552
3.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const
Line
Count
Source
2549
4.24k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.24k
    (void)parentDs;
2551
4.24k
    return op;
2552
4.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
Line
Count
Source
2549
3.18k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.18k
    (void)parentDs;
2551
3.18k
    return op;
2552
3.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2549
3.28k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.28k
    (void)parentDs;
2551
3.28k
    return op;
2552
3.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const
Line
Count
Source
2549
3.52k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.52k
    (void)parentDs;
2551
3.52k
    return op;
2552
3.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2549
3.40k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.40k
    (void)parentDs;
2551
3.40k
    return op;
2552
3.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2549
3.56k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.56k
    (void)parentDs;
2551
3.56k
    return op;
2552
3.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2549
4.14k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.14k
    (void)parentDs;
2551
4.14k
    return op;
2552
4.14k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2549
4.26k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.26k
    (void)parentDs;
2551
4.26k
    return op;
2552
4.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2549
3.61k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.61k
    (void)parentDs;
2551
3.61k
    return op;
2552
3.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) 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::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2549
3.91k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.91k
    (void)parentDs;
2551
3.91k
    return op;
2552
3.91k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2549
4.12k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.12k
    (void)parentDs;
2551
4.12k
    return op;
2552
4.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2549
3.70k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.70k
    (void)parentDs;
2551
3.70k
    return op;
2552
3.70k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const
Line
Count
Source
2549
4.81k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.81k
    (void)parentDs;
2551
4.81k
    return op;
2552
4.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) 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::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2549
3.53k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.53k
    (void)parentDs;
2551
3.53k
    return op;
2552
3.53k
}
2553
2554
631
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2555
631
    (void)parentDs;
2556
631
    op.modulo = modulo;
2557
631
    return op;
2558
631
}
2559
2560
583
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2561
583
    (void)parentDs;
2562
583
    op.modulo = modulo;
2563
583
    return op;
2564
583
}
2565
2566
522
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2567
522
    (void)parentDs;
2568
522
    op.modulo = modulo;
2569
522
    return op;
2570
522
}
2571
2572
574
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2573
574
    (void)parentDs;
2574
574
    op.modulo = modulo;
2575
574
    return op;
2576
574
}
2577
2578
475
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2579
475
    (void)parentDs;
2580
475
    op.modulo = modulo;
2581
475
    return op;
2582
475
}
2583
2584
538
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2585
538
    (void)parentDs;
2586
538
    op.modulo = modulo;
2587
538
    return op;
2588
538
}
2589
2590
524
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2591
524
    (void)parentDs;
2592
524
    op.modulo = modulo;
2593
524
    return op;
2594
524
}
2595
2596
478
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2597
478
    (void)parentDs;
2598
478
    op.modulo = modulo;
2599
478
    return op;
2600
478
}
2601
2602
788
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2603
788
    (void)parentDs;
2604
788
    op.modulo = modulo;
2605
788
    return op;
2606
788
}
2607
2608
830
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2609
830
    (void)parentDs;
2610
830
    op.modulo = modulo;
2611
830
    return op;
2612
830
}
2613
2614
732
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2615
732
    (void)parentDs;
2616
732
    op.modulo = modulo;
2617
732
    return op;
2618
732
}
2619
2620
750
operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2621
750
    (void)parentDs;
2622
750
    op.modulo = modulo;
2623
750
    return op;
2624
750
}
2625
2626
850
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2627
850
    (void)parentDs;
2628
850
    op.modulo = modulo;
2629
850
    return op;
2630
850
}
2631
2632
476
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2633
476
    (void)parentDs;
2634
476
    op.modulo = modulo;
2635
476
    return op;
2636
476
}
2637
2638
1.01k
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2639
1.01k
    (void)parentDs;
2640
1.01k
    op.modulo = modulo;
2641
1.01k
    return op;
2642
1.01k
}
2643
2644
522
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2645
522
    (void)parentDs;
2646
522
    op.modulo = modulo;
2647
522
    return op;
2648
522
}
2649
2650
606
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2651
606
    (void)parentDs;
2652
606
    op.modulo = modulo;
2653
606
    return op;
2654
606
}
2655
2656
640
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2657
640
    (void)parentDs;
2658
640
    op.modulo = modulo;
2659
640
    return op;
2660
640
}
2661
2662
1.19k
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2663
1.19k
    (void)parentDs;
2664
1.19k
    op.modulo = modulo;
2665
1.19k
    return op;
2666
1.19k
}
2667
2668
622
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2669
622
    (void)parentDs;
2670
622
    op.modulo = modulo;
2671
622
    return op;
2672
622
}
2673
2674
735
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2675
735
    (void)parentDs;
2676
735
    op.modulo = modulo;
2677
735
    return op;
2678
735
}
2679
2680
661
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2681
661
    (void)parentDs;
2682
661
    op.modulo = modulo;
2683
661
    return op;
2684
661
}
2685
2686
template <class ResultType, class OperationType>
2687
474k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
474k
    Datasource ds(data, size);
2689
474k
    if ( parentDs != nullptr ) {
2690
474k
        auto modifier = parentDs->GetData(0);
2691
474k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
474k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
474k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
10.1k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
10.1k
    Datasource ds(data, size);
2689
10.1k
    if ( parentDs != nullptr ) {
2690
10.1k
        auto modifier = parentDs->GetData(0);
2691
10.1k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
10.1k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
10.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
7.60k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
7.60k
    Datasource ds(data, size);
2689
7.60k
    if ( parentDs != nullptr ) {
2690
7.60k
        auto modifier = parentDs->GetData(0);
2691
7.60k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
7.60k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
7.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
9.69k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
9.69k
    Datasource ds(data, size);
2689
9.69k
    if ( parentDs != nullptr ) {
2690
9.69k
        auto modifier = parentDs->GetData(0);
2691
9.69k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
9.69k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
9.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
9.10k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
9.10k
    Datasource ds(data, size);
2689
9.10k
    if ( parentDs != nullptr ) {
2690
9.10k
        auto modifier = parentDs->GetData(0);
2691
9.10k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
9.10k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
9.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
31.1k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
31.1k
    Datasource ds(data, size);
2689
31.1k
    if ( parentDs != nullptr ) {
2690
31.1k
        auto modifier = parentDs->GetData(0);
2691
31.1k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
31.1k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
31.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
24.7k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
24.7k
    Datasource ds(data, size);
2689
24.7k
    if ( parentDs != nullptr ) {
2690
24.7k
        auto modifier = parentDs->GetData(0);
2691
24.7k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
24.7k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
24.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.19k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.19k
    Datasource ds(data, size);
2689
5.19k
    if ( parentDs != nullptr ) {
2690
5.19k
        auto modifier = parentDs->GetData(0);
2691
5.19k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.19k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
13.7k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
13.7k
    Datasource ds(data, size);
2689
13.7k
    if ( parentDs != nullptr ) {
2690
13.7k
        auto modifier = parentDs->GetData(0);
2691
13.7k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
13.7k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
13.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.99k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.99k
    Datasource ds(data, size);
2689
4.99k
    if ( parentDs != nullptr ) {
2690
4.99k
        auto modifier = parentDs->GetData(0);
2691
4.99k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.99k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.67k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.67k
    Datasource ds(data, size);
2689
4.67k
    if ( parentDs != nullptr ) {
2690
4.67k
        auto modifier = parentDs->GetData(0);
2691
4.67k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.67k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.20k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.20k
    Datasource ds(data, size);
2689
5.20k
    if ( parentDs != nullptr ) {
2690
5.20k
        auto modifier = parentDs->GetData(0);
2691
5.20k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.20k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.20k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
7.10k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
7.10k
    Datasource ds(data, size);
2689
7.10k
    if ( parentDs != nullptr ) {
2690
7.10k
        auto modifier = parentDs->GetData(0);
2691
7.10k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
7.10k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
7.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.10k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.10k
    Datasource ds(data, size);
2689
5.10k
    if ( parentDs != nullptr ) {
2690
5.10k
        auto modifier = parentDs->GetData(0);
2691
5.10k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.10k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.90k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.90k
    Datasource ds(data, size);
2689
5.90k
    if ( parentDs != nullptr ) {
2690
5.90k
        auto modifier = parentDs->GetData(0);
2691
5.90k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.90k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.90k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.61k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.61k
    Datasource ds(data, size);
2689
3.61k
    if ( parentDs != nullptr ) {
2690
3.61k
        auto modifier = parentDs->GetData(0);
2691
3.61k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.61k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.89k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.89k
    Datasource ds(data, size);
2689
3.89k
    if ( parentDs != nullptr ) {
2690
3.89k
        auto modifier = parentDs->GetData(0);
2691
3.89k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.89k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
6.97k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
6.97k
    Datasource ds(data, size);
2689
6.97k
    if ( parentDs != nullptr ) {
2690
6.97k
        auto modifier = parentDs->GetData(0);
2691
6.97k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
6.97k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
6.97k
}
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
4.96k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.96k
    Datasource ds(data, size);
2689
4.96k
    if ( parentDs != nullptr ) {
2690
4.96k
        auto modifier = parentDs->GetData(0);
2691
4.96k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.96k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.96k
}
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
5.37k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.37k
    Datasource ds(data, size);
2689
5.37k
    if ( parentDs != nullptr ) {
2690
5.37k
        auto modifier = parentDs->GetData(0);
2691
5.37k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.37k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.45k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.45k
    Datasource ds(data, size);
2689
5.45k
    if ( parentDs != nullptr ) {
2690
5.45k
        auto modifier = parentDs->GetData(0);
2691
5.45k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.45k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.45k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.32k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.32k
    Datasource ds(data, size);
2689
4.32k
    if ( parentDs != nullptr ) {
2690
4.32k
        auto modifier = parentDs->GetData(0);
2691
4.32k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.32k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.88k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.88k
    Datasource ds(data, size);
2689
4.88k
    if ( parentDs != nullptr ) {
2690
4.88k
        auto modifier = parentDs->GetData(0);
2691
4.88k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.88k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.64k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.64k
    Datasource ds(data, size);
2689
4.64k
    if ( parentDs != nullptr ) {
2690
4.64k
        auto modifier = parentDs->GetData(0);
2691
4.64k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.64k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.68k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.68k
    Datasource ds(data, size);
2689
5.68k
    if ( parentDs != nullptr ) {
2690
5.68k
        auto modifier = parentDs->GetData(0);
2691
5.68k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.68k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.55k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.55k
    Datasource ds(data, size);
2689
4.55k
    if ( parentDs != nullptr ) {
2690
4.55k
        auto modifier = parentDs->GetData(0);
2691
4.55k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.55k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.11k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.11k
    Datasource ds(data, size);
2689
4.11k
    if ( parentDs != nullptr ) {
2690
4.11k
        auto modifier = parentDs->GetData(0);
2691
4.11k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.11k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.04k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.04k
    Datasource ds(data, size);
2689
4.04k
    if ( parentDs != nullptr ) {
2690
4.04k
        auto modifier = parentDs->GetData(0);
2691
4.04k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.04k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.04k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.77k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.77k
    Datasource ds(data, size);
2689
4.77k
    if ( parentDs != nullptr ) {
2690
4.77k
        auto modifier = parentDs->GetData(0);
2691
4.77k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.77k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.77k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.95k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.95k
    Datasource ds(data, size);
2689
3.95k
    if ( parentDs != nullptr ) {
2690
3.95k
        auto modifier = parentDs->GetData(0);
2691
3.95k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.95k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.95k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.59k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.59k
    Datasource ds(data, size);
2689
5.59k
    if ( parentDs != nullptr ) {
2690
5.59k
        auto modifier = parentDs->GetData(0);
2691
5.59k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.59k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.59k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.88k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.88k
    Datasource ds(data, size);
2689
3.88k
    if ( parentDs != nullptr ) {
2690
3.88k
        auto modifier = parentDs->GetData(0);
2691
3.88k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.88k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.88k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.51k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.51k
    Datasource ds(data, size);
2689
4.51k
    if ( parentDs != nullptr ) {
2690
4.51k
        auto modifier = parentDs->GetData(0);
2691
4.51k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.51k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
6.44k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
6.44k
    Datasource ds(data, size);
2689
6.44k
    if ( parentDs != nullptr ) {
2690
6.44k
        auto modifier = parentDs->GetData(0);
2691
6.44k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
6.44k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
6.44k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.07k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.07k
    Datasource ds(data, size);
2689
5.07k
    if ( parentDs != nullptr ) {
2690
5.07k
        auto modifier = parentDs->GetData(0);
2691
5.07k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.07k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.84k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.84k
    Datasource ds(data, size);
2689
4.84k
    if ( parentDs != nullptr ) {
2690
4.84k
        auto modifier = parentDs->GetData(0);
2691
4.84k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.84k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.92k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.92k
    Datasource ds(data, size);
2689
2.92k
    if ( parentDs != nullptr ) {
2690
2.92k
        auto modifier = parentDs->GetData(0);
2691
2.92k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.92k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.79k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.79k
    Datasource ds(data, size);
2689
4.79k
    if ( parentDs != nullptr ) {
2690
4.79k
        auto modifier = parentDs->GetData(0);
2691
4.79k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.79k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.19k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.19k
    Datasource ds(data, size);
2689
4.19k
    if ( parentDs != nullptr ) {
2690
4.19k
        auto modifier = parentDs->GetData(0);
2691
4.19k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.19k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.85k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.85k
    Datasource ds(data, size);
2689
3.85k
    if ( parentDs != nullptr ) {
2690
3.85k
        auto modifier = parentDs->GetData(0);
2691
3.85k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.85k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.89k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.89k
    Datasource ds(data, size);
2689
4.89k
    if ( parentDs != nullptr ) {
2690
4.89k
        auto modifier = parentDs->GetData(0);
2691
4.89k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.89k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.01k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.01k
    Datasource ds(data, size);
2689
5.01k
    if ( parentDs != nullptr ) {
2690
5.01k
        auto modifier = parentDs->GetData(0);
2691
5.01k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.01k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.50k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.50k
    Datasource ds(data, size);
2689
3.50k
    if ( parentDs != nullptr ) {
2690
3.50k
        auto modifier = parentDs->GetData(0);
2691
3.50k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.50k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.16k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.16k
    Datasource ds(data, size);
2689
4.16k
    if ( parentDs != nullptr ) {
2690
4.16k
        auto modifier = parentDs->GetData(0);
2691
4.16k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.16k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.60k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.60k
    Datasource ds(data, size);
2689
5.60k
    if ( parentDs != nullptr ) {
2690
5.60k
        auto modifier = parentDs->GetData(0);
2691
5.60k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.60k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.24k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.24k
    Datasource ds(data, size);
2689
3.24k
    if ( parentDs != nullptr ) {
2690
3.24k
        auto modifier = parentDs->GetData(0);
2691
3.24k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.24k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::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::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.63k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.63k
    Datasource ds(data, size);
2689
3.63k
    if ( parentDs != nullptr ) {
2690
3.63k
        auto modifier = parentDs->GetData(0);
2691
3.63k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.63k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.63k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.97k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.97k
    Datasource ds(data, size);
2689
4.97k
    if ( parentDs != nullptr ) {
2690
4.97k
        auto modifier = parentDs->GetData(0);
2691
4.97k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.97k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.82k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.82k
    Datasource ds(data, size);
2689
5.82k
    if ( parentDs != nullptr ) {
2690
5.82k
        auto modifier = parentDs->GetData(0);
2691
5.82k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.82k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
31.0k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
31.0k
    Datasource ds(data, size);
2689
31.0k
    if ( parentDs != nullptr ) {
2690
31.0k
        auto modifier = parentDs->GetData(0);
2691
31.0k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
31.0k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
31.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.96k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.96k
    Datasource ds(data, size);
2689
3.96k
    if ( parentDs != nullptr ) {
2690
3.96k
        auto modifier = parentDs->GetData(0);
2691
3.96k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.96k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.08k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.08k
    Datasource ds(data, size);
2689
4.08k
    if ( parentDs != nullptr ) {
2690
4.08k
        auto modifier = parentDs->GetData(0);
2691
4.08k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.08k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.76k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.76k
    Datasource ds(data, size);
2689
2.76k
    if ( parentDs != nullptr ) {
2690
2.76k
        auto modifier = parentDs->GetData(0);
2691
2.76k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.76k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.88k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.88k
    Datasource ds(data, size);
2689
2.88k
    if ( parentDs != nullptr ) {
2690
2.88k
        auto modifier = parentDs->GetData(0);
2691
2.88k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.88k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.22k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.22k
    Datasource ds(data, size);
2689
5.22k
    if ( parentDs != nullptr ) {
2690
5.22k
        auto modifier = parentDs->GetData(0);
2691
5.22k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.22k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.22k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.42k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.42k
    Datasource ds(data, size);
2689
4.42k
    if ( parentDs != nullptr ) {
2690
4.42k
        auto modifier = parentDs->GetData(0);
2691
4.42k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.42k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.20k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.20k
    Datasource ds(data, size);
2689
4.20k
    if ( parentDs != nullptr ) {
2690
4.20k
        auto modifier = parentDs->GetData(0);
2691
4.20k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.20k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.20k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.84k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.84k
    Datasource ds(data, size);
2689
3.84k
    if ( parentDs != nullptr ) {
2690
3.84k
        auto modifier = parentDs->GetData(0);
2691
3.84k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.84k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.90k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.90k
    Datasource ds(data, size);
2689
3.90k
    if ( parentDs != nullptr ) {
2690
3.90k
        auto modifier = parentDs->GetData(0);
2691
3.90k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.90k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.90k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.73k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.73k
    Datasource ds(data, size);
2689
3.73k
    if ( parentDs != nullptr ) {
2690
3.73k
        auto modifier = parentDs->GetData(0);
2691
3.73k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.73k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::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::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.73k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.73k
    Datasource ds(data, size);
2689
3.73k
    if ( parentDs != nullptr ) {
2690
3.73k
        auto modifier = parentDs->GetData(0);
2691
3.73k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.73k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.87k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.87k
    Datasource ds(data, size);
2689
3.87k
    if ( parentDs != nullptr ) {
2690
3.87k
        auto modifier = parentDs->GetData(0);
2691
3.87k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.87k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.19k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.19k
    Datasource ds(data, size);
2689
4.19k
    if ( parentDs != nullptr ) {
2690
4.19k
        auto modifier = parentDs->GetData(0);
2691
4.19k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.19k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.22k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.22k
    Datasource ds(data, size);
2689
5.22k
    if ( parentDs != nullptr ) {
2690
5.22k
        auto modifier = parentDs->GetData(0);
2691
5.22k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.22k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.84k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.84k
    Datasource ds(data, size);
2689
4.84k
    if ( parentDs != nullptr ) {
2690
4.84k
        auto modifier = parentDs->GetData(0);
2691
4.84k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.84k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.31k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.31k
    Datasource ds(data, size);
2689
4.31k
    if ( parentDs != nullptr ) {
2690
4.31k
        auto modifier = parentDs->GetData(0);
2691
4.31k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.31k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.31k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.20k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.20k
    Datasource ds(data, size);
2689
3.20k
    if ( parentDs != nullptr ) {
2690
3.20k
        auto modifier = parentDs->GetData(0);
2691
3.20k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.20k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.20k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.80k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.80k
    Datasource ds(data, size);
2689
3.80k
    if ( parentDs != nullptr ) {
2690
3.80k
        auto modifier = parentDs->GetData(0);
2691
3.80k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.80k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.30k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.30k
    Datasource ds(data, size);
2689
4.30k
    if ( parentDs != nullptr ) {
2690
4.30k
        auto modifier = parentDs->GetData(0);
2691
4.30k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.30k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.22k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.22k
    Datasource ds(data, size);
2689
3.22k
    if ( parentDs != nullptr ) {
2690
3.22k
        auto modifier = parentDs->GetData(0);
2691
3.22k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.22k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.31k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.31k
    Datasource ds(data, size);
2689
3.31k
    if ( parentDs != nullptr ) {
2690
3.31k
        auto modifier = parentDs->GetData(0);
2691
3.31k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.31k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.55k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.55k
    Datasource ds(data, size);
2689
3.55k
    if ( parentDs != nullptr ) {
2690
3.55k
        auto modifier = parentDs->GetData(0);
2691
3.55k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.55k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.44k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.44k
    Datasource ds(data, size);
2689
3.44k
    if ( parentDs != nullptr ) {
2690
3.44k
        auto modifier = parentDs->GetData(0);
2691
3.44k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.44k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.60k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.60k
    Datasource ds(data, size);
2689
3.60k
    if ( parentDs != nullptr ) {
2690
3.60k
        auto modifier = parentDs->GetData(0);
2691
3.60k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.60k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.17k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.17k
    Datasource ds(data, size);
2689
4.17k
    if ( parentDs != nullptr ) {
2690
4.17k
        auto modifier = parentDs->GetData(0);
2691
4.17k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.17k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.17k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.30k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.30k
    Datasource ds(data, size);
2689
4.30k
    if ( parentDs != nullptr ) {
2690
4.30k
        auto modifier = parentDs->GetData(0);
2691
4.30k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.30k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.64k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.64k
    Datasource ds(data, size);
2689
3.64k
    if ( parentDs != nullptr ) {
2690
3.64k
        auto modifier = parentDs->GetData(0);
2691
3.64k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.64k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.67k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.67k
    Datasource ds(data, size);
2689
4.67k
    if ( parentDs != nullptr ) {
2690
4.67k
        auto modifier = parentDs->GetData(0);
2691
4.67k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.67k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.95k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.95k
    Datasource ds(data, size);
2689
3.95k
    if ( parentDs != nullptr ) {
2690
3.95k
        auto modifier = parentDs->GetData(0);
2691
3.95k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.95k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.95k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.17k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.17k
    Datasource ds(data, size);
2689
4.17k
    if ( parentDs != nullptr ) {
2690
4.17k
        auto modifier = parentDs->GetData(0);
2691
4.17k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.17k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.74k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.74k
    Datasource ds(data, size);
2689
3.74k
    if ( parentDs != nullptr ) {
2690
3.74k
        auto modifier = parentDs->GetData(0);
2691
3.74k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.74k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.96k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.96k
    Datasource ds(data, size);
2689
4.96k
    if ( parentDs != nullptr ) {
2690
4.96k
        auto modifier = parentDs->GetData(0);
2691
4.96k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.96k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.01k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.01k
    Datasource ds(data, size);
2689
3.01k
    if ( parentDs != nullptr ) {
2690
3.01k
        auto modifier = parentDs->GetData(0);
2691
3.01k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.01k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.01k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.57k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.57k
    Datasource ds(data, size);
2689
3.57k
    if ( parentDs != nullptr ) {
2690
3.57k
        auto modifier = parentDs->GetData(0);
2691
3.57k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.57k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.57k
}
2696
2697
template <class ResultType, class OperationType>
2698
470k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
470k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
470k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
470k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
470k
    if ( modules.find(moduleID) == modules.end() ) {
2712
340k
        return nullptr;
2713
340k
    }
2714
2715
130k
    return modules.at(moduleID);
2716
470k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
10.1k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
10.1k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
10.1k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
10.1k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
10.1k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.91k
        return nullptr;
2713
3.91k
    }
2714
2715
6.22k
    return modules.at(moduleID);
2716
10.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
7.56k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
7.56k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
7.56k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
7.56k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
7.56k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.10k
        return nullptr;
2713
4.10k
    }
2714
2715
3.45k
    return modules.at(moduleID);
2716
7.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
9.65k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
9.65k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
9.65k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
9.65k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
9.65k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.44k
        return nullptr;
2713
4.44k
    }
2714
2715
5.21k
    return modules.at(moduleID);
2716
9.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
9.06k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
9.06k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
9.06k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
9.06k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
9.06k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.57k
        return nullptr;
2713
4.57k
    }
2714
2715
4.49k
    return modules.at(moduleID);
2716
9.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
31.0k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
31.0k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
31.0k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
31.0k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
31.0k
    if ( modules.find(moduleID) == modules.end() ) {
2712
9.87k
        return nullptr;
2713
9.87k
    }
2714
2715
21.1k
    return modules.at(moduleID);
2716
31.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
24.6k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
24.6k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
24.6k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
24.6k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
24.6k
    if ( modules.find(moduleID) == modules.end() ) {
2712
8.24k
        return nullptr;
2713
8.24k
    }
2714
2715
16.4k
    return modules.at(moduleID);
2716
24.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.14k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.14k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.14k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.14k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.14k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.67k
        return nullptr;
2713
3.67k
    }
2714
2715
1.46k
    return modules.at(moduleID);
2716
5.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
13.7k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
13.7k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
13.7k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
13.7k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
13.7k
    if ( modules.find(moduleID) == modules.end() ) {
2712
5.28k
        return nullptr;
2713
5.28k
    }
2714
2715
8.44k
    return modules.at(moduleID);
2716
13.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.95k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.95k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.95k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.95k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.95k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.71k
        return nullptr;
2713
3.71k
    }
2714
2715
1.24k
    return modules.at(moduleID);
2716
4.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.62k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.62k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.62k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.62k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.62k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.56k
        return nullptr;
2713
3.56k
    }
2714
2715
1.06k
    return modules.at(moduleID);
2716
4.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.15k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.15k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.15k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.15k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.15k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.23k
        return nullptr;
2713
4.23k
    }
2714
2715
927
    return modules.at(moduleID);
2716
5.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
7.06k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
7.06k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
7.06k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
7.06k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
7.06k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.94k
        return nullptr;
2713
3.94k
    }
2714
2715
3.12k
    return modules.at(moduleID);
2716
7.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.05k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.05k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.05k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.05k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.05k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.30k
        return nullptr;
2713
4.30k
    }
2714
2715
755
    return modules.at(moduleID);
2716
5.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.85k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.85k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.85k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.85k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.85k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.88k
        return nullptr;
2713
4.88k
    }
2714
2715
967
    return modules.at(moduleID);
2716
5.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::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.56k
        return nullptr;
2713
2.56k
    }
2714
2715
1.01k
    return modules.at(moduleID);
2716
3.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.86k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.86k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.86k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.86k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.86k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.60k
        return nullptr;
2713
3.60k
    }
2714
2715
260
    return modules.at(moduleID);
2716
3.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
6.92k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
6.92k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
6.92k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
6.92k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
6.92k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.99k
        return nullptr;
2713
3.99k
    }
2714
2715
2.92k
    return modules.at(moduleID);
2716
6.92k
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.90k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.90k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.90k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.90k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.90k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.95k
        return nullptr;
2713
3.95k
    }
2714
2715
951
    return modules.at(moduleID);
2716
4.90k
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.33k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.33k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.33k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.33k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.33k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.35k
        return nullptr;
2713
4.35k
    }
2714
2715
976
    return modules.at(moduleID);
2716
5.33k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.42k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.42k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.42k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.42k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.42k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.19k
        return nullptr;
2713
3.19k
    }
2714
2715
2.22k
    return modules.at(moduleID);
2716
5.42k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.29k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.29k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.29k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.29k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.29k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.94k
        return nullptr;
2713
2.94k
    }
2714
2715
1.34k
    return modules.at(moduleID);
2716
4.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.85k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.85k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.85k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.85k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.85k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.88k
        return nullptr;
2713
2.88k
    }
2714
2715
1.97k
    return modules.at(moduleID);
2716
4.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.61k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.61k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.61k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.61k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.61k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.29k
        return nullptr;
2713
4.29k
    }
2714
2715
316
    return modules.at(moduleID);
2716
4.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.64k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.64k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.64k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.64k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.64k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.81k
        return nullptr;
2713
3.81k
    }
2714
2715
1.83k
    return modules.at(moduleID);
2716
5.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.51k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.51k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.51k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.51k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.51k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.86k
        return nullptr;
2713
3.86k
    }
2714
2715
644
    return modules.at(moduleID);
2716
4.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.07k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.07k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.07k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.07k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.07k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.74k
        return nullptr;
2713
3.74k
    }
2714
2715
335
    return modules.at(moduleID);
2716
4.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.00k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.00k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.00k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.00k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.00k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.71k
        return nullptr;
2713
3.71k
    }
2714
2715
287
    return modules.at(moduleID);
2716
4.00k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.73k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.73k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.73k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.73k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.73k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.45k
        return nullptr;
2713
4.45k
    }
2714
2715
279
    return modules.at(moduleID);
2716
4.73k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.91k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.91k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.91k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.91k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.91k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.80k
        return nullptr;
2713
2.80k
    }
2714
2715
1.11k
    return modules.at(moduleID);
2716
3.91k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.55k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.55k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.55k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.55k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.55k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.87k
        return nullptr;
2713
4.87k
    }
2714
2715
678
    return modules.at(moduleID);
2716
5.55k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.85k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.85k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.85k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.85k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.85k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.54k
        return nullptr;
2713
3.54k
    }
2714
2715
309
    return modules.at(moduleID);
2716
3.85k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.48k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.48k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.48k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.48k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.48k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.21k
        return nullptr;
2713
4.21k
    }
2714
2715
270
    return modules.at(moduleID);
2716
4.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
6.40k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
6.40k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
6.40k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
6.40k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
6.40k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.70k
        return nullptr;
2713
4.70k
    }
2714
2715
1.70k
    return modules.at(moduleID);
2716
6.40k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.02k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.02k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.02k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.02k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.02k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.10k
        return nullptr;
2713
4.10k
    }
2714
2715
915
    return modules.at(moduleID);
2716
5.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.79k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.79k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.79k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.79k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.79k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.43k
        return nullptr;
2713
4.43k
    }
2714
2715
357
    return modules.at(moduleID);
2716
4.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.89k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.89k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.89k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.89k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.89k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.59k
        return nullptr;
2713
2.59k
    }
2714
2715
293
    return modules.at(moduleID);
2716
2.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.73k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.73k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.73k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.73k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.73k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.38k
        return nullptr;
2713
4.38k
    }
2714
2715
349
    return modules.at(moduleID);
2716
4.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.15k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.15k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.15k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.15k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.15k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.80k
        return nullptr;
2713
3.80k
    }
2714
2715
352
    return modules.at(moduleID);
2716
4.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.81k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.81k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.81k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.81k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.81k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.54k
        return nullptr;
2713
3.54k
    }
2714
2715
271
    return modules.at(moduleID);
2716
3.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.84k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.84k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.84k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.84k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.84k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.47k
        return nullptr;
2713
4.47k
    }
2714
2715
367
    return modules.at(moduleID);
2716
4.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.97k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.97k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.97k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.97k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.97k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.61k
        return nullptr;
2713
4.61k
    }
2714
2715
355
    return modules.at(moduleID);
2716
4.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.46k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.46k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.46k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.46k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.46k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.98k
        return nullptr;
2713
2.98k
    }
2714
2715
478
    return modules.at(moduleID);
2716
3.46k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.12k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.12k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.12k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.12k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.12k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.58k
        return nullptr;
2713
3.58k
    }
2714
2715
538
    return modules.at(moduleID);
2716
4.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.55k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.55k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.55k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.55k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.55k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.14k
        return nullptr;
2713
4.14k
    }
2714
2715
1.41k
    return modules.at(moduleID);
2716
5.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.21k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.21k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.21k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.21k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.21k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.77k
        return nullptr;
2713
2.77k
    }
2714
2715
431
    return modules.at(moduleID);
2716
3.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::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.55k
        return nullptr;
2713
2.55k
    }
2714
2715
446
    return modules.at(moduleID);
2716
3.00k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.60k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.60k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.60k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.60k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.60k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.17k
        return nullptr;
2713
3.17k
    }
2714
2715
430
    return modules.at(moduleID);
2716
3.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.94k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.94k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.94k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.94k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.94k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.59k
        return nullptr;
2713
4.59k
    }
2714
2715
341
    return modules.at(moduleID);
2716
4.94k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.78k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.78k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.78k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.78k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.78k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.91k
        return nullptr;
2713
4.91k
    }
2714
2715
875
    return modules.at(moduleID);
2716
5.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
30.9k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
30.9k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
30.9k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
30.9k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
30.9k
    if ( modules.find(moduleID) == modules.end() ) {
2712
15.6k
        return nullptr;
2713
15.6k
    }
2714
2715
15.2k
    return modules.at(moduleID);
2716
30.9k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.92k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.92k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.92k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.92k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.92k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.52k
        return nullptr;
2713
3.52k
    }
2714
2715
402
    return modules.at(moduleID);
2716
3.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.99k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.99k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.99k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.99k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.99k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.92k
        return nullptr;
2713
2.92k
    }
2714
2715
1.07k
    return modules.at(moduleID);
2716
3.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.73k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.73k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.73k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.73k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.73k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.41k
        return nullptr;
2713
2.41k
    }
2714
2715
317
    return modules.at(moduleID);
2716
2.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.85k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.85k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.85k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.85k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.85k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.53k
        return nullptr;
2713
2.53k
    }
2714
2715
315
    return modules.at(moduleID);
2716
2.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.18k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.18k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.18k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.18k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.18k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.85k
        return nullptr;
2713
4.85k
    }
2714
2715
330
    return modules.at(moduleID);
2716
5.18k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.37k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.37k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.37k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.37k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.37k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.05k
        return nullptr;
2713
4.05k
    }
2714
2715
320
    return modules.at(moduleID);
2716
4.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.10k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.10k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.10k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.10k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.10k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.67k
        return nullptr;
2713
3.67k
    }
2714
2715
429
    return modules.at(moduleID);
2716
4.10k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.68k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.68k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.68k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.68k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.68k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.29k
        return nullptr;
2713
3.29k
    }
2714
2715
390
    return modules.at(moduleID);
2716
3.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.77k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.77k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.77k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.77k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.77k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.40k
        return nullptr;
2713
3.40k
    }
2714
2715
364
    return modules.at(moduleID);
2716
3.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.68k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.68k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.68k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.68k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.68k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.33k
        return nullptr;
2713
3.33k
    }
2714
2715
346
    return modules.at(moduleID);
2716
3.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.19k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.19k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.19k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.19k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.19k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.87k
        return nullptr;
2713
3.87k
    }
2714
2715
321
    return modules.at(moduleID);
2716
4.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.70k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.70k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.70k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.70k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.70k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.37k
        return nullptr;
2713
3.37k
    }
2714
2715
329
    return modules.at(moduleID);
2716
3.70k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.81k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.81k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.81k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.81k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.81k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.43k
        return nullptr;
2713
3.43k
    }
2714
2715
386
    return modules.at(moduleID);
2716
3.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.16k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.16k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.16k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.16k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.16k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.83k
        return nullptr;
2713
3.83k
    }
2714
2715
331
    return modules.at(moduleID);
2716
4.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.17k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.17k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.17k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.17k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.17k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.85k
        return nullptr;
2713
4.85k
    }
2714
2715
326
    return modules.at(moduleID);
2716
5.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.80k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.80k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.80k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.80k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.80k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.48k
        return nullptr;
2713
4.48k
    }
2714
2715
322
    return modules.at(moduleID);
2716
4.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.27k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.27k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.27k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.27k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.27k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.94k
        return nullptr;
2713
3.94k
    }
2714
2715
333
    return modules.at(moduleID);
2716
4.27k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::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.83k
        return nullptr;
2713
2.83k
    }
2714
2715
327
    return modules.at(moduleID);
2716
3.16k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.76k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.76k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.76k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.76k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.76k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.40k
        return nullptr;
2713
3.40k
    }
2714
2715
361
    return modules.at(moduleID);
2716
3.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.24k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.24k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.24k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.24k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.24k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.93k
        return nullptr;
2713
3.93k
    }
2714
2715
308
    return modules.at(moduleID);
2716
4.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.18k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.18k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.18k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.18k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.18k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.86k
        return nullptr;
2713
2.86k
    }
2714
2715
320
    return modules.at(moduleID);
2716
3.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.28k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.28k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.28k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.28k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.28k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.98k
        return nullptr;
2713
2.98k
    }
2714
2715
297
    return modules.at(moduleID);
2716
3.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.52k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.52k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.52k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.52k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.52k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.24k
        return nullptr;
2713
3.24k
    }
2714
2715
271
    return modules.at(moduleID);
2716
3.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.40k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.40k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.40k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.40k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.40k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.11k
        return nullptr;
2713
3.11k
    }
2714
2715
291
    return modules.at(moduleID);
2716
3.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.56k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.56k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.56k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.56k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.56k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.18k
        return nullptr;
2713
3.18k
    }
2714
2715
378
    return modules.at(moduleID);
2716
3.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.14k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.14k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.14k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.14k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.14k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.82k
        return nullptr;
2713
3.82k
    }
2714
2715
314
    return modules.at(moduleID);
2716
4.14k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.26k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.26k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.26k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.26k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.26k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.83k
        return nullptr;
2713
3.83k
    }
2714
2715
433
    return modules.at(moduleID);
2716
4.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.61k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.61k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.61k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.61k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.61k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.30k
        return nullptr;
2713
3.30k
    }
2714
2715
319
    return modules.at(moduleID);
2716
3.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::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
4.13k
        return nullptr;
2713
4.13k
    }
2714
2715
497
    return modules.at(moduleID);
2716
4.63k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.91k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.91k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.91k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.91k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.91k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.62k
        return nullptr;
2713
3.62k
    }
2714
2715
295
    return modules.at(moduleID);
2716
3.91k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.12k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.12k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.12k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.12k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.12k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.71k
        return nullptr;
2713
3.71k
    }
2714
2715
408
    return modules.at(moduleID);
2716
4.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.70k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.70k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.70k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.70k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.70k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.36k
        return nullptr;
2713
3.36k
    }
2714
2715
342
    return modules.at(moduleID);
2716
3.70k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.81k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.81k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.81k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.81k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.81k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.33k
        return nullptr;
2713
4.33k
    }
2714
2715
477
    return modules.at(moduleID);
2716
4.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::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.70k
        return nullptr;
2713
2.70k
    }
2714
2715
272
    return modules.at(moduleID);
2716
2.98k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.53k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.53k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.53k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.53k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.53k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.16k
        return nullptr;
2713
3.16k
    }
2714
2715
367
    return modules.at(moduleID);
2716
3.53k
}
2717
2718
template <class ResultType, class OperationType>
2719
63.7k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
63.7k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
63.7k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
474k
    do {
2725
474k
        auto op = getOp(&parentDs, data, size);
2726
474k
        auto module = getModule(parentDs);
2727
474k
        if ( module == nullptr ) {
2728
340k
            continue;
2729
340k
        }
2730
2731
134k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
134k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1.65k
            break;
2736
1.65k
        }
2737
473k
    } while ( parentDs.Get<bool>() == true );
2738
2739
63.7k
    if ( operations.empty() == true ) {
2740
2.10k
        return;
2741
2.10k
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
61.6k
#if 1
2745
61.6k
    {
2746
61.6k
        std::set<uint64_t> moduleIDs;
2747
97.8k
        for (const auto& m : modules ) {
2748
97.8k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
97.8k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
97.8k
            moduleIDs.insert(moduleID);
2756
97.8k
        }
2757
2758
61.6k
        std::set<uint64_t> operationModuleIDs;
2759
117k
        for (const auto& op : operations) {
2760
117k
            operationModuleIDs.insert(op.first->ID);
2761
117k
        }
2762
2763
61.6k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
61.6k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
61.6k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
61.6k
        for (const auto& id : addModuleIDs) {
2768
46.4k
            operations.push_back({ modules.at(id), operations[0].second});
2769
46.4k
        }
2770
61.6k
    }
2771
61.6k
#endif
2772
2773
61.6k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
61.6k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
225k
    for (size_t i = 0; i < operations.size(); i++) {
2781
163k
        auto& operation = operations[i];
2782
2783
163k
        auto& module = operation.first;
2784
163k
        auto& op = operation.second;
2785
2786
163k
        if ( i > 0 ) {
2787
114k
            auto& prevModule = operations[i-1].first;
2788
114k
            auto& prevOp = operations[i].second;
2789
2790
114k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
63.6k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
63.6k
                if ( curModifier.size() == 0 ) {
2793
24.1M
                    for (size_t j = 0; j < 512; j++) {
2794
24.1M
                        curModifier.push_back(1);
2795
24.1M
                    }
2796
47.1k
                } else {
2797
580k
                    for (auto& c : curModifier) {
2798
580k
                        c++;
2799
580k
                    }
2800
16.5k
                }
2801
63.6k
            }
2802
114k
        }
2803
2804
163k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
163k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
163k
        const auto& result = results.back();
2811
2812
163k
        if ( result.second != std::nullopt ) {
2813
47.4k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
47.4k
        }
2820
2821
163k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
163k
        if ( options.disableTests == false ) {
2830
163k
            tests::test(op, result.second);
2831
163k
        }
2832
2833
163k
        postprocess(module, op, result);
2834
163k
    }
2835
2836
61.6k
    if ( options.noCompare == false ) {
2837
48.9k
        compare(operations, results, data, size);
2838
48.9k
    }
2839
61.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.07k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.07k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.07k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
10.1k
    do {
2725
10.1k
        auto op = getOp(&parentDs, data, size);
2726
10.1k
        auto module = getModule(parentDs);
2727
10.1k
        if ( module == nullptr ) {
2728
3.91k
            continue;
2729
3.91k
        }
2730
2731
6.26k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
6.26k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
10.1k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.07k
    if ( operations.empty() == true ) {
2740
49
        return;
2741
49
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.02k
#if 1
2745
3.02k
    {
2746
3.02k
        std::set<uint64_t> moduleIDs;
2747
5.71k
        for (const auto& m : modules ) {
2748
5.71k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
5.71k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
5.71k
            moduleIDs.insert(moduleID);
2756
5.71k
        }
2757
2758
3.02k
        std::set<uint64_t> operationModuleIDs;
2759
5.94k
        for (const auto& op : operations) {
2760
5.94k
            operationModuleIDs.insert(op.first->ID);
2761
5.94k
        }
2762
2763
3.02k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.02k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.02k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.02k
        for (const auto& id : addModuleIDs) {
2768
2.80k
            operations.push_back({ modules.at(id), operations[0].second});
2769
2.80k
        }
2770
3.02k
    }
2771
3.02k
#endif
2772
2773
3.02k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.02k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
11.7k
    for (size_t i = 0; i < operations.size(); i++) {
2781
8.74k
        auto& operation = operations[i];
2782
2783
8.74k
        auto& module = operation.first;
2784
8.74k
        auto& op = operation.second;
2785
2786
8.74k
        if ( i > 0 ) {
2787
5.89k
            auto& prevModule = operations[i-1].first;
2788
5.89k
            auto& prevOp = operations[i].second;
2789
2790
5.89k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2.97k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2.97k
                if ( curModifier.size() == 0 ) {
2793
1.19M
                    for (size_t j = 0; j < 512; j++) {
2794
1.19M
                        curModifier.push_back(1);
2795
1.19M
                    }
2796
2.33k
                } else {
2797
10.3k
                    for (auto& c : curModifier) {
2798
10.3k
                        c++;
2799
10.3k
                    }
2800
638
                }
2801
2.97k
            }
2802
5.89k
        }
2803
2804
8.74k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
8.74k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
8.74k
        const auto& result = results.back();
2811
2812
8.74k
        if ( result.second != std::nullopt ) {
2813
4.86k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.86k
        }
2820
2821
8.74k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
8.74k
        if ( options.disableTests == false ) {
2830
8.74k
            tests::test(op, result.second);
2831
8.74k
        }
2832
2833
8.74k
        postprocess(module, op, result);
2834
8.74k
    }
2835
2836
3.02k
    if ( options.noCompare == false ) {
2837
2.85k
        compare(operations, results, data, size);
2838
2.85k
    }
2839
3.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.51k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.51k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.51k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
7.60k
    do {
2725
7.60k
        auto op = getOp(&parentDs, data, size);
2726
7.60k
        auto module = getModule(parentDs);
2727
7.60k
        if ( module == nullptr ) {
2728
4.10k
            continue;
2729
4.10k
        }
2730
2731
3.50k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.50k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
7.60k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.51k
    if ( operations.empty() == true ) {
2740
24
        return;
2741
24
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.49k
#if 1
2745
1.49k
    {
2746
1.49k
        std::set<uint64_t> moduleIDs;
2747
2.75k
        for (const auto& m : modules ) {
2748
2.75k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.75k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.75k
            moduleIDs.insert(moduleID);
2756
2.75k
        }
2757
2758
1.49k
        std::set<uint64_t> operationModuleIDs;
2759
3.21k
        for (const auto& op : operations) {
2760
3.21k
            operationModuleIDs.insert(op.first->ID);
2761
3.21k
        }
2762
2763
1.49k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.49k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.49k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.49k
        for (const auto& id : addModuleIDs) {
2768
1.34k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.34k
        }
2770
1.49k
    }
2771
1.49k
#endif
2772
2773
1.49k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.49k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
6.05k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.55k
        auto& operation = operations[i];
2782
2783
4.55k
        auto& module = operation.first;
2784
4.55k
        auto& op = operation.second;
2785
2786
4.55k
        if ( i > 0 ) {
2787
3.18k
            auto& prevModule = operations[i-1].first;
2788
3.18k
            auto& prevOp = operations[i].second;
2789
2790
3.18k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.76k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.76k
                if ( curModifier.size() == 0 ) {
2793
664k
                    for (size_t j = 0; j < 512; j++) {
2794
663k
                        curModifier.push_back(1);
2795
663k
                    }
2796
1.29k
                } else {
2797
2.63k
                    for (auto& c : curModifier) {
2798
2.63k
                        c++;
2799
2.63k
                    }
2800
466
                }
2801
1.76k
            }
2802
3.18k
        }
2803
2804
4.55k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.55k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.55k
        const auto& result = results.back();
2811
2812
4.55k
        if ( result.second != std::nullopt ) {
2813
2.00k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.00k
        }
2820
2821
4.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
4.55k
        if ( options.disableTests == false ) {
2830
4.55k
            tests::test(op, result.second);
2831
4.55k
        }
2832
2833
4.55k
        postprocess(module, op, result);
2834
4.55k
    }
2835
2836
1.49k
    if ( options.noCompare == false ) {
2837
1.37k
        compare(operations, results, data, size);
2838
1.37k
    }
2839
1.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.23k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.23k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.23k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
9.69k
    do {
2725
9.69k
        auto op = getOp(&parentDs, data, size);
2726
9.69k
        auto module = getModule(parentDs);
2727
9.69k
        if ( module == nullptr ) {
2728
4.44k
            continue;
2729
4.44k
        }
2730
2731
5.25k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
5.25k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
9.68k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.23k
    if ( operations.empty() == true ) {
2740
16
        return;
2741
16
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.22k
#if 1
2745
1.22k
    {
2746
1.22k
        std::set<uint64_t> moduleIDs;
2747
2.15k
        for (const auto& m : modules ) {
2748
2.15k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.15k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.15k
            moduleIDs.insert(moduleID);
2756
2.15k
        }
2757
2758
1.22k
        std::set<uint64_t> operationModuleIDs;
2759
4.85k
        for (const auto& op : operations) {
2760
4.85k
            operationModuleIDs.insert(op.first->ID);
2761
4.85k
        }
2762
2763
1.22k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.22k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.22k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.22k
        for (const auto& id : addModuleIDs) {
2768
1.02k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.02k
        }
2770
1.22k
    }
2771
1.22k
#endif
2772
2773
1.22k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.22k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
7.10k
    for (size_t i = 0; i < operations.size(); i++) {
2781
5.88k
        auto& operation = operations[i];
2782
2783
5.88k
        auto& module = operation.first;
2784
5.88k
        auto& op = operation.second;
2785
2786
5.88k
        if ( i > 0 ) {
2787
4.80k
            auto& prevModule = operations[i-1].first;
2788
4.80k
            auto& prevOp = operations[i].second;
2789
2790
4.80k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
3.67k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
3.67k
                if ( curModifier.size() == 0 ) {
2793
1.71M
                    for (size_t j = 0; j < 512; j++) {
2794
1.70M
                        curModifier.push_back(1);
2795
1.70M
                    }
2796
3.33k
                } else {
2797
3.66k
                    for (auto& c : curModifier) {
2798
3.66k
                        c++;
2799
3.66k
                    }
2800
335
                }
2801
3.67k
            }
2802
4.80k
        }
2803
2804
5.88k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5.88k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5.88k
        const auto& result = results.back();
2811
2812
5.88k
        if ( result.second != std::nullopt ) {
2813
2.83k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.83k
        }
2820
2821
5.88k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.88k
        if ( options.disableTests == false ) {
2830
5.88k
            tests::test(op, result.second);
2831
5.88k
        }
2832
2833
5.88k
        postprocess(module, op, result);
2834
5.88k
    }
2835
2836
1.22k
    if ( options.noCompare == false ) {
2837
1.07k
        compare(operations, results, data, size);
2838
1.07k
    }
2839
1.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.33k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.33k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.33k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
9.10k
    do {
2725
9.10k
        auto op = getOp(&parentDs, data, size);
2726
9.10k
        auto module = getModule(parentDs);
2727
9.10k
        if ( module == nullptr ) {
2728
4.57k
            continue;
2729
4.57k
        }
2730
2731
4.53k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.53k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
9.10k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.33k
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.31k
#if 1
2745
1.31k
    {
2746
1.31k
        std::set<uint64_t> moduleIDs;
2747
2.38k
        for (const auto& m : modules ) {
2748
2.38k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.38k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.38k
            moduleIDs.insert(moduleID);
2756
2.38k
        }
2757
2758
1.31k
        std::set<uint64_t> operationModuleIDs;
2759
4.21k
        for (const auto& op : operations) {
2760
4.21k
            operationModuleIDs.insert(op.first->ID);
2761
4.21k
        }
2762
2763
1.31k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.31k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.31k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.31k
        for (const auto& id : addModuleIDs) {
2768
1.14k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.14k
        }
2770
1.31k
    }
2771
1.31k
#endif
2772
2773
1.31k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.31k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
6.67k
    for (size_t i = 0; i < operations.size(); i++) {
2781
5.36k
        auto& operation = operations[i];
2782
2783
5.36k
        auto& module = operation.first;
2784
5.36k
        auto& op = operation.second;
2785
2786
5.36k
        if ( i > 0 ) {
2787
4.16k
            auto& prevModule = operations[i-1].first;
2788
4.16k
            auto& prevOp = operations[i].second;
2789
2790
4.16k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2.91k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2.91k
                if ( curModifier.size() == 0 ) {
2793
1.16M
                    for (size_t j = 0; j < 512; j++) {
2794
1.15M
                        curModifier.push_back(1);
2795
1.15M
                    }
2796
2.26k
                } else {
2797
1.51k
                    for (auto& c : curModifier) {
2798
1.51k
                        c++;
2799
1.51k
                    }
2800
652
                }
2801
2.91k
            }
2802
4.16k
        }
2803
2804
5.36k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5.36k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5.36k
        const auto& result = results.back();
2811
2812
5.36k
        if ( result.second != std::nullopt ) {
2813
2.53k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.53k
        }
2820
2821
5.36k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.36k
        if ( options.disableTests == false ) {
2830
5.36k
            tests::test(op, result.second);
2831
5.36k
        }
2832
2833
5.36k
        postprocess(module, op, result);
2834
5.36k
    }
2835
2836
1.31k
    if ( options.noCompare == false ) {
2837
1.19k
        compare(operations, results, data, size);
2838
1.19k
    }
2839
1.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
6.30k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
6.30k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
6.30k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
31.1k
    do {
2725
31.1k
        auto op = getOp(&parentDs, data, size);
2726
31.1k
        auto module = getModule(parentDs);
2727
31.1k
        if ( module == nullptr ) {
2728
9.87k
            continue;
2729
9.87k
        }
2730
2731
21.2k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
21.2k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
24
            break;
2736
24
        }
2737
31.0k
    } while ( parentDs.Get<bool>() == true );
2738
2739
6.30k
    if ( operations.empty() == true ) {
2740
32
        return;
2741
32
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
6.27k
#if 1
2745
6.27k
    {
2746
6.27k
        std::set<uint64_t> moduleIDs;
2747
12.2k
        for (const auto& m : modules ) {
2748
12.2k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
12.2k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
12.2k
            moduleIDs.insert(moduleID);
2756
12.2k
        }
2757
2758
6.27k
        std::set<uint64_t> operationModuleIDs;
2759
20.8k
        for (const auto& op : operations) {
2760
20.8k
            operationModuleIDs.insert(op.first->ID);
2761
20.8k
        }
2762
2763
6.27k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
6.27k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
6.27k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
6.27k
        for (const auto& id : addModuleIDs) {
2768
6.00k
            operations.push_back({ modules.at(id), operations[0].second});
2769
6.00k
        }
2770
6.27k
    }
2771
6.27k
#endif
2772
2773
6.27k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
6.27k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
33.0k
    for (size_t i = 0; i < operations.size(); i++) {
2781
26.8k
        auto& operation = operations[i];
2782
2783
26.8k
        auto& module = operation.first;
2784
26.8k
        auto& op = operation.second;
2785
2786
26.8k
        if ( i > 0 ) {
2787
20.6k
            auto& prevModule = operations[i-1].first;
2788
20.6k
            auto& prevOp = operations[i].second;
2789
2790
20.6k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
14.3k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
14.3k
                if ( curModifier.size() == 0 ) {
2793
5.76M
                    for (size_t j = 0; j < 512; j++) {
2794
5.75M
                        curModifier.push_back(1);
2795
5.75M
                    }
2796
11.2k
                } else {
2797
47.6k
                    for (auto& c : curModifier) {
2798
47.6k
                        c++;
2799
47.6k
                    }
2800
3.08k
                }
2801
14.3k
            }
2802
20.6k
        }
2803
2804
26.8k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
26.8k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
26.8k
        const auto& result = results.back();
2811
2812
26.8k
        if ( result.second != std::nullopt ) {
2813
9.61k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
9.61k
        }
2820
2821
26.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
26.8k
        if ( options.disableTests == false ) {
2830
26.8k
            tests::test(op, result.second);
2831
26.8k
        }
2832
2833
26.8k
        postprocess(module, op, result);
2834
26.8k
    }
2835
2836
6.27k
    if ( options.noCompare == false ) {
2837
6.13k
        compare(operations, results, data, size);
2838
6.13k
    }
2839
6.27k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
5.95k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
5.95k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
5.95k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
24.7k
    do {
2725
24.7k
        auto op = getOp(&parentDs, data, size);
2726
24.7k
        auto module = getModule(parentDs);
2727
24.7k
        if ( module == nullptr ) {
2728
8.24k
            continue;
2729
8.24k
        }
2730
2731
16.4k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
16.4k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
17
            break;
2736
17
        }
2737
24.7k
    } while ( parentDs.Get<bool>() == true );
2738
2739
5.95k
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
5.93k
#if 1
2745
5.93k
    {
2746
5.93k
        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
5.93k
        std::set<uint64_t> operationModuleIDs;
2759
16.0k
        for (const auto& op : operations) {
2760
16.0k
            operationModuleIDs.insert(op.first->ID);
2761
16.0k
        }
2762
2763
5.93k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
5.93k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
5.93k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
5.93k
        for (const auto& id : addModuleIDs) {
2768
5.65k
            operations.push_back({ modules.at(id), operations[0].second});
2769
5.65k
        }
2770
5.93k
    }
2771
5.93k
#endif
2772
2773
5.93k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
5.93k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
27.6k
    for (size_t i = 0; i < operations.size(); i++) {
2781
21.6k
        auto& operation = operations[i];
2782
2783
21.6k
        auto& module = operation.first;
2784
21.6k
        auto& op = operation.second;
2785
2786
21.6k
        if ( i > 0 ) {
2787
15.8k
            auto& prevModule = operations[i-1].first;
2788
15.8k
            auto& prevOp = operations[i].second;
2789
2790
15.8k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
9.93k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
9.93k
                if ( curModifier.size() == 0 ) {
2793
4.09M
                    for (size_t j = 0; j < 512; j++) {
2794
4.09M
                        curModifier.push_back(1);
2795
4.09M
                    }
2796
7.98k
                } else {
2797
10.3k
                    for (auto& c : curModifier) {
2798
10.3k
                        c++;
2799
10.3k
                    }
2800
1.94k
                }
2801
9.93k
            }
2802
15.8k
        }
2803
2804
21.6k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
21.6k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
21.6k
        const auto& result = results.back();
2811
2812
21.6k
        if ( result.second != std::nullopt ) {
2813
1.86k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.86k
        }
2820
2821
21.6k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
21.6k
        if ( options.disableTests == false ) {
2830
21.6k
            tests::test(op, result.second);
2831
21.6k
        }
2832
2833
21.6k
        postprocess(module, op, result);
2834
21.6k
    }
2835
2836
5.93k
    if ( options.noCompare == false ) {
2837
5.77k
        compare(operations, results, data, size);
2838
5.77k
    }
2839
5.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
401
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
401
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
401
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.19k
    do {
2725
5.19k
        auto op = getOp(&parentDs, data, size);
2726
5.19k
        auto module = getModule(parentDs);
2727
5.19k
        if ( module == nullptr ) {
2728
3.67k
            continue;
2729
3.67k
        }
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
2
            break;
2736
2
        }
2737
5.18k
    } while ( parentDs.Get<bool>() == true );
2738
2739
401
    if ( operations.empty() == true ) {
2740
39
        return;
2741
39
    }
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
476
        for (const auto& m : modules ) {
2748
476
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
476
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
476
            moduleIDs.insert(moduleID);
2756
476
        }
2757
2758
362
        std::set<uint64_t> operationModuleIDs;
2759
1.27k
        for (const auto& op : operations) {
2760
1.27k
            operationModuleIDs.insert(op.first->ID);
2761
1.27k
        }
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
202
            operations.push_back({ modules.at(id), operations[0].second});
2769
202
        }
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.83k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.47k
        auto& operation = operations[i];
2782
2783
1.47k
        auto& module = operation.first;
2784
1.47k
        auto& op = operation.second;
2785
2786
1.47k
        if ( i > 0 ) {
2787
1.23k
            auto& prevModule = operations[i-1].first;
2788
1.23k
            auto& prevOp = operations[i].second;
2789
2790
1.23k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
965
                auto& curModifier = op.modifier.GetVectorPtr();
2792
965
                if ( curModifier.size() == 0 ) {
2793
356k
                    for (size_t j = 0; j < 512; j++) {
2794
355k
                        curModifier.push_back(1);
2795
355k
                    }
2796
694
                } else {
2797
2.43k
                    for (auto& c : curModifier) {
2798
2.43k
                        c++;
2799
2.43k
                    }
2800
271
                }
2801
965
            }
2802
1.23k
        }
2803
2804
1.47k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.47k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.47k
        const auto& result = results.back();
2811
2812
1.47k
        if ( result.second != std::nullopt ) {
2813
440
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
440
        }
2820
2821
1.47k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.47k
        if ( options.disableTests == false ) {
2830
1.47k
            tests::test(op, result.second);
2831
1.47k
        }
2832
2833
1.47k
        postprocess(module, op, result);
2834
1.47k
    }
2835
2836
362
    if ( options.noCompare == false ) {
2837
238
        compare(operations, results, data, size);
2838
238
    }
2839
362
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.91k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.91k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.91k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
13.7k
    do {
2725
13.7k
        auto op = getOp(&parentDs, data, size);
2726
13.7k
        auto module = getModule(parentDs);
2727
13.7k
        if ( module == nullptr ) {
2728
5.28k
            continue;
2729
5.28k
        }
2730
2731
8.49k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
8.49k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
13.7k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.91k
    if ( operations.empty() == true ) {
2740
80
        return;
2741
80
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.83k
#if 1
2745
3.83k
    {
2746
3.83k
        std::set<uint64_t> moduleIDs;
2747
7.23k
        for (const auto& m : modules ) {
2748
7.23k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
7.23k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
7.23k
            moduleIDs.insert(moduleID);
2756
7.23k
        }
2757
2758
3.83k
        std::set<uint64_t> operationModuleIDs;
2759
8.07k
        for (const auto& op : operations) {
2760
8.07k
            operationModuleIDs.insert(op.first->ID);
2761
8.07k
        }
2762
2763
3.83k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.83k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.83k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.83k
        for (const auto& id : addModuleIDs) {
2768
3.55k
            operations.push_back({ modules.at(id), operations[0].second});
2769
3.55k
        }
2770
3.83k
    }
2771
3.83k
#endif
2772
2773
3.83k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.83k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
15.4k
    for (size_t i = 0; i < operations.size(); i++) {
2781
11.6k
        auto& operation = operations[i];
2782
2783
11.6k
        auto& module = operation.first;
2784
11.6k
        auto& op = operation.second;
2785
2786
11.6k
        if ( i > 0 ) {
2787
8.01k
            auto& prevModule = operations[i-1].first;
2788
8.01k
            auto& prevOp = operations[i].second;
2789
2790
8.01k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
4.33k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
4.33k
                if ( curModifier.size() == 0 ) {
2793
1.80M
                    for (size_t j = 0; j < 512; j++) {
2794
1.80M
                        curModifier.push_back(1);
2795
1.80M
                    }
2796
3.52k
                } else {
2797
6.78k
                    for (auto& c : curModifier) {
2798
6.78k
                        c++;
2799
6.78k
                    }
2800
807
                }
2801
4.33k
            }
2802
8.01k
        }
2803
2804
11.6k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
11.6k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
11.6k
        const auto& result = results.back();
2811
2812
11.6k
        if ( result.second != std::nullopt ) {
2813
5.12k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
5.12k
        }
2820
2821
11.6k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
11.6k
        if ( options.disableTests == false ) {
2830
11.6k
            tests::test(op, result.second);
2831
11.6k
        }
2832
2833
11.6k
        postprocess(module, op, result);
2834
11.6k
    }
2835
2836
3.83k
    if ( options.noCompare == false ) {
2837
3.61k
        compare(operations, results, data, size);
2838
3.61k
    }
2839
3.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
335
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
335
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
335
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.99k
    do {
2725
4.99k
        auto op = getOp(&parentDs, data, size);
2726
4.99k
        auto module = getModule(parentDs);
2727
4.99k
        if ( module == nullptr ) {
2728
3.71k
            continue;
2729
3.71k
        }
2730
2731
1.28k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.28k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
4.98k
    } while ( parentDs.Get<bool>() == true );
2738
2739
335
    if ( operations.empty() == true ) {
2740
31
        return;
2741
31
    }
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
370
        for (const auto& m : modules ) {
2748
370
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
370
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
370
            moduleIDs.insert(moduleID);
2756
370
        }
2757
2758
304
        std::set<uint64_t> operationModuleIDs;
2759
930
        for (const auto& op : operations) {
2760
930
            operationModuleIDs.insert(op.first->ID);
2761
930
        }
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
137
            operations.push_back({ modules.at(id), operations[0].second});
2769
137
        }
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.37k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.06k
        auto& operation = operations[i];
2782
2783
1.06k
        auto& module = operation.first;
2784
1.06k
        auto& op = operation.second;
2785
2786
1.06k
        if ( i > 0 ) {
2787
882
            auto& prevModule = operations[i-1].first;
2788
882
            auto& prevOp = operations[i].second;
2789
2790
882
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
641
                auto& curModifier = op.modifier.GetVectorPtr();
2792
641
                if ( curModifier.size() == 0 ) {
2793
227k
                    for (size_t j = 0; j < 512; j++) {
2794
226k
                        curModifier.push_back(1);
2795
226k
                    }
2796
443
                } else {
2797
770
                    for (auto& c : curModifier) {
2798
770
                        c++;
2799
770
                    }
2800
198
                }
2801
641
            }
2802
882
        }
2803
2804
1.06k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.06k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.06k
        const auto& result = results.back();
2811
2812
1.06k
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
1.06k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.06k
        if ( options.disableTests == false ) {
2830
1.06k
            tests::test(op, result.second);
2831
1.06k
        }
2832
2833
1.06k
        postprocess(module, op, result);
2834
1.06k
    }
2835
2836
304
    if ( options.noCompare == false ) {
2837
185
        compare(operations, results, data, size);
2838
185
    }
2839
304
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
241
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
241
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
241
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.67k
    do {
2725
4.67k
        auto op = getOp(&parentDs, data, size);
2726
4.67k
        auto module = getModule(parentDs);
2727
4.67k
        if ( module == nullptr ) {
2728
3.56k
            continue;
2729
3.56k
        }
2730
2731
1.10k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.10k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
4.66k
    } while ( parentDs.Get<bool>() == true );
2738
2739
241
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
232
#if 1
2745
232
    {
2746
232
        std::set<uint64_t> moduleIDs;
2747
232
        for (const auto& m : modules ) {
2748
204
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
204
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
204
            moduleIDs.insert(moduleID);
2756
204
        }
2757
2758
232
        std::set<uint64_t> operationModuleIDs;
2759
727
        for (const auto& op : operations) {
2760
727
            operationModuleIDs.insert(op.first->ID);
2761
727
        }
2762
2763
232
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
232
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
232
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
232
        for (const auto& id : addModuleIDs) {
2768
59
            operations.push_back({ modules.at(id), operations[0].second});
2769
59
        }
2770
232
    }
2771
232
#endif
2772
2773
232
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
232
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.01k
    for (size_t i = 0; i < operations.size(); i++) {
2781
786
        auto& operation = operations[i];
2782
2783
786
        auto& module = operation.first;
2784
786
        auto& op = operation.second;
2785
2786
786
        if ( i > 0 ) {
2787
684
            auto& prevModule = operations[i-1].first;
2788
684
            auto& prevOp = operations[i].second;
2789
2790
684
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
501
                auto& curModifier = op.modifier.GetVectorPtr();
2792
501
                if ( curModifier.size() == 0 ) {
2793
167k
                    for (size_t j = 0; j < 512; j++) {
2794
167k
                        curModifier.push_back(1);
2795
167k
                    }
2796
327
                } else {
2797
1.61k
                    for (auto& c : curModifier) {
2798
1.61k
                        c++;
2799
1.61k
                    }
2800
174
                }
2801
501
            }
2802
684
        }
2803
2804
786
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
786
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
786
        const auto& result = results.back();
2811
2812
786
        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
786
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
786
        if ( options.disableTests == false ) {
2830
786
            tests::test(op, result.second);
2831
786
        }
2832
2833
786
        postprocess(module, op, result);
2834
786
    }
2835
2836
232
    if ( options.noCompare == false ) {
2837
102
        compare(operations, results, data, size);
2838
102
    }
2839
232
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
290
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
290
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
290
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.20k
    do {
2725
5.20k
        auto op = getOp(&parentDs, data, size);
2726
5.20k
        auto module = getModule(parentDs);
2727
5.20k
        if ( module == nullptr ) {
2728
4.23k
            continue;
2729
4.23k
        }
2730
2731
972
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
972
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
5.19k
    } while ( parentDs.Get<bool>() == true );
2738
2739
290
    if ( operations.empty() == true ) {
2740
48
        return;
2741
48
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
242
#if 1
2745
242
    {
2746
242
        std::set<uint64_t> moduleIDs;
2747
242
        for (const auto& m : modules ) {
2748
216
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
216
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
216
            moduleIDs.insert(moduleID);
2756
216
        }
2757
2758
242
        std::set<uint64_t> operationModuleIDs;
2759
628
        for (const auto& op : operations) {
2760
628
            operationModuleIDs.insert(op.first->ID);
2761
628
        }
2762
2763
242
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
242
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
242
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
242
        for (const auto& id : addModuleIDs) {
2768
67
            operations.push_back({ modules.at(id), operations[0].second});
2769
67
        }
2770
242
    }
2771
242
#endif
2772
2773
242
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
242
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
937
    for (size_t i = 0; i < operations.size(); i++) {
2781
695
        auto& operation = operations[i];
2782
2783
695
        auto& module = operation.first;
2784
695
        auto& op = operation.second;
2785
2786
695
        if ( i > 0 ) {
2787
587
            auto& prevModule = operations[i-1].first;
2788
587
            auto& prevOp = operations[i].second;
2789
2790
587
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
435
                auto& curModifier = op.modifier.GetVectorPtr();
2792
435
                if ( curModifier.size() == 0 ) {
2793
119k
                    for (size_t j = 0; j < 512; j++) {
2794
119k
                        curModifier.push_back(1);
2795
119k
                    }
2796
233
                } else {
2797
1.01k
                    for (auto& c : curModifier) {
2798
1.01k
                        c++;
2799
1.01k
                    }
2800
202
                }
2801
435
            }
2802
587
        }
2803
2804
695
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
695
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
695
        const auto& result = results.back();
2811
2812
695
        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
695
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
695
        if ( options.disableTests == false ) {
2830
695
            tests::test(op, result.second);
2831
695
        }
2832
2833
695
        postprocess(module, op, result);
2834
695
    }
2835
2836
242
    if ( options.noCompare == false ) {
2837
108
        compare(operations, results, data, size);
2838
108
    }
2839
242
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.36k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.36k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.36k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
7.10k
    do {
2725
7.10k
        auto op = getOp(&parentDs, data, size);
2726
7.10k
        auto module = getModule(parentDs);
2727
7.10k
        if ( module == nullptr ) {
2728
3.94k
            continue;
2729
3.94k
        }
2730
2731
3.16k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.16k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
7.09k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.36k
    if ( operations.empty() == true ) {
2740
30
        return;
2741
30
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.33k
#if 1
2745
1.33k
    {
2746
1.33k
        std::set<uint64_t> moduleIDs;
2747
2.42k
        for (const auto& m : modules ) {
2748
2.42k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.42k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.42k
            moduleIDs.insert(moduleID);
2756
2.42k
        }
2757
2758
1.33k
        std::set<uint64_t> operationModuleIDs;
2759
2.87k
        for (const auto& op : operations) {
2760
2.87k
            operationModuleIDs.insert(op.first->ID);
2761
2.87k
        }
2762
2763
1.33k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.33k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.33k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.33k
        for (const auto& id : addModuleIDs) {
2768
1.17k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.17k
        }
2770
1.33k
    }
2771
1.33k
#endif
2772
2773
1.33k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.33k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
5.37k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.04k
        auto& operation = operations[i];
2782
2783
4.04k
        auto& module = operation.first;
2784
4.04k
        auto& op = operation.second;
2785
2786
4.04k
        if ( i > 0 ) {
2787
2.82k
            auto& prevModule = operations[i-1].first;
2788
2.82k
            auto& prevOp = operations[i].second;
2789
2790
2.82k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.52k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.52k
                if ( curModifier.size() == 0 ) {
2793
635k
                    for (size_t j = 0; j < 512; j++) {
2794
634k
                        curModifier.push_back(1);
2795
634k
                    }
2796
1.23k
                } else {
2797
20.1k
                    for (auto& c : curModifier) {
2798
20.1k
                        c++;
2799
20.1k
                    }
2800
285
                }
2801
1.52k
            }
2802
2.82k
        }
2803
2804
4.04k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.04k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.04k
        const auto& result = results.back();
2811
2812
4.04k
        if ( result.second != std::nullopt ) {
2813
1.48k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
1.48k
        }
2820
2821
4.04k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.04k
        if ( options.disableTests == false ) {
2830
4.04k
            tests::test(op, result.second);
2831
4.04k
        }
2832
2833
4.04k
        postprocess(module, op, result);
2834
4.04k
    }
2835
2836
1.33k
    if ( options.noCompare == false ) {
2837
1.21k
        compare(operations, results, data, size);
2838
1.21k
    }
2839
1.33k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
636
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
636
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
636
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.10k
    do {
2725
5.10k
        auto op = getOp(&parentDs, data, size);
2726
5.10k
        auto module = getModule(parentDs);
2727
5.10k
        if ( module == nullptr ) {
2728
4.30k
            continue;
2729
4.30k
        }
2730
2731
802
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
802
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
92
            break;
2736
92
        }
2737
5.01k
    } while ( parentDs.Get<bool>() == true );
2738
2739
636
    if ( operations.empty() == true ) {
2740
54
        return;
2741
54
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
582
#if 1
2745
582
    {
2746
582
        std::set<uint64_t> moduleIDs;
2747
856
        for (const auto& m : modules ) {
2748
856
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
856
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
856
            moduleIDs.insert(moduleID);
2756
856
        }
2757
2758
582
        std::set<uint64_t> operationModuleIDs;
2759
661
        for (const auto& op : operations) {
2760
661
            operationModuleIDs.insert(op.first->ID);
2761
661
        }
2762
2763
582
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
582
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
582
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
582
        for (const auto& id : addModuleIDs) {
2768
419
            operations.push_back({ modules.at(id), operations[0].second});
2769
419
        }
2770
582
    }
2771
582
#endif
2772
2773
582
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
582
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.66k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.08k
        auto& operation = operations[i];
2782
2783
1.08k
        auto& module = operation.first;
2784
1.08k
        auto& op = operation.second;
2785
2786
1.08k
        if ( i > 0 ) {
2787
652
            auto& prevModule = operations[i-1].first;
2788
652
            auto& prevOp = operations[i].second;
2789
2790
652
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
222
                auto& curModifier = op.modifier.GetVectorPtr();
2792
222
                if ( curModifier.size() == 0 ) {
2793
91.8k
                    for (size_t j = 0; j < 512; j++) {
2794
91.6k
                        curModifier.push_back(1);
2795
91.6k
                    }
2796
179
                } else {
2797
1.44k
                    for (auto& c : curModifier) {
2798
1.44k
                        c++;
2799
1.44k
                    }
2800
43
                }
2801
222
            }
2802
652
        }
2803
2804
1.08k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.08k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.08k
        const auto& result = results.back();
2811
2812
1.08k
        if ( result.second != std::nullopt ) {
2813
495
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
495
        }
2820
2821
1.08k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.08k
        if ( options.disableTests == false ) {
2830
1.08k
            tests::test(op, result.second);
2831
1.08k
        }
2832
2833
1.08k
        postprocess(module, op, result);
2834
1.08k
    }
2835
2836
582
    if ( options.noCompare == false ) {
2837
428
        compare(operations, results, data, size);
2838
428
    }
2839
582
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
241
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
241
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
241
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.90k
    do {
2725
5.90k
        auto op = getOp(&parentDs, data, size);
2726
5.90k
        auto module = getModule(parentDs);
2727
5.90k
        if ( module == nullptr ) {
2728
4.88k
            continue;
2729
4.88k
        }
2730
2731
1.02k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.02k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
5.90k
    } while ( parentDs.Get<bool>() == true );
2738
2739
241
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
236
#if 1
2745
236
    {
2746
236
        std::set<uint64_t> moduleIDs;
2747
236
        for (const auto& m : modules ) {
2748
220
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
220
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
220
            moduleIDs.insert(moduleID);
2756
220
        }
2757
2758
236
        std::set<uint64_t> operationModuleIDs;
2759
652
        for (const auto& op : operations) {
2760
652
            operationModuleIDs.insert(op.first->ID);
2761
652
        }
2762
2763
236
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
236
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
236
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
236
        for (const auto& id : addModuleIDs) {
2768
72
            operations.push_back({ modules.at(id), operations[0].second});
2769
72
        }
2770
236
    }
2771
236
#endif
2772
2773
236
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
236
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
960
    for (size_t i = 0; i < operations.size(); i++) {
2781
724
        auto& operation = operations[i];
2782
2783
724
        auto& module = operation.first;
2784
724
        auto& op = operation.second;
2785
2786
724
        if ( i > 0 ) {
2787
614
            auto& prevModule = operations[i-1].first;
2788
614
            auto& prevOp = operations[i].second;
2789
2790
614
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
445
                auto& curModifier = op.modifier.GetVectorPtr();
2792
445
                if ( curModifier.size() == 0 ) {
2793
174k
                    for (size_t j = 0; j < 512; j++) {
2794
174k
                        curModifier.push_back(1);
2795
174k
                    }
2796
341
                } else {
2797
2.22k
                    for (auto& c : curModifier) {
2798
2.22k
                        c++;
2799
2.22k
                    }
2800
104
                }
2801
445
            }
2802
614
        }
2803
2804
724
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
724
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
724
        const auto& result = results.back();
2811
2812
724
        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
724
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
724
        if ( options.disableTests == false ) {
2830
724
            tests::test(op, result.second);
2831
724
        }
2832
2833
724
        postprocess(module, op, result);
2834
724
    }
2835
2836
236
    if ( options.noCompare == false ) {
2837
110
        compare(operations, results, data, size);
2838
110
    }
2839
236
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::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
3.61k
    do {
2725
3.61k
        auto op = getOp(&parentDs, data, size);
2726
3.61k
        auto module = getModule(parentDs);
2727
3.61k
        if ( module == nullptr ) {
2728
2.56k
            continue;
2729
2.56k
        }
2730
2731
1.05k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.05k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
3.61k
    } while ( parentDs.Get<bool>() == true );
2738
2739
229
    if ( operations.empty() == true ) {
2740
22
        return;
2741
22
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
207
#if 1
2745
207
    {
2746
207
        std::set<uint64_t> moduleIDs;
2747
207
        for (const auto& m : modules ) {
2748
184
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
184
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
184
            moduleIDs.insert(moduleID);
2756
184
        }
2757
2758
207
        std::set<uint64_t> operationModuleIDs;
2759
667
        for (const auto& op : operations) {
2760
667
            operationModuleIDs.insert(op.first->ID);
2761
667
        }
2762
2763
207
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
207
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
207
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
207
        for (const auto& id : addModuleIDs) {
2768
55
            operations.push_back({ modules.at(id), operations[0].second});
2769
55
        }
2770
207
    }
2771
207
#endif
2772
2773
207
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
207
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
929
    for (size_t i = 0; i < operations.size(); i++) {
2781
722
        auto& operation = operations[i];
2782
2783
722
        auto& module = operation.first;
2784
722
        auto& op = operation.second;
2785
2786
722
        if ( i > 0 ) {
2787
630
            auto& prevModule = operations[i-1].first;
2788
630
            auto& prevOp = operations[i].second;
2789
2790
630
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
449
                auto& curModifier = op.modifier.GetVectorPtr();
2792
449
                if ( curModifier.size() == 0 ) {
2793
153k
                    for (size_t j = 0; j < 512; j++) {
2794
153k
                        curModifier.push_back(1);
2795
153k
                    }
2796
300
                } else {
2797
1.00k
                    for (auto& c : curModifier) {
2798
1.00k
                        c++;
2799
1.00k
                    }
2800
149
                }
2801
449
            }
2802
630
        }
2803
2804
722
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
722
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
722
        const auto& result = results.back();
2811
2812
722
        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
722
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
722
        if ( options.disableTests == false ) {
2830
722
            tests::test(op, result.second);
2831
722
        }
2832
2833
722
        postprocess(module, op, result);
2834
722
    }
2835
2836
207
    if ( options.noCompare == false ) {
2837
92
        compare(operations, results, data, size);
2838
92
    }
2839
207
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
311
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
311
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
311
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.89k
    do {
2725
3.89k
        auto op = getOp(&parentDs, data, size);
2726
3.89k
        auto module = getModule(parentDs);
2727
3.89k
        if ( module == nullptr ) {
2728
3.60k
            continue;
2729
3.60k
        }
2730
2731
293
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
293
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
35
            break;
2736
35
        }
2737
3.86k
    } while ( parentDs.Get<bool>() == true );
2738
2739
311
    if ( operations.empty() == true ) {
2740
32
        return;
2741
32
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
279
#if 1
2745
279
    {
2746
279
        std::set<uint64_t> moduleIDs;
2747
358
        for (const auto& m : modules ) {
2748
358
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
358
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
358
            moduleIDs.insert(moduleID);
2756
358
        }
2757
2758
279
        std::set<uint64_t> operationModuleIDs;
2759
279
        for (const auto& op : operations) {
2760
214
            operationModuleIDs.insert(op.first->ID);
2761
214
        }
2762
2763
279
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
279
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
279
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
279
        for (const auto& id : addModuleIDs) {
2768
175
            operations.push_back({ modules.at(id), operations[0].second});
2769
175
        }
2770
279
    }
2771
279
#endif
2772
2773
279
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
279
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
668
    for (size_t i = 0; i < operations.size(); i++) {
2781
389
        auto& operation = operations[i];
2782
2783
389
        auto& module = operation.first;
2784
389
        auto& op = operation.second;
2785
2786
389
        if ( i > 0 ) {
2787
210
            auto& prevModule = operations[i-1].first;
2788
210
            auto& prevOp = operations[i].second;
2789
2790
210
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
31
                auto& curModifier = op.modifier.GetVectorPtr();
2792
31
                if ( curModifier.size() == 0 ) {
2793
6.15k
                    for (size_t j = 0; j < 512; j++) {
2794
6.14k
                        curModifier.push_back(1);
2795
6.14k
                    }
2796
19
                } else {
2797
495
                    for (auto& c : curModifier) {
2798
495
                        c++;
2799
495
                    }
2800
19
                }
2801
31
            }
2802
210
        }
2803
2804
389
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
389
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
389
        const auto& result = results.back();
2811
2812
389
        if ( result.second != std::nullopt ) {
2813
70
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
70
        }
2820
2821
389
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
389
        if ( options.disableTests == false ) {
2830
389
            tests::test(op, result.second);
2831
389
        }
2832
2833
389
        postprocess(module, op, result);
2834
389
    }
2835
2836
279
    if ( options.noCompare == false ) {
2837
179
        compare(operations, results, data, size);
2838
179
    }
2839
279
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
873
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
873
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
873
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
6.97k
    do {
2725
6.97k
        auto op = getOp(&parentDs, data, size);
2726
6.97k
        auto module = getModule(parentDs);
2727
6.97k
        if ( module == nullptr ) {
2728
3.99k
            continue;
2729
3.99k
        }
2730
2731
2.97k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.97k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
6.96k
    } while ( parentDs.Get<bool>() == true );
2738
2739
873
    if ( operations.empty() == true ) {
2740
26
        return;
2741
26
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
847
#if 1
2745
847
    {
2746
847
        std::set<uint64_t> moduleIDs;
2747
1.42k
        for (const auto& m : modules ) {
2748
1.42k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.42k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.42k
            moduleIDs.insert(moduleID);
2756
1.42k
        }
2757
2758
847
        std::set<uint64_t> operationModuleIDs;
2759
2.53k
        for (const auto& op : operations) {
2760
2.53k
            operationModuleIDs.insert(op.first->ID);
2761
2.53k
        }
2762
2763
847
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
847
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
847
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
847
        for (const auto& id : addModuleIDs) {
2768
670
            operations.push_back({ modules.at(id), operations[0].second});
2769
670
        }
2770
847
    }
2771
847
#endif
2772
2773
847
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
847
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
4.04k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.20k
        auto& operation = operations[i];
2782
2783
3.20k
        auto& module = operation.first;
2784
3.20k
        auto& op = operation.second;
2785
2786
3.20k
        if ( i > 0 ) {
2787
2.48k
            auto& prevModule = operations[i-1].first;
2788
2.48k
            auto& prevOp = operations[i].second;
2789
2790
2.48k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.67k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.67k
                if ( curModifier.size() == 0 ) {
2793
674k
                    for (size_t j = 0; j < 512; j++) {
2794
672k
                        curModifier.push_back(1);
2795
672k
                    }
2796
1.31k
                } else {
2797
27.9k
                    for (auto& c : curModifier) {
2798
27.9k
                        c++;
2799
27.9k
                    }
2800
359
                }
2801
1.67k
            }
2802
2.48k
        }
2803
2804
3.20k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.20k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.20k
        const auto& result = results.back();
2811
2812
3.20k
        if ( result.second != std::nullopt ) {
2813
1.47k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.47k
        }
2820
2821
3.20k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.20k
        if ( options.disableTests == false ) {
2830
3.20k
            tests::test(op, result.second);
2831
3.20k
        }
2832
2833
3.20k
        postprocess(module, op, result);
2834
3.20k
    }
2835
2836
847
    if ( options.noCompare == false ) {
2837
714
        compare(operations, results, data, size);
2838
714
    }
2839
847
}
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
262
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
262
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
262
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.96k
    do {
2725
4.96k
        auto op = getOp(&parentDs, data, size);
2726
4.96k
        auto module = getModule(parentDs);
2727
4.96k
        if ( module == nullptr ) {
2728
3.95k
            continue;
2729
3.95k
        }
2730
2731
1.00k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.00k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
4.95k
    } while ( parentDs.Get<bool>() == true );
2738
2739
262
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
250
#if 1
2745
250
    {
2746
250
        std::set<uint64_t> moduleIDs;
2747
250
        for (const auto& m : modules ) {
2748
222
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
222
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
222
            moduleIDs.insert(moduleID);
2756
222
        }
2757
2758
250
        std::set<uint64_t> operationModuleIDs;
2759
647
        for (const auto& op : operations) {
2760
647
            operationModuleIDs.insert(op.first->ID);
2761
647
        }
2762
2763
250
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
250
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
250
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
250
        for (const auto& id : addModuleIDs) {
2768
66
            operations.push_back({ modules.at(id), operations[0].second});
2769
66
        }
2770
250
    }
2771
250
#endif
2772
2773
250
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
250
    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
713
        auto& operation = operations[i];
2782
2783
713
        auto& module = operation.first;
2784
713
        auto& op = operation.second;
2785
2786
713
        if ( i > 0 ) {
2787
602
            auto& prevModule = operations[i-1].first;
2788
602
            auto& prevOp = operations[i].second;
2789
2790
602
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
422
                auto& curModifier = op.modifier.GetVectorPtr();
2792
422
                if ( curModifier.size() == 0 ) {
2793
169k
                    for (size_t j = 0; j < 512; j++) {
2794
168k
                        curModifier.push_back(1);
2795
168k
                    }
2796
330
                } else {
2797
693
                    for (auto& c : curModifier) {
2798
693
                        c++;
2799
693
                    }
2800
92
                }
2801
422
            }
2802
602
        }
2803
2804
713
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
713
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
713
        const auto& result = results.back();
2811
2812
713
        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
713
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
713
        if ( options.disableTests == false ) {
2830
713
            tests::test(op, result.second);
2831
713
        }
2832
2833
713
        postprocess(module, op, result);
2834
713
    }
2835
2836
250
    if ( options.noCompare == false ) {
2837
111
        compare(operations, results, data, size);
2838
111
    }
2839
250
}
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
249
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
249
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
249
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.37k
    do {
2725
5.37k
        auto op = getOp(&parentDs, data, size);
2726
5.37k
        auto module = getModule(parentDs);
2727
5.37k
        if ( module == nullptr ) {
2728
4.35k
            continue;
2729
4.35k
        }
2730
2731
1.02k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.02k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
5.37k
    } while ( parentDs.Get<bool>() == true );
2738
2739
249
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
228
#if 1
2745
228
    {
2746
228
        std::set<uint64_t> moduleIDs;
2747
228
        for (const auto& m : modules ) {
2748
208
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
208
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
208
            moduleIDs.insert(moduleID);
2756
208
        }
2757
2758
228
        std::set<uint64_t> operationModuleIDs;
2759
690
        for (const auto& op : operations) {
2760
690
            operationModuleIDs.insert(op.first->ID);
2761
690
        }
2762
2763
228
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
228
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
228
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
228
        for (const auto& id : addModuleIDs) {
2768
68
            operations.push_back({ modules.at(id), operations[0].second});
2769
68
        }
2770
228
    }
2771
228
#endif
2772
2773
228
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
228
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
986
    for (size_t i = 0; i < operations.size(); i++) {
2781
758
        auto& operation = operations[i];
2782
2783
758
        auto& module = operation.first;
2784
758
        auto& op = operation.second;
2785
2786
758
        if ( i > 0 ) {
2787
654
            auto& prevModule = operations[i-1].first;
2788
654
            auto& prevOp = operations[i].second;
2789
2790
654
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
476
                auto& curModifier = op.modifier.GetVectorPtr();
2792
476
                if ( curModifier.size() == 0 ) {
2793
168k
                    for (size_t j = 0; j < 512; j++) {
2794
168k
                        curModifier.push_back(1);
2795
168k
                    }
2796
329
                } else {
2797
735
                    for (auto& c : curModifier) {
2798
735
                        c++;
2799
735
                    }
2800
147
                }
2801
476
            }
2802
654
        }
2803
2804
758
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
758
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
758
        const auto& result = results.back();
2811
2812
758
        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
758
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
758
        if ( options.disableTests == false ) {
2830
758
            tests::test(op, result.second);
2831
758
        }
2832
2833
758
        postprocess(module, op, result);
2834
758
    }
2835
2836
228
    if ( options.noCompare == false ) {
2837
104
        compare(operations, results, data, size);
2838
104
    }
2839
228
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.66k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.66k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.66k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.45k
    do {
2725
5.45k
        auto op = getOp(&parentDs, data, size);
2726
5.45k
        auto module = getModule(parentDs);
2727
5.45k
        if ( module == nullptr ) {
2728
3.19k
            continue;
2729
3.19k
        }
2730
2731
2.25k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.25k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
44
            break;
2736
44
        }
2737
5.41k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.66k
    if ( operations.empty() == true ) {
2740
57
        return;
2741
57
    }
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.92k
        for (const auto& m : modules ) {
2748
2.92k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.92k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.92k
            moduleIDs.insert(moduleID);
2756
2.92k
        }
2757
2758
1.60k
        std::set<uint64_t> operationModuleIDs;
2759
2.13k
        for (const auto& op : operations) {
2760
2.13k
            operationModuleIDs.insert(op.first->ID);
2761
2.13k
        }
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.43k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.43k
        }
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
5.17k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.57k
        auto& operation = operations[i];
2782
2783
3.57k
        auto& module = operation.first;
2784
3.57k
        auto& op = operation.second;
2785
2786
3.57k
        if ( i > 0 ) {
2787
2.11k
            auto& prevModule = operations[i-1].first;
2788
2.11k
            auto& prevOp = operations[i].second;
2789
2790
2.11k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
635
                auto& curModifier = op.modifier.GetVectorPtr();
2792
635
                if ( curModifier.size() == 0 ) {
2793
245k
                    for (size_t j = 0; j < 512; j++) {
2794
245k
                        curModifier.push_back(1);
2795
245k
                    }
2796
479
                } else {
2797
13.5k
                    for (auto& c : curModifier) {
2798
13.5k
                        c++;
2799
13.5k
                    }
2800
156
                }
2801
635
            }
2802
2.11k
        }
2803
2804
3.57k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.57k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.57k
        const auto& result = results.back();
2811
2812
3.57k
        if ( result.second != std::nullopt ) {
2813
1.09k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.09k
        }
2820
2821
3.57k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.57k
        if ( options.disableTests == false ) {
2830
3.57k
            tests::test(op, result.second);
2831
3.57k
        }
2832
2833
3.57k
        postprocess(module, op, result);
2834
3.57k
    }
2835
2836
1.60k
    if ( options.noCompare == false ) {
2837
1.46k
        compare(operations, results, data, size);
2838
1.46k
    }
2839
1.60k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.01k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.01k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.01k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.32k
    do {
2725
4.32k
        auto op = getOp(&parentDs, data, size);
2726
4.32k
        auto module = getModule(parentDs);
2727
4.32k
        if ( module == nullptr ) {
2728
2.94k
            continue;
2729
2.94k
        }
2730
2731
1.37k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.37k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
29
            break;
2736
29
        }
2737
4.29k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.01k
    if ( operations.empty() == true ) {
2740
26
        return;
2741
26
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
989
#if 1
2745
989
    {
2746
989
        std::set<uint64_t> moduleIDs;
2747
1.70k
        for (const auto& m : modules ) {
2748
1.70k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.70k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.70k
            moduleIDs.insert(moduleID);
2756
1.70k
        }
2757
2758
989
        std::set<uint64_t> operationModuleIDs;
2759
1.22k
        for (const auto& op : operations) {
2760
1.22k
            operationModuleIDs.insert(op.first->ID);
2761
1.22k
        }
2762
2763
989
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
989
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
989
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
989
        for (const auto& id : addModuleIDs) {
2768
824
            operations.push_back({ modules.at(id), operations[0].second});
2769
824
        }
2770
989
    }
2771
989
#endif
2772
2773
989
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
989
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.03k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.05k
        auto& operation = operations[i];
2782
2783
2.05k
        auto& module = operation.first;
2784
2.05k
        auto& op = operation.second;
2785
2786
2.05k
        if ( i > 0 ) {
2787
1.19k
            auto& prevModule = operations[i-1].first;
2788
1.19k
            auto& prevOp = operations[i].second;
2789
2790
1.19k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
331
                auto& curModifier = op.modifier.GetVectorPtr();
2792
331
                if ( curModifier.size() == 0 ) {
2793
118k
                    for (size_t j = 0; j < 512; j++) {
2794
118k
                        curModifier.push_back(1);
2795
118k
                    }
2796
231
                } else {
2797
675
                    for (auto& c : curModifier) {
2798
675
                        c++;
2799
675
                    }
2800
100
                }
2801
331
            }
2802
1.19k
        }
2803
2804
2.05k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.05k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.05k
        const auto& result = results.back();
2811
2812
2.05k
        if ( result.second != std::nullopt ) {
2813
1.48k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
1.48k
        }
2820
2821
2.05k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2.05k
        if ( options.disableTests == false ) {
2830
2.05k
            tests::test(op, result.second);
2831
2.05k
        }
2832
2833
2.05k
        postprocess(module, op, result);
2834
2.05k
    }
2835
2836
989
    if ( options.noCompare == false ) {
2837
852
        compare(operations, results, data, size);
2838
852
    }
2839
989
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.77k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.77k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.77k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.88k
    do {
2725
4.88k
        auto op = getOp(&parentDs, data, size);
2726
4.88k
        auto module = getModule(parentDs);
2727
4.88k
        if ( module == nullptr ) {
2728
2.88k
            continue;
2729
2.88k
        }
2730
2731
2.00k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.00k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
31
            break;
2736
31
        }
2737
4.85k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.77k
    if ( operations.empty() == true ) {
2740
47
        return;
2741
47
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.72k
#if 1
2745
1.72k
    {
2746
1.72k
        std::set<uint64_t> moduleIDs;
2747
3.08k
        for (const auto& m : modules ) {
2748
3.08k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.08k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.08k
            moduleIDs.insert(moduleID);
2756
3.08k
        }
2757
2758
1.72k
        std::set<uint64_t> operationModuleIDs;
2759
1.87k
        for (const auto& op : operations) {
2760
1.87k
            operationModuleIDs.insert(op.first->ID);
2761
1.87k
        }
2762
2763
1.72k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.72k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.72k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.72k
        for (const auto& id : addModuleIDs) {
2768
1.51k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.51k
        }
2770
1.72k
    }
2771
1.72k
#endif
2772
2773
1.72k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.72k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
5.11k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.39k
        auto& operation = operations[i];
2782
2783
3.39k
        auto& module = operation.first;
2784
3.39k
        auto& op = operation.second;
2785
2786
3.39k
        if ( i > 0 ) {
2787
1.85k
            auto& prevModule = operations[i-1].first;
2788
1.85k
            auto& prevOp = operations[i].second;
2789
2790
1.85k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
294
                auto& curModifier = op.modifier.GetVectorPtr();
2792
294
                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
20.3k
                    for (auto& c : curModifier) {
2798
20.3k
                        c++;
2799
20.3k
                    }
2800
78
                }
2801
294
            }
2802
1.85k
        }
2803
2804
3.39k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.39k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.39k
        const auto& result = results.back();
2811
2812
3.39k
        if ( result.second != std::nullopt ) {
2813
751
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
751
        }
2820
2821
3.39k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.39k
        if ( options.disableTests == false ) {
2830
3.39k
            tests::test(op, result.second);
2831
3.39k
        }
2832
2833
3.39k
        postprocess(module, op, result);
2834
3.39k
    }
2835
2836
1.72k
    if ( options.noCompare == false ) {
2837
1.54k
        compare(operations, results, data, size);
2838
1.54k
    }
2839
1.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
197
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
197
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
197
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.64k
    do {
2725
4.64k
        auto op = getOp(&parentDs, data, size);
2726
4.64k
        auto module = getModule(parentDs);
2727
4.64k
        if ( module == nullptr ) {
2728
4.29k
            continue;
2729
4.29k
        }
2730
2731
350
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
350
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
4.63k
    } while ( parentDs.Get<bool>() == true );
2738
2739
197
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
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
150
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
150
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
150
            moduleIDs.insert(moduleID);
2756
150
        }
2757
2758
176
        std::set<uint64_t> operationModuleIDs;
2759
217
        for (const auto& op : operations) {
2760
217
            operationModuleIDs.insert(op.first->ID);
2761
217
        }
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
54
            operations.push_back({ modules.at(id), operations[0].second});
2769
54
        }
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
447
    for (size_t i = 0; i < operations.size(); i++) {
2781
271
        auto& operation = operations[i];
2782
2783
271
        auto& module = operation.first;
2784
271
        auto& op = operation.second;
2785
2786
271
        if ( i > 0 ) {
2787
196
            auto& prevModule = operations[i-1].first;
2788
196
            auto& prevOp = operations[i].second;
2789
2790
196
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
109
                auto& curModifier = op.modifier.GetVectorPtr();
2792
109
                if ( curModifier.size() == 0 ) {
2793
30.7k
                    for (size_t j = 0; j < 512; j++) {
2794
30.7k
                        curModifier.push_back(1);
2795
30.7k
                    }
2796
60
                } else {
2797
1.34k
                    for (auto& c : curModifier) {
2798
1.34k
                        c++;
2799
1.34k
                    }
2800
49
                }
2801
109
            }
2802
196
        }
2803
2804
271
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
271
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
271
        const auto& result = results.back();
2811
2812
271
        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
271
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
271
        if ( options.disableTests == false ) {
2830
271
            tests::test(op, result.second);
2831
271
        }
2832
2833
271
        postprocess(module, op, result);
2834
271
    }
2835
2836
176
    if ( options.noCompare == false ) {
2837
75
        compare(operations, results, data, size);
2838
75
    }
2839
176
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
969
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
969
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
969
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.68k
    do {
2725
5.68k
        auto op = getOp(&parentDs, data, size);
2726
5.68k
        auto module = getModule(parentDs);
2727
5.68k
        if ( module == nullptr ) {
2728
3.81k
            continue;
2729
3.81k
        }
2730
2731
1.87k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.87k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
78
            break;
2736
78
        }
2737
5.60k
    } while ( parentDs.Get<bool>() == true );
2738
2739
969
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
948
#if 1
2745
948
    {
2746
948
        std::set<uint64_t> moduleIDs;
2747
1.68k
        for (const auto& m : modules ) {
2748
1.68k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.68k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.68k
            moduleIDs.insert(moduleID);
2756
1.68k
        }
2757
2758
948
        std::set<uint64_t> operationModuleIDs;
2759
1.71k
        for (const auto& op : operations) {
2760
1.71k
            operationModuleIDs.insert(op.first->ID);
2761
1.71k
        }
2762
2763
948
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
948
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
948
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
948
        for (const auto& id : addModuleIDs) {
2768
818
            operations.push_back({ modules.at(id), operations[0].second});
2769
818
        }
2770
948
    }
2771
948
#endif
2772
2773
948
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
948
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.48k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.53k
        auto& operation = operations[i];
2782
2783
2.53k
        auto& module = operation.first;
2784
2.53k
        auto& op = operation.second;
2785
2786
2.53k
        if ( i > 0 ) {
2787
1.69k
            auto& prevModule = operations[i-1].first;
2788
1.69k
            auto& prevOp = operations[i].second;
2789
2790
1.69k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
837
                auto& curModifier = op.modifier.GetVectorPtr();
2792
837
                if ( curModifier.size() == 0 ) {
2793
273k
                    for (size_t j = 0; j < 512; j++) {
2794
273k
                        curModifier.push_back(1);
2795
273k
                    }
2796
534
                } else {
2797
29.6k
                    for (auto& c : curModifier) {
2798
29.6k
                        c++;
2799
29.6k
                    }
2800
303
                }
2801
837
            }
2802
1.69k
        }
2803
2804
2.53k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.53k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.53k
        const auto& result = results.back();
2811
2812
2.53k
        if ( result.second != std::nullopt ) {
2813
1.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
1.17k
        }
2820
2821
2.53k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.53k
        if ( options.disableTests == false ) {
2830
2.53k
            tests::test(op, result.second);
2831
2.53k
        }
2832
2833
2.53k
        postprocess(module, op, result);
2834
2.53k
    }
2835
2836
948
    if ( options.noCompare == false ) {
2837
843
        compare(operations, results, data, size);
2838
843
    }
2839
948
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
411
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
411
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
411
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.55k
    do {
2725
4.55k
        auto op = getOp(&parentDs, data, size);
2726
4.55k
        auto module = getModule(parentDs);
2727
4.55k
        if ( module == nullptr ) {
2728
3.86k
            continue;
2729
3.86k
        }
2730
2731
687
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
687
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
17
            break;
2736
17
        }
2737
4.53k
    } while ( parentDs.Get<bool>() == true );
2738
2739
411
    if ( operations.empty() == true ) {
2740
25
        return;
2741
25
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
386
#if 1
2745
386
    {
2746
386
        std::set<uint64_t> moduleIDs;
2747
540
        for (const auto& m : modules ) {
2748
540
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
540
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
540
            moduleIDs.insert(moduleID);
2756
540
        }
2757
2758
386
        std::set<uint64_t> operationModuleIDs;
2759
551
        for (const auto& op : operations) {
2760
551
            operationModuleIDs.insert(op.first->ID);
2761
551
        }
2762
2763
386
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
386
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
386
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
386
        for (const auto& id : addModuleIDs) {
2768
248
            operations.push_back({ modules.at(id), operations[0].second});
2769
248
        }
2770
386
    }
2771
386
#endif
2772
2773
386
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
386
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.18k
    for (size_t i = 0; i < operations.size(); i++) {
2781
799
        auto& operation = operations[i];
2782
2783
799
        auto& module = operation.first;
2784
799
        auto& op = operation.second;
2785
2786
799
        if ( i > 0 ) {
2787
529
            auto& prevModule = operations[i-1].first;
2788
529
            auto& prevOp = operations[i].second;
2789
2790
529
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
246
                auto& curModifier = op.modifier.GetVectorPtr();
2792
246
                if ( curModifier.size() == 0 ) {
2793
58.4k
                    for (size_t j = 0; j < 512; j++) {
2794
58.3k
                        curModifier.push_back(1);
2795
58.3k
                    }
2796
132
                } else {
2797
13.3k
                    for (auto& c : curModifier) {
2798
13.3k
                        c++;
2799
13.3k
                    }
2800
132
                }
2801
246
            }
2802
529
        }
2803
2804
799
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
799
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
799
        const auto& result = results.back();
2811
2812
799
        if ( result.second != std::nullopt ) {
2813
119
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
119
        }
2820
2821
799
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
799
        if ( options.disableTests == false ) {
2830
799
            tests::test(op, result.second);
2831
799
        }
2832
2833
799
        postprocess(module, op, result);
2834
799
    }
2835
2836
386
    if ( options.noCompare == false ) {
2837
270
        compare(operations, results, data, size);
2838
270
    }
2839
386
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
204
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
204
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
204
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.11k
    do {
2725
4.11k
        auto op = getOp(&parentDs, data, size);
2726
4.11k
        auto module = getModule(parentDs);
2727
4.11k
        if ( module == nullptr ) {
2728
3.74k
            continue;
2729
3.74k
        }
2730
2731
378
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
378
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
4.10k
    } while ( parentDs.Get<bool>() == true );
2738
2739
204
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
192
#if 1
2745
192
    {
2746
192
        std::set<uint64_t> moduleIDs;
2747
192
        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
192
        std::set<uint64_t> operationModuleIDs;
2759
234
        for (const auto& op : operations) {
2760
234
            operationModuleIDs.insert(op.first->ID);
2761
234
        }
2762
2763
192
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
192
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
192
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
192
        for (const auto& id : addModuleIDs) {
2768
51
            operations.push_back({ modules.at(id), operations[0].second});
2769
51
        }
2770
192
    }
2771
192
#endif
2772
2773
192
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
192
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
477
    for (size_t i = 0; i < operations.size(); i++) {
2781
285
        auto& operation = operations[i];
2782
2783
285
        auto& module = operation.first;
2784
285
        auto& op = operation.second;
2785
2786
285
        if ( i > 0 ) {
2787
203
            auto& prevModule = operations[i-1].first;
2788
203
            auto& prevOp = operations[i].second;
2789
2790
203
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
105
                auto& curModifier = op.modifier.GetVectorPtr();
2792
105
                if ( curModifier.size() == 0 ) {
2793
26.1k
                    for (size_t j = 0; j < 512; j++) {
2794
26.1k
                        curModifier.push_back(1);
2795
26.1k
                    }
2796
54
                } else {
2797
827
                    for (auto& c : curModifier) {
2798
827
                        c++;
2799
827
                    }
2800
54
                }
2801
105
            }
2802
203
        }
2803
2804
285
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
285
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
285
        const auto& result = results.back();
2811
2812
285
        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
285
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
285
        if ( options.disableTests == false ) {
2830
285
            tests::test(op, result.second);
2831
285
        }
2832
2833
285
        postprocess(module, op, result);
2834
285
    }
2835
2836
192
    if ( options.noCompare == false ) {
2837
82
        compare(operations, results, data, size);
2838
82
    }
2839
192
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
192
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
192
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
192
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.04k
    do {
2725
4.04k
        auto op = getOp(&parentDs, data, size);
2726
4.04k
        auto module = getModule(parentDs);
2727
4.04k
        if ( module == nullptr ) {
2728
3.71k
            continue;
2729
3.71k
        }
2730
2731
327
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
327
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
4.03k
    } while ( parentDs.Get<bool>() == true );
2738
2739
192
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
179
#if 1
2745
179
    {
2746
179
        std::set<uint64_t> moduleIDs;
2747
179
        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
179
        std::set<uint64_t> operationModuleIDs;
2759
190
        for (const auto& op : operations) {
2760
190
            operationModuleIDs.insert(op.first->ID);
2761
190
        }
2762
2763
179
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
179
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
179
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
179
        for (const auto& id : addModuleIDs) {
2768
49
            operations.push_back({ modules.at(id), operations[0].second});
2769
49
        }
2770
179
    }
2771
179
#endif
2772
2773
179
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
179
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
418
    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
172
            auto& prevModule = operations[i-1].first;
2788
172
            auto& prevOp = operations[i].second;
2789
2790
172
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
93
                auto& curModifier = op.modifier.GetVectorPtr();
2792
93
                if ( curModifier.size() == 0 ) {
2793
22.5k
                    for (size_t j = 0; j < 512; j++) {
2794
22.5k
                        curModifier.push_back(1);
2795
22.5k
                    }
2796
49
                } else {
2797
609
                    for (auto& c : curModifier) {
2798
609
                        c++;
2799
609
                    }
2800
49
                }
2801
93
            }
2802
172
        }
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
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
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
179
    if ( options.noCompare == false ) {
2837
67
        compare(operations, results, data, size);
2838
67
    }
2839
179
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
169
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
169
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
169
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.77k
    do {
2725
4.77k
        auto op = getOp(&parentDs, data, size);
2726
4.77k
        auto module = getModule(parentDs);
2727
4.77k
        if ( module == nullptr ) {
2728
4.45k
            continue;
2729
4.45k
        }
2730
2731
320
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
320
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
4.75k
    } while ( parentDs.Get<bool>() == true );
2738
2739
169
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
159
#if 1
2745
159
    {
2746
159
        std::set<uint64_t> moduleIDs;
2747
159
        for (const auto& m : modules ) {
2748
128
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
128
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
128
            moduleIDs.insert(moduleID);
2756
128
        }
2757
2758
159
        std::set<uint64_t> operationModuleIDs;
2759
196
        for (const auto& op : operations) {
2760
196
            operationModuleIDs.insert(op.first->ID);
2761
196
        }
2762
2763
159
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
159
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
159
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
159
        for (const auto& id : addModuleIDs) {
2768
45
            operations.push_back({ modules.at(id), operations[0].second});
2769
45
        }
2770
159
    }
2771
159
#endif
2772
2773
159
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
159
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
400
    for (size_t i = 0; i < operations.size(); i++) {
2781
241
        auto& operation = operations[i];
2782
2783
241
        auto& module = operation.first;
2784
241
        auto& op = operation.second;
2785
2786
241
        if ( i > 0 ) {
2787
177
            auto& prevModule = operations[i-1].first;
2788
177
            auto& prevOp = operations[i].second;
2789
2790
177
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
101
                auto& curModifier = op.modifier.GetVectorPtr();
2792
101
                if ( curModifier.size() == 0 ) {
2793
21.0k
                    for (size_t j = 0; j < 512; j++) {
2794
20.9k
                        curModifier.push_back(1);
2795
20.9k
                    }
2796
60
                } else {
2797
1.65k
                    for (auto& c : curModifier) {
2798
1.65k
                        c++;
2799
1.65k
                    }
2800
60
                }
2801
101
            }
2802
177
        }
2803
2804
241
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
241
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
241
        const auto& result = results.back();
2811
2812
241
        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
241
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
241
        if ( options.disableTests == false ) {
2830
241
            tests::test(op, result.second);
2831
241
        }
2832
2833
241
        postprocess(module, op, result);
2834
241
    }
2835
2836
159
    if ( options.noCompare == false ) {
2837
64
        compare(operations, results, data, size);
2838
64
    }
2839
159
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
591
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
591
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
591
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.95k
    do {
2725
3.95k
        auto op = getOp(&parentDs, data, size);
2726
3.95k
        auto module = getModule(parentDs);
2727
3.95k
        if ( module == nullptr ) {
2728
2.80k
            continue;
2729
2.80k
        }
2730
2731
1.14k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.14k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
25
            break;
2736
25
        }
2737
3.93k
    } while ( parentDs.Get<bool>() == true );
2738
2739
591
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
578
#if 1
2745
578
    {
2746
578
        std::set<uint64_t> moduleIDs;
2747
962
        for (const auto& m : modules ) {
2748
962
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
962
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
962
            moduleIDs.insert(moduleID);
2756
962
        }
2757
2758
578
        std::set<uint64_t> operationModuleIDs;
2759
1.03k
        for (const auto& op : operations) {
2760
1.03k
            operationModuleIDs.insert(op.first->ID);
2761
1.03k
        }
2762
2763
578
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
578
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
578
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
578
        for (const auto& id : addModuleIDs) {
2768
454
            operations.push_back({ modules.at(id), operations[0].second});
2769
454
        }
2770
578
    }
2771
578
#endif
2772
2773
578
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
578
    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.49k
        auto& operation = operations[i];
2782
2783
1.49k
        auto& module = operation.first;
2784
1.49k
        auto& op = operation.second;
2785
2786
1.49k
        if ( i > 0 ) {
2787
1.01k
            auto& prevModule = operations[i-1].first;
2788
1.01k
            auto& prevOp = operations[i].second;
2789
2790
1.01k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
515
                auto& curModifier = op.modifier.GetVectorPtr();
2792
515
                if ( curModifier.size() == 0 ) {
2793
164k
                    for (size_t j = 0; j < 512; j++) {
2794
164k
                        curModifier.push_back(1);
2795
164k
                    }
2796
321
                } else {
2797
1.08k
                    for (auto& c : curModifier) {
2798
1.08k
                        c++;
2799
1.08k
                    }
2800
194
                }
2801
515
            }
2802
1.01k
        }
2803
2804
1.49k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.49k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.49k
        const auto& result = results.back();
2811
2812
1.49k
        if ( result.second != std::nullopt ) {
2813
790
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
790
        }
2820
2821
1.49k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.49k
        if ( options.disableTests == false ) {
2830
1.49k
            tests::test(op, result.second);
2831
1.49k
        }
2832
2833
1.49k
        postprocess(module, op, result);
2834
1.49k
    }
2835
2836
578
    if ( options.noCompare == false ) {
2837
481
        compare(operations, results, data, size);
2838
481
    }
2839
578
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
438
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
438
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
438
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.59k
    do {
2725
5.59k
        auto op = getOp(&parentDs, data, size);
2726
5.59k
        auto module = getModule(parentDs);
2727
5.59k
        if ( module == nullptr ) {
2728
4.87k
            continue;
2729
4.87k
        }
2730
2731
722
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
722
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
5.58k
    } while ( parentDs.Get<bool>() == true );
2738
2739
438
    if ( operations.empty() == true ) {
2740
19
        return;
2741
19
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
419
#if 1
2745
419
    {
2746
419
        std::set<uint64_t> moduleIDs;
2747
648
        for (const auto& m : modules ) {
2748
648
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
648
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
648
            moduleIDs.insert(moduleID);
2756
648
        }
2757
2758
419
        std::set<uint64_t> operationModuleIDs;
2759
599
        for (const auto& op : operations) {
2760
599
            operationModuleIDs.insert(op.first->ID);
2761
599
        }
2762
2763
419
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
419
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
419
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
419
        for (const auto& id : addModuleIDs) {
2768
301
            operations.push_back({ modules.at(id), operations[0].second});
2769
301
        }
2770
419
    }
2771
419
#endif
2772
2773
419
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
419
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.31k
    for (size_t i = 0; i < operations.size(); i++) {
2781
900
        auto& operation = operations[i];
2782
2783
900
        auto& module = operation.first;
2784
900
        auto& op = operation.second;
2785
2786
900
        if ( i > 0 ) {
2787
576
            auto& prevModule = operations[i-1].first;
2788
576
            auto& prevOp = operations[i].second;
2789
2790
576
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
239
                auto& curModifier = op.modifier.GetVectorPtr();
2792
239
                if ( curModifier.size() == 0 ) {
2793
72.3k
                    for (size_t j = 0; j < 512; j++) {
2794
72.1k
                        curModifier.push_back(1);
2795
72.1k
                    }
2796
141
                } else {
2797
4.50k
                    for (auto& c : curModifier) {
2798
4.50k
                        c++;
2799
4.50k
                    }
2800
98
                }
2801
239
            }
2802
576
        }
2803
2804
900
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
900
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
900
        const auto& result = results.back();
2811
2812
900
        if ( result.second != std::nullopt ) {
2813
274
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
274
        }
2820
2821
900
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
900
        if ( options.disableTests == false ) {
2830
900
            tests::test(op, result.second);
2831
900
        }
2832
2833
900
        postprocess(module, op, result);
2834
900
    }
2835
2836
419
    if ( options.noCompare == false ) {
2837
324
        compare(operations, results, data, size);
2838
324
    }
2839
419
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
178
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
178
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
178
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.88k
    do {
2725
3.88k
        auto op = getOp(&parentDs, data, size);
2726
3.88k
        auto module = getModule(parentDs);
2727
3.88k
        if ( module == nullptr ) {
2728
3.54k
            continue;
2729
3.54k
        }
2730
2731
344
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
344
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
3.87k
    } while ( parentDs.Get<bool>() == true );
2738
2739
178
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
165
#if 1
2745
165
    {
2746
165
        std::set<uint64_t> moduleIDs;
2747
165
        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
165
        std::set<uint64_t> operationModuleIDs;
2759
190
        for (const auto& op : operations) {
2760
190
            operationModuleIDs.insert(op.first->ID);
2761
190
        }
2762
2763
165
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
165
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
165
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
165
        for (const auto& id : addModuleIDs) {
2768
45
            operations.push_back({ modules.at(id), operations[0].second});
2769
45
        }
2770
165
    }
2771
165
#endif
2772
2773
165
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
165
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
400
    for (size_t i = 0; i < operations.size(); i++) {
2781
235
        auto& operation = operations[i];
2782
2783
235
        auto& module = operation.first;
2784
235
        auto& op = operation.second;
2785
2786
235
        if ( i > 0 ) {
2787
169
            auto& prevModule = operations[i-1].first;
2788
169
            auto& prevOp = operations[i].second;
2789
2790
169
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
87
                auto& curModifier = op.modifier.GetVectorPtr();
2792
87
                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
52
                } else {
2797
1.54k
                    for (auto& c : curModifier) {
2798
1.54k
                        c++;
2799
1.54k
                    }
2800
52
                }
2801
87
            }
2802
169
        }
2803
2804
235
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
235
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
235
        const auto& result = results.back();
2811
2812
235
        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
235
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
235
        if ( options.disableTests == false ) {
2830
235
            tests::test(op, result.second);
2831
235
        }
2832
2833
235
        postprocess(module, op, result);
2834
235
    }
2835
2836
165
    if ( options.noCompare == false ) {
2837
66
        compare(operations, results, data, size);
2838
66
    }
2839
165
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
169
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
169
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
169
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.51k
    do {
2725
4.51k
        auto op = getOp(&parentDs, data, size);
2726
4.51k
        auto module = getModule(parentDs);
2727
4.51k
        if ( module == nullptr ) {
2728
4.21k
            continue;
2729
4.21k
        }
2730
2731
307
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
307
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
4.50k
    } while ( parentDs.Get<bool>() == true );
2738
2739
169
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
157
#if 1
2745
157
    {
2746
157
        std::set<uint64_t> moduleIDs;
2747
157
        for (const auto& m : modules ) {
2748
128
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
128
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
128
            moduleIDs.insert(moduleID);
2756
128
        }
2757
2758
157
        std::set<uint64_t> operationModuleIDs;
2759
187
        for (const auto& op : operations) {
2760
187
            operationModuleIDs.insert(op.first->ID);
2761
187
        }
2762
2763
157
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
157
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
157
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
157
        for (const auto& id : addModuleIDs) {
2768
41
            operations.push_back({ modules.at(id), operations[0].second});
2769
41
        }
2770
157
    }
2771
157
#endif
2772
2773
157
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
157
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
385
    for (size_t i = 0; i < operations.size(); i++) {
2781
228
        auto& operation = operations[i];
2782
2783
228
        auto& module = operation.first;
2784
228
        auto& op = operation.second;
2785
2786
228
        if ( i > 0 ) {
2787
164
            auto& prevModule = operations[i-1].first;
2788
164
            auto& prevOp = operations[i].second;
2789
2790
164
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
88
                auto& curModifier = op.modifier.GetVectorPtr();
2792
88
                if ( curModifier.size() == 0 ) {
2793
25.1k
                    for (size_t j = 0; j < 512; j++) {
2794
25.0k
                        curModifier.push_back(1);
2795
25.0k
                    }
2796
49
                } else {
2797
3.15k
                    for (auto& c : curModifier) {
2798
3.15k
                        c++;
2799
3.15k
                    }
2800
39
                }
2801
88
            }
2802
164
        }
2803
2804
228
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
228
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
228
        const auto& result = results.back();
2811
2812
228
        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
228
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
228
        if ( options.disableTests == false ) {
2830
228
            tests::test(op, result.second);
2831
228
        }
2832
2833
228
        postprocess(module, op, result);
2834
228
    }
2835
2836
157
    if ( options.noCompare == false ) {
2837
64
        compare(operations, results, data, size);
2838
64
    }
2839
157
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.12k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.12k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.12k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
6.44k
    do {
2725
6.44k
        auto op = getOp(&parentDs, data, size);
2726
6.44k
        auto module = getModule(parentDs);
2727
6.44k
        if ( module == nullptr ) {
2728
4.70k
            continue;
2729
4.70k
        }
2730
2731
1.74k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.74k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
38
            break;
2736
38
        }
2737
6.40k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.12k
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.11k
#if 1
2745
1.11k
    {
2746
1.11k
        std::set<uint64_t> moduleIDs;
2747
2.02k
        for (const auto& m : modules ) {
2748
2.02k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.02k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.02k
            moduleIDs.insert(moduleID);
2756
2.02k
        }
2757
2758
1.11k
        std::set<uint64_t> operationModuleIDs;
2759
1.60k
        for (const auto& op : operations) {
2760
1.60k
            operationModuleIDs.insert(op.first->ID);
2761
1.60k
        }
2762
2763
1.11k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.11k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.11k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.11k
        for (const auto& id : addModuleIDs) {
2768
991
            operations.push_back({ modules.at(id), operations[0].second});
2769
991
        }
2770
1.11k
    }
2771
1.11k
#endif
2772
2773
1.11k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.11k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.71k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.60k
        auto& operation = operations[i];
2782
2783
2.60k
        auto& module = operation.first;
2784
2.60k
        auto& op = operation.second;
2785
2786
2.60k
        if ( i > 0 ) {
2787
1.58k
            auto& prevModule = operations[i-1].first;
2788
1.58k
            auto& prevOp = operations[i].second;
2789
2790
1.58k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
564
                auto& curModifier = op.modifier.GetVectorPtr();
2792
564
                if ( curModifier.size() == 0 ) {
2793
213k
                    for (size_t j = 0; j < 512; j++) {
2794
212k
                        curModifier.push_back(1);
2795
212k
                    }
2796
416
                } else {
2797
1.55k
                    for (auto& c : curModifier) {
2798
1.55k
                        c++;
2799
1.55k
                    }
2800
148
                }
2801
564
            }
2802
1.58k
        }
2803
2804
2.60k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.60k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.60k
        const auto& result = results.back();
2811
2812
2.60k
        if ( result.second != std::nullopt ) {
2813
986
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
986
        }
2820
2821
2.60k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.60k
        if ( options.disableTests == false ) {
2830
2.60k
            tests::test(op, result.second);
2831
2.60k
        }
2832
2833
2.60k
        postprocess(module, op, result);
2834
2.60k
    }
2835
2836
1.11k
    if ( options.noCompare == false ) {
2837
1.01k
        compare(operations, results, data, size);
2838
1.01k
    }
2839
1.11k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
457
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
457
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
457
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.07k
    do {
2725
5.07k
        auto op = getOp(&parentDs, data, size);
2726
5.07k
        auto module = getModule(parentDs);
2727
5.07k
        if ( module == nullptr ) {
2728
4.10k
            continue;
2729
4.10k
        }
2730
2731
961
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
961
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
25
            break;
2736
25
        }
2737
5.04k
    } while ( parentDs.Get<bool>() == true );
2738
2739
457
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
446
#if 1
2745
446
    {
2746
446
        std::set<uint64_t> moduleIDs;
2747
678
        for (const auto& m : modules ) {
2748
678
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
678
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
678
            moduleIDs.insert(moduleID);
2756
678
        }
2757
2758
446
        std::set<uint64_t> operationModuleIDs;
2759
810
        for (const auto& op : operations) {
2760
810
            operationModuleIDs.insert(op.first->ID);
2761
810
        }
2762
2763
446
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
446
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
446
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
446
        for (const auto& id : addModuleIDs) {
2768
310
            operations.push_back({ modules.at(id), operations[0].second});
2769
310
        }
2770
446
    }
2771
446
#endif
2772
2773
446
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
446
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.56k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.12k
        auto& operation = operations[i];
2782
2783
1.12k
        auto& module = operation.first;
2784
1.12k
        auto& op = operation.second;
2785
2786
1.12k
        if ( i > 0 ) {
2787
781
            auto& prevModule = operations[i-1].first;
2788
781
            auto& prevOp = operations[i].second;
2789
2790
781
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
428
                auto& curModifier = op.modifier.GetVectorPtr();
2792
428
                if ( curModifier.size() == 0 ) {
2793
136k
                    for (size_t j = 0; j < 512; j++) {
2794
136k
                        curModifier.push_back(1);
2795
136k
                    }
2796
266
                } else {
2797
4.48k
                    for (auto& c : curModifier) {
2798
4.48k
                        c++;
2799
4.48k
                    }
2800
162
                }
2801
428
            }
2802
781
        }
2803
2804
1.12k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.12k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.12k
        const auto& result = results.back();
2811
2812
1.12k
        if ( result.second != std::nullopt ) {
2813
185
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
185
        }
2820
2821
1.12k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.12k
        if ( options.disableTests == false ) {
2830
1.12k
            tests::test(op, result.second);
2831
1.12k
        }
2832
2833
1.12k
        postprocess(module, op, result);
2834
1.12k
    }
2835
2836
446
    if ( options.noCompare == false ) {
2837
339
        compare(operations, results, data, size);
2838
339
    }
2839
446
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
280
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
280
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
280
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.84k
    do {
2725
4.84k
        auto op = getOp(&parentDs, data, size);
2726
4.84k
        auto module = getModule(parentDs);
2727
4.84k
        if ( module == nullptr ) {
2728
4.43k
            continue;
2729
4.43k
        }
2730
2731
409
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
409
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
16
            break;
2736
16
        }
2737
4.82k
    } while ( parentDs.Get<bool>() == true );
2738
2739
280
    if ( operations.empty() == true ) {
2740
19
        return;
2741
19
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
261
#if 1
2745
261
    {
2746
261
        std::set<uint64_t> moduleIDs;
2747
261
        for (const auto& m : modules ) {
2748
182
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
182
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
182
            moduleIDs.insert(moduleID);
2756
182
        }
2757
2758
261
        std::set<uint64_t> operationModuleIDs;
2759
261
        for (const auto& op : operations) {
2760
250
            operationModuleIDs.insert(op.first->ID);
2761
250
        }
2762
2763
261
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
261
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
261
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
261
        for (const auto& id : addModuleIDs) {
2768
68
            operations.push_back({ modules.at(id), operations[0].second});
2769
68
        }
2770
261
    }
2771
261
#endif
2772
2773
261
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
261
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
579
    for (size_t i = 0; i < operations.size(); i++) {
2781
318
        auto& operation = operations[i];
2782
2783
318
        auto& module = operation.first;
2784
318
        auto& op = operation.second;
2785
2786
318
        if ( i > 0 ) {
2787
227
            auto& prevModule = operations[i-1].first;
2788
227
            auto& prevOp = operations[i].second;
2789
2790
227
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
123
                auto& curModifier = op.modifier.GetVectorPtr();
2792
123
                if ( curModifier.size() == 0 ) {
2793
29.7k
                    for (size_t j = 0; j < 512; j++) {
2794
29.6k
                        curModifier.push_back(1);
2795
29.6k
                    }
2796
65
                } else {
2797
3.22k
                    for (auto& c : curModifier) {
2798
3.22k
                        c++;
2799
3.22k
                    }
2800
65
                }
2801
123
            }
2802
227
        }
2803
2804
318
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
318
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
318
        const auto& result = results.back();
2811
2812
318
        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
318
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
318
        if ( options.disableTests == false ) {
2830
318
            tests::test(op, result.second);
2831
318
        }
2832
2833
318
        postprocess(module, op, result);
2834
318
    }
2835
2836
261
    if ( options.noCompare == false ) {
2837
91
        compare(operations, results, data, size);
2838
91
    }
2839
261
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
330
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
330
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
330
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.92k
    do {
2725
2.92k
        auto op = getOp(&parentDs, data, size);
2726
2.92k
        auto module = getModule(parentDs);
2727
2.92k
        if ( module == nullptr ) {
2728
2.59k
            continue;
2729
2.59k
        }
2730
2731
328
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
328
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
2.91k
    } while ( parentDs.Get<bool>() == true );
2738
2739
330
    if ( operations.empty() == true ) {
2740
28
        return;
2741
28
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
302
#if 1
2745
302
    {
2746
302
        std::set<uint64_t> moduleIDs;
2747
302
        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
302
        std::set<uint64_t> operationModuleIDs;
2759
302
        for (const auto& op : operations) {
2760
195
            operationModuleIDs.insert(op.first->ID);
2761
195
        }
2762
2763
302
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
302
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
302
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
302
        for (const auto& id : addModuleIDs) {
2768
47
            operations.push_back({ modules.at(id), operations[0].second});
2769
47
        }
2770
302
    }
2771
302
#endif
2772
2773
302
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
302
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
544
    for (size_t i = 0; i < operations.size(); i++) {
2781
242
        auto& operation = operations[i];
2782
2783
242
        auto& module = operation.first;
2784
242
        auto& op = operation.second;
2785
2786
242
        if ( i > 0 ) {
2787
175
            auto& prevModule = operations[i-1].first;
2788
175
            auto& prevOp = operations[i].second;
2789
2790
175
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
94
                auto& curModifier = op.modifier.GetVectorPtr();
2792
94
                if ( curModifier.size() == 0 ) {
2793
26.6k
                    for (size_t j = 0; j < 512; j++) {
2794
26.6k
                        curModifier.push_back(1);
2795
26.6k
                    }
2796
52
                } else {
2797
875
                    for (auto& c : curModifier) {
2798
875
                        c++;
2799
875
                    }
2800
42
                }
2801
94
            }
2802
175
        }
2803
2804
242
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
242
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
242
        const auto& result = results.back();
2811
2812
242
        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
242
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
242
        if ( options.disableTests == false ) {
2830
242
            tests::test(op, result.second);
2831
242
        }
2832
2833
242
        postprocess(module, op, result);
2834
242
    }
2835
2836
302
    if ( options.noCompare == false ) {
2837
67
        compare(operations, results, data, size);
2838
67
    }
2839
302
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
347
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
347
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
347
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.79k
    do {
2725
4.79k
        auto op = getOp(&parentDs, data, size);
2726
4.79k
        auto module = getModule(parentDs);
2727
4.79k
        if ( module == nullptr ) {
2728
4.38k
            continue;
2729
4.38k
        }
2730
2731
410
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
410
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
17
            break;
2736
17
        }
2737
4.77k
    } while ( parentDs.Get<bool>() == true );
2738
2739
347
    if ( operations.empty() == true ) {
2740
20
        return;
2741
20
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
327
#if 1
2745
327
    {
2746
327
        std::set<uint64_t> moduleIDs;
2747
327
        for (const auto& m : modules ) {
2748
150
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
150
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
150
            moduleIDs.insert(moduleID);
2756
150
        }
2757
2758
327
        std::set<uint64_t> operationModuleIDs;
2759
327
        for (const auto& op : operations) {
2760
220
            operationModuleIDs.insert(op.first->ID);
2761
220
        }
2762
2763
327
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
327
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
327
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
327
        for (const auto& id : addModuleIDs) {
2768
53
            operations.push_back({ modules.at(id), operations[0].second});
2769
53
        }
2770
327
    }
2771
327
#endif
2772
2773
327
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
327
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
600
    for (size_t i = 0; i < operations.size(); i++) {
2781
273
        auto& operation = operations[i];
2782
2783
273
        auto& module = operation.first;
2784
273
        auto& op = operation.second;
2785
2786
273
        if ( i > 0 ) {
2787
198
            auto& prevModule = operations[i-1].first;
2788
198
            auto& prevOp = operations[i].second;
2789
2790
198
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
109
                auto& curModifier = op.modifier.GetVectorPtr();
2792
109
                if ( curModifier.size() == 0 ) {
2793
31.8k
                    for (size_t j = 0; j < 512; j++) {
2794
31.7k
                        curModifier.push_back(1);
2795
31.7k
                    }
2796
62
                } else {
2797
331
                    for (auto& c : curModifier) {
2798
331
                        c++;
2799
331
                    }
2800
47
                }
2801
109
            }
2802
198
        }
2803
2804
273
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
273
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
273
        const auto& result = results.back();
2811
2812
273
        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
273
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
273
        if ( options.disableTests == false ) {
2830
273
            tests::test(op, result.second);
2831
273
        }
2832
2833
273
        postprocess(module, op, result);
2834
273
    }
2835
2836
327
    if ( options.noCompare == false ) {
2837
75
        compare(operations, results, data, size);
2838
75
    }
2839
327
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
253
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
253
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
253
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.19k
    do {
2725
4.19k
        auto op = getOp(&parentDs, data, size);
2726
4.19k
        auto module = getModule(parentDs);
2727
4.19k
        if ( module == nullptr ) {
2728
3.80k
            continue;
2729
3.80k
        }
2730
2731
391
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
391
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
4.18k
    } while ( parentDs.Get<bool>() == true );
2738
2739
253
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
235
#if 1
2745
235
    {
2746
235
        std::set<uint64_t> moduleIDs;
2747
235
        for (const auto& m : modules ) {
2748
178
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
178
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
178
            moduleIDs.insert(moduleID);
2756
178
        }
2757
2758
235
        std::set<uint64_t> operationModuleIDs;
2759
235
        for (const auto& op : operations) {
2760
235
            operationModuleIDs.insert(op.first->ID);
2761
235
        }
2762
2763
235
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
235
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
235
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
235
        for (const auto& id : addModuleIDs) {
2768
67
            operations.push_back({ modules.at(id), operations[0].second});
2769
67
        }
2770
235
    }
2771
235
#endif
2772
2773
235
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
235
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
537
    for (size_t i = 0; i < operations.size(); i++) {
2781
302
        auto& operation = operations[i];
2782
2783
302
        auto& module = operation.first;
2784
302
        auto& op = operation.second;
2785
2786
302
        if ( i > 0 ) {
2787
213
            auto& prevModule = operations[i-1].first;
2788
213
            auto& prevOp = operations[i].second;
2789
2790
213
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
110
                auto& curModifier = op.modifier.GetVectorPtr();
2792
110
                if ( curModifier.size() == 0 ) {
2793
29.7k
                    for (size_t j = 0; j < 512; j++) {
2794
29.6k
                        curModifier.push_back(1);
2795
29.6k
                    }
2796
58
                } else {
2797
1.34k
                    for (auto& c : curModifier) {
2798
1.34k
                        c++;
2799
1.34k
                    }
2800
52
                }
2801
110
            }
2802
213
        }
2803
2804
302
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
302
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
302
        const auto& result = results.back();
2811
2812
302
        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
302
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
302
        if ( options.disableTests == false ) {
2830
302
            tests::test(op, result.second);
2831
302
        }
2832
2833
302
        postprocess(module, op, result);
2834
302
    }
2835
2836
235
    if ( options.noCompare == false ) {
2837
89
        compare(operations, results, data, size);
2838
89
    }
2839
235
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
260
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
260
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
260
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.85k
    do {
2725
3.85k
        auto op = getOp(&parentDs, data, size);
2726
3.85k
        auto module = getModule(parentDs);
2727
3.85k
        if ( module == nullptr ) {
2728
3.54k
            continue;
2729
3.54k
        }
2730
2731
310
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
310
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
3.84k
    } while ( parentDs.Get<bool>() == true );
2738
2739
260
    if ( operations.empty() == true ) {
2740
44
        return;
2741
44
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
216
#if 1
2745
216
    {
2746
216
        std::set<uint64_t> moduleIDs;
2747
216
        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
216
        std::set<uint64_t> operationModuleIDs;
2759
216
        for (const auto& op : operations) {
2760
177
            operationModuleIDs.insert(op.first->ID);
2761
177
        }
2762
2763
216
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
216
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
216
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
216
        for (const auto& id : addModuleIDs) {
2768
39
            operations.push_back({ modules.at(id), operations[0].second});
2769
39
        }
2770
216
    }
2771
216
#endif
2772
2773
216
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
216
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
432
    for (size_t i = 0; i < operations.size(); i++) {
2781
216
        auto& operation = operations[i];
2782
2783
216
        auto& module = operation.first;
2784
216
        auto& op = operation.second;
2785
2786
216
        if ( i > 0 ) {
2787
156
            auto& prevModule = operations[i-1].first;
2788
156
            auto& prevOp = operations[i].second;
2789
2790
156
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
84
                auto& curModifier = op.modifier.GetVectorPtr();
2792
84
                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
765
                    for (auto& c : curModifier) {
2798
765
                        c++;
2799
765
                    }
2800
39
                }
2801
84
            }
2802
156
        }
2803
2804
216
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
216
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
216
        const auto& result = results.back();
2811
2812
216
        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
216
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
216
        if ( options.disableTests == false ) {
2830
216
            tests::test(op, result.second);
2831
216
        }
2832
2833
216
        postprocess(module, op, result);
2834
216
    }
2835
2836
216
    if ( options.noCompare == false ) {
2837
60
        compare(operations, results, data, size);
2838
60
    }
2839
216
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::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
4.89k
    do {
2725
4.89k
        auto op = getOp(&parentDs, data, size);
2726
4.89k
        auto module = getModule(parentDs);
2727
4.89k
        if ( module == nullptr ) {
2728
4.47k
            continue;
2729
4.47k
        }
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
14
            break;
2736
14
        }
2737
4.88k
    } while ( parentDs.Get<bool>() == true );
2738
2739
229
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
214
#if 1
2745
214
    {
2746
214
        std::set<uint64_t> moduleIDs;
2747
214
        for (const auto& m : modules ) {
2748
166
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
166
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
166
            moduleIDs.insert(moduleID);
2756
166
        }
2757
2758
214
        std::set<uint64_t> operationModuleIDs;
2759
223
        for (const auto& op : operations) {
2760
223
            operationModuleIDs.insert(op.first->ID);
2761
223
        }
2762
2763
214
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
214
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
214
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
214
        for (const auto& id : addModuleIDs) {
2768
62
            operations.push_back({ modules.at(id), operations[0].second});
2769
62
        }
2770
214
    }
2771
214
#endif
2772
2773
214
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
214
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
499
    for (size_t i = 0; i < operations.size(); i++) {
2781
285
        auto& operation = operations[i];
2782
2783
285
        auto& module = operation.first;
2784
285
        auto& op = operation.second;
2785
2786
285
        if ( i > 0 ) {
2787
202
            auto& prevModule = operations[i-1].first;
2788
202
            auto& prevOp = operations[i].second;
2789
2790
202
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
107
                auto& curModifier = op.modifier.GetVectorPtr();
2792
107
                if ( curModifier.size() == 0 ) {
2793
25.1k
                    for (size_t j = 0; j < 512; j++) {
2794
25.0k
                        curModifier.push_back(1);
2795
25.0k
                    }
2796
58
                } else {
2797
624
                    for (auto& c : curModifier) {
2798
624
                        c++;
2799
624
                    }
2800
58
                }
2801
107
            }
2802
202
        }
2803
2804
285
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
285
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
285
        const auto& result = results.back();
2811
2812
285
        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
285
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
285
        if ( options.disableTests == false ) {
2830
285
            tests::test(op, result.second);
2831
285
        }
2832
2833
285
        postprocess(module, op, result);
2834
285
    }
2835
2836
214
    if ( options.noCompare == false ) {
2837
83
        compare(operations, results, data, size);
2838
83
    }
2839
214
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
234
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
234
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
234
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.01k
    do {
2725
5.01k
        auto op = getOp(&parentDs, data, size);
2726
5.01k
        auto module = getModule(parentDs);
2727
5.01k
        if ( module == nullptr ) {
2728
4.61k
            continue;
2729
4.61k
        }
2730
2731
402
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
402
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
5.00k
    } while ( parentDs.Get<bool>() == true );
2738
2739
234
    if ( operations.empty() == true ) {
2740
22
        return;
2741
22
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
212
#if 1
2745
212
    {
2746
212
        std::set<uint64_t> moduleIDs;
2747
212
        for (const auto& m : modules ) {
2748
166
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
166
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
166
            moduleIDs.insert(moduleID);
2756
166
        }
2757
2758
212
        std::set<uint64_t> operationModuleIDs;
2759
235
        for (const auto& op : operations) {
2760
235
            operationModuleIDs.insert(op.first->ID);
2761
235
        }
2762
2763
212
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
212
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
212
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
212
        for (const auto& id : addModuleIDs) {
2768
57
            operations.push_back({ modules.at(id), operations[0].second});
2769
57
        }
2770
212
    }
2771
212
#endif
2772
2773
212
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
212
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
504
    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
209
            auto& prevModule = operations[i-1].first;
2788
209
            auto& prevOp = operations[i].second;
2789
2790
209
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
109
                auto& curModifier = op.modifier.GetVectorPtr();
2792
109
                if ( curModifier.size() == 0 ) {
2793
22.0k
                    for (size_t j = 0; j < 512; j++) {
2794
22.0k
                        curModifier.push_back(1);
2795
22.0k
                    }
2796
66
                } else {
2797
2.12k
                    for (auto& c : curModifier) {
2798
2.12k
                        c++;
2799
2.12k
                    }
2800
66
                }
2801
109
            }
2802
209
        }
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
212
    if ( options.noCompare == false ) {
2837
83
        compare(operations, results, data, size);
2838
83
    }
2839
212
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
272
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
272
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
272
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.50k
    do {
2725
3.50k
        auto op = getOp(&parentDs, data, size);
2726
3.50k
        auto module = getModule(parentDs);
2727
3.50k
        if ( module == nullptr ) {
2728
2.98k
            continue;
2729
2.98k
        }
2730
2731
519
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
519
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
24
            break;
2736
24
        }
2737
3.47k
    } while ( parentDs.Get<bool>() == true );
2738
2739
272
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
258
#if 1
2745
258
    {
2746
258
        std::set<uint64_t> moduleIDs;
2747
258
        for (const auto& m : modules ) {
2748
252
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
252
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
252
            moduleIDs.insert(moduleID);
2756
252
        }
2757
2758
258
        std::set<uint64_t> operationModuleIDs;
2759
356
        for (const auto& op : operations) {
2760
356
            operationModuleIDs.insert(op.first->ID);
2761
356
        }
2762
2763
258
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
258
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
258
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
258
        for (const auto& id : addModuleIDs) {
2768
104
            operations.push_back({ modules.at(id), operations[0].second});
2769
104
        }
2770
258
    }
2771
258
#endif
2772
2773
258
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
258
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
718
    for (size_t i = 0; i < operations.size(); i++) {
2781
460
        auto& operation = operations[i];
2782
2783
460
        auto& module = operation.first;
2784
460
        auto& op = operation.second;
2785
2786
460
        if ( i > 0 ) {
2787
334
            auto& prevModule = operations[i-1].first;
2788
334
            auto& prevOp = operations[i].second;
2789
2790
334
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
195
                auto& curModifier = op.modifier.GetVectorPtr();
2792
195
                if ( curModifier.size() == 0 ) {
2793
43.6k
                    for (size_t j = 0; j < 512; j++) {
2794
43.5k
                        curModifier.push_back(1);
2795
43.5k
                    }
2796
110
                } else {
2797
953
                    for (auto& c : curModifier) {
2798
953
                        c++;
2799
953
                    }
2800
110
                }
2801
195
            }
2802
334
        }
2803
2804
460
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
460
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
460
        const auto& result = results.back();
2811
2812
460
        if ( result.second != std::nullopt ) {
2813
63
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
63
        }
2820
2821
460
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
460
        if ( options.disableTests == false ) {
2830
460
            tests::test(op, result.second);
2831
460
        }
2832
2833
460
        postprocess(module, op, result);
2834
460
    }
2835
2836
258
    if ( options.noCompare == false ) {
2837
126
        compare(operations, results, data, size);
2838
126
    }
2839
258
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
307
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
307
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
307
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.16k
    do {
2725
4.16k
        auto op = getOp(&parentDs, data, size);
2726
4.16k
        auto module = getModule(parentDs);
2727
4.16k
        if ( module == nullptr ) {
2728
3.58k
            continue;
2729
3.58k
        }
2730
2731
577
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
577
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
22
            break;
2736
22
        }
2737
4.14k
    } while ( parentDs.Get<bool>() == true );
2738
2739
307
    if ( operations.empty() == true ) {
2740
16
        return;
2741
16
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
291
#if 1
2745
291
    {
2746
291
        std::set<uint64_t> moduleIDs;
2747
318
        for (const auto& m : modules ) {
2748
318
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
318
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
318
            moduleIDs.insert(moduleID);
2756
318
        }
2757
2758
291
        std::set<uint64_t> operationModuleIDs;
2759
412
        for (const auto& op : operations) {
2760
412
            operationModuleIDs.insert(op.first->ID);
2761
412
        }
2762
2763
291
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
291
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
291
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
291
        for (const auto& id : addModuleIDs) {
2768
133
            operations.push_back({ modules.at(id), operations[0].second});
2769
133
        }
2770
291
    }
2771
291
#endif
2772
2773
291
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
291
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
836
    for (size_t i = 0; i < operations.size(); i++) {
2781
545
        auto& operation = operations[i];
2782
2783
545
        auto& module = operation.first;
2784
545
        auto& op = operation.second;
2785
2786
545
        if ( i > 0 ) {
2787
386
            auto& prevModule = operations[i-1].first;
2788
386
            auto& prevOp = operations[i].second;
2789
2790
386
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
201
                auto& curModifier = op.modifier.GetVectorPtr();
2792
201
                if ( curModifier.size() == 0 ) {
2793
66.1k
                    for (size_t j = 0; j < 512; j++) {
2794
66.0k
                        curModifier.push_back(1);
2795
66.0k
                    }
2796
129
                } else {
2797
3.04k
                    for (auto& c : curModifier) {
2798
3.04k
                        c++;
2799
3.04k
                    }
2800
72
                }
2801
201
            }
2802
386
        }
2803
2804
545
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
545
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
545
        const auto& result = results.back();
2811
2812
545
        if ( result.second != std::nullopt ) {
2813
78
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
78
        }
2820
2821
545
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
545
        if ( options.disableTests == false ) {
2830
545
            tests::test(op, result.second);
2831
545
        }
2832
2833
545
        postprocess(module, op, result);
2834
545
    }
2835
2836
291
    if ( options.noCompare == false ) {
2837
159
        compare(operations, results, data, size);
2838
159
    }
2839
291
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
760
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
760
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
760
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.60k
    do {
2725
5.60k
        auto op = getOp(&parentDs, data, size);
2726
5.60k
        auto module = getModule(parentDs);
2727
5.60k
        if ( module == nullptr ) {
2728
4.14k
            continue;
2729
4.14k
        }
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
45
            break;
2736
45
        }
2737
5.55k
    } while ( parentDs.Get<bool>() == true );
2738
2739
760
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
739
#if 1
2745
739
    {
2746
739
        std::set<uint64_t> moduleIDs;
2747
1.24k
        for (const auto& m : modules ) {
2748
1.24k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.24k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.24k
            moduleIDs.insert(moduleID);
2756
1.24k
        }
2757
2758
739
        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
739
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
739
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
739
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
739
        for (const auto& id : addModuleIDs) {
2768
595
            operations.push_back({ modules.at(id), operations[0].second});
2769
595
        }
2770
739
    }
2771
739
#endif
2772
2773
739
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
739
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.65k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.91k
        auto& operation = operations[i];
2782
2783
1.91k
        auto& module = operation.first;
2784
1.91k
        auto& op = operation.second;
2785
2786
1.91k
        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
655
                auto& curModifier = op.modifier.GetVectorPtr();
2792
655
                if ( curModifier.size() == 0 ) {
2793
285k
                    for (size_t j = 0; j < 512; j++) {
2794
284k
                        curModifier.push_back(1);
2795
284k
                    }
2796
556
                } else {
2797
1.17k
                    for (auto& c : curModifier) {
2798
1.17k
                        c++;
2799
1.17k
                    }
2800
99
                }
2801
655
            }
2802
1.29k
        }
2803
2804
1.91k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.91k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.91k
        const auto& result = results.back();
2811
2812
1.91k
        if ( result.second != std::nullopt ) {
2813
263
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
263
        }
2820
2821
1.91k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.91k
        if ( options.disableTests == false ) {
2830
1.91k
            tests::test(op, result.second);
2831
1.91k
        }
2832
2833
1.91k
        postprocess(module, op, result);
2834
1.91k
    }
2835
2836
739
    if ( options.noCompare == false ) {
2837
624
        compare(operations, results, data, size);
2838
624
    }
2839
739
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
332
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
332
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
332
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.24k
    do {
2725
3.24k
        auto op = getOp(&parentDs, data, size);
2726
3.24k
        auto module = getModule(parentDs);
2727
3.24k
        if ( module == nullptr ) {
2728
2.77k
            continue;
2729
2.77k
        }
2730
2731
465
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
465
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
16
            break;
2736
16
        }
2737
3.22k
    } while ( parentDs.Get<bool>() == true );
2738
2739
332
    if ( operations.empty() == true ) {
2740
37
        return;
2741
37
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
295
#if 1
2745
295
    {
2746
295
        std::set<uint64_t> moduleIDs;
2747
295
        for (const auto& m : modules ) {
2748
262
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
262
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
262
            moduleIDs.insert(moduleID);
2756
262
        }
2757
2758
295
        std::set<uint64_t> operationModuleIDs;
2759
322
        for (const auto& op : operations) {
2760
322
            operationModuleIDs.insert(op.first->ID);
2761
322
        }
2762
2763
295
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
295
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
295
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
295
        for (const auto& id : addModuleIDs) {
2768
108
            operations.push_back({ modules.at(id), operations[0].second});
2769
108
        }
2770
295
    }
2771
295
#endif
2772
2773
295
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
295
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
725
    for (size_t i = 0; i < operations.size(); i++) {
2781
430
        auto& operation = operations[i];
2782
2783
430
        auto& module = operation.first;
2784
430
        auto& op = operation.second;
2785
2786
430
        if ( i > 0 ) {
2787
299
            auto& prevModule = operations[i-1].first;
2788
299
            auto& prevOp = operations[i].second;
2789
2790
299
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
153
                auto& curModifier = op.modifier.GetVectorPtr();
2792
153
                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
99
                } else {
2797
596
                    for (auto& c : curModifier) {
2798
596
                        c++;
2799
596
                    }
2800
54
                }
2801
153
            }
2802
299
        }
2803
2804
430
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
430
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
430
        const auto& result = results.back();
2811
2812
430
        if ( result.second != std::nullopt ) {
2813
73
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
73
        }
2820
2821
430
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
430
        if ( options.disableTests == false ) {
2830
430
            tests::test(op, result.second);
2831
430
        }
2832
2833
430
        postprocess(module, op, result);
2834
430
    }
2835
2836
295
    if ( options.noCompare == false ) {
2837
131
        compare(operations, results, data, size);
2838
131
    }
2839
295
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
354
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
354
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
354
    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.55k
            continue;
2729
2.55k
        }
2730
2731
481
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
481
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
17
            break;
2736
17
        }
2737
3.01k
    } while ( parentDs.Get<bool>() == true );
2738
2739
354
    if ( operations.empty() == true ) {
2740
38
        return;
2741
38
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
316
#if 1
2745
316
    {
2746
316
        std::set<uint64_t> moduleIDs;
2747
316
        for (const auto& m : modules ) {
2748
264
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
264
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
264
            moduleIDs.insert(moduleID);
2756
264
        }
2757
2758
316
        std::set<uint64_t> operationModuleIDs;
2759
327
        for (const auto& op : operations) {
2760
327
            operationModuleIDs.insert(op.first->ID);
2761
327
        }
2762
2763
316
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
316
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
316
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
316
        for (const auto& id : addModuleIDs) {
2768
110
            operations.push_back({ modules.at(id), operations[0].second});
2769
110
        }
2770
316
    }
2771
316
#endif
2772
2773
316
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
316
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
753
    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
305
            auto& prevModule = operations[i-1].first;
2788
305
            auto& prevOp = operations[i].second;
2789
2790
305
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
160
                auto& curModifier = op.modifier.GetVectorPtr();
2792
160
                if ( curModifier.size() == 0 ) {
2793
52.3k
                    for (size_t j = 0; j < 512; j++) {
2794
52.2k
                        curModifier.push_back(1);
2795
52.2k
                    }
2796
102
                } else {
2797
1.36k
                    for (auto& c : curModifier) {
2798
1.36k
                        c++;
2799
1.36k
                    }
2800
58
                }
2801
160
            }
2802
305
        }
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
56
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
56
        }
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
316
    if ( options.noCompare == false ) {
2837
132
        compare(operations, results, data, size);
2838
132
    }
2839
316
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
232
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
232
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
232
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.63k
    do {
2725
3.63k
        auto op = getOp(&parentDs, data, size);
2726
3.63k
        auto module = getModule(parentDs);
2727
3.63k
        if ( module == nullptr ) {
2728
3.17k
            continue;
2729
3.17k
        }
2730
2731
462
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
462
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
19
            break;
2736
19
        }
2737
3.61k
    } while ( parentDs.Get<bool>() == true );
2738
2739
232
    if ( operations.empty() == true ) {
2740
17
        return;
2741
17
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
215
#if 1
2745
215
    {
2746
215
        std::set<uint64_t> moduleIDs;
2747
226
        for (const auto& m : modules ) {
2748
226
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
226
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
226
            moduleIDs.insert(moduleID);
2756
226
        }
2757
2758
215
        std::set<uint64_t> operationModuleIDs;
2759
324
        for (const auto& op : operations) {
2760
324
            operationModuleIDs.insert(op.first->ID);
2761
324
        }
2762
2763
215
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
215
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
215
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
215
        for (const auto& id : addModuleIDs) {
2768
91
            operations.push_back({ modules.at(id), operations[0].second});
2769
91
        }
2770
215
    }
2771
215
#endif
2772
2773
215
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
215
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
630
    for (size_t i = 0; i < operations.size(); i++) {
2781
415
        auto& operation = operations[i];
2782
2783
415
        auto& module = operation.first;
2784
415
        auto& op = operation.second;
2785
2786
415
        if ( i > 0 ) {
2787
302
            auto& prevModule = operations[i-1].first;
2788
302
            auto& prevOp = operations[i].second;
2789
2790
302
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
166
                auto& curModifier = op.modifier.GetVectorPtr();
2792
166
                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
981
                    for (auto& c : curModifier) {
2798
981
                        c++;
2799
981
                    }
2800
78
                }
2801
166
            }
2802
302
        }
2803
2804
415
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
415
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
415
        const auto& result = results.back();
2811
2812
415
        if ( result.second != std::nullopt ) {
2813
38
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
38
        }
2820
2821
415
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
415
        if ( options.disableTests == false ) {
2830
415
            tests::test(op, result.second);
2831
415
        }
2832
2833
415
        postprocess(module, op, result);
2834
415
    }
2835
2836
215
    if ( options.noCompare == false ) {
2837
113
        compare(operations, results, data, size);
2838
113
    }
2839
215
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
233
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
233
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
233
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.97k
    do {
2725
4.97k
        auto op = getOp(&parentDs, data, size);
2726
4.97k
        auto module = getModule(parentDs);
2727
4.97k
        if ( module == nullptr ) {
2728
4.59k
            continue;
2729
4.59k
        }
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
14
            break;
2736
14
        }
2737
4.96k
    } while ( parentDs.Get<bool>() == true );
2738
2739
233
    if ( operations.empty() == true ) {
2740
23
        return;
2741
23
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
210
#if 1
2745
210
    {
2746
210
        std::set<uint64_t> moduleIDs;
2747
210
        for (const auto& m : modules ) {
2748
162
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
162
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
162
            moduleIDs.insert(moduleID);
2756
162
        }
2757
2758
210
        std::set<uint64_t> operationModuleIDs;
2759
224
        for (const auto& op : operations) {
2760
224
            operationModuleIDs.insert(op.first->ID);
2761
224
        }
2762
2763
210
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
210
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
210
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
210
        for (const auto& id : addModuleIDs) {
2768
57
            operations.push_back({ modules.at(id), operations[0].second});
2769
57
        }
2770
210
    }
2771
210
#endif
2772
2773
210
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
210
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
491
    for (size_t i = 0; i < operations.size(); i++) {
2781
281
        auto& operation = operations[i];
2782
2783
281
        auto& module = operation.first;
2784
281
        auto& op = operation.second;
2785
2786
281
        if ( i > 0 ) {
2787
200
            auto& prevModule = operations[i-1].first;
2788
200
            auto& prevOp = operations[i].second;
2789
2790
200
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
106
                auto& curModifier = op.modifier.GetVectorPtr();
2792
106
                if ( curModifier.size() == 0 ) {
2793
26.6k
                    for (size_t j = 0; j < 512; j++) {
2794
26.6k
                        curModifier.push_back(1);
2795
26.6k
                    }
2796
54
                } else {
2797
1.03k
                    for (auto& c : curModifier) {
2798
1.03k
                        c++;
2799
1.03k
                    }
2800
54
                }
2801
106
            }
2802
200
        }
2803
2804
281
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
281
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
281
        const auto& result = results.back();
2811
2812
281
        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
281
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
281
        if ( options.disableTests == false ) {
2830
281
            tests::test(op, result.second);
2831
281
        }
2832
2833
281
        postprocess(module, op, result);
2834
281
    }
2835
2836
210
    if ( options.noCompare == false ) {
2837
81
        compare(operations, results, data, size);
2838
81
    }
2839
210
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
573
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
573
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
573
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.82k
    do {
2725
5.82k
        auto op = getOp(&parentDs, data, size);
2726
5.82k
        auto module = getModule(parentDs);
2727
5.82k
        if ( module == nullptr ) {
2728
4.91k
            continue;
2729
4.91k
        }
2730
2731
915
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
915
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
26
            break;
2736
26
        }
2737
5.79k
    } while ( parentDs.Get<bool>() == true );
2738
2739
573
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
552
#if 1
2745
552
    {
2746
552
        std::set<uint64_t> moduleIDs;
2747
688
        for (const auto& m : modules ) {
2748
688
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
688
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
688
            moduleIDs.insert(moduleID);
2756
688
        }
2757
2758
552
        std::set<uint64_t> operationModuleIDs;
2759
721
        for (const auto& op : operations) {
2760
721
            operationModuleIDs.insert(op.first->ID);
2761
721
        }
2762
2763
552
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
552
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
552
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
552
        for (const auto& id : addModuleIDs) {
2768
318
            operations.push_back({ modules.at(id), operations[0].second});
2769
318
        }
2770
552
    }
2771
552
#endif
2772
2773
552
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
552
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.59k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.03k
        auto& operation = operations[i];
2782
2783
1.03k
        auto& module = operation.first;
2784
1.03k
        auto& op = operation.second;
2785
2786
1.03k
        if ( i > 0 ) {
2787
695
            auto& prevModule = operations[i-1].first;
2788
695
            auto& prevOp = operations[i].second;
2789
2790
695
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
337
                auto& curModifier = op.modifier.GetVectorPtr();
2792
337
                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
35.0k
                    for (auto& c : curModifier) {
2798
35.0k
                        c++;
2799
35.0k
                    }
2800
165
                }
2801
337
            }
2802
695
        }
2803
2804
1.03k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.03k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.03k
        const auto& result = results.back();
2811
2812
1.03k
        if ( result.second != std::nullopt ) {
2813
54
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
54
        }
2820
2821
1.03k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.03k
        if ( options.disableTests == false ) {
2830
1.03k
            tests::test(op, result.second);
2831
1.03k
        }
2832
2833
1.03k
        postprocess(module, op, result);
2834
1.03k
    }
2835
2836
552
    if ( options.noCompare == false ) {
2837
344
        compare(operations, results, data, size);
2838
344
    }
2839
552
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
10.7k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
10.7k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
10.7k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
31.0k
    do {
2725
31.0k
        auto op = getOp(&parentDs, data, size);
2726
31.0k
        auto module = getModule(parentDs);
2727
31.0k
        if ( module == nullptr ) {
2728
15.6k
            continue;
2729
15.6k
        }
2730
2731
15.3k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
15.3k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
259
            break;
2736
259
        }
2737
30.8k
    } while ( parentDs.Get<bool>() == true );
2738
2739
10.7k
    if ( operations.empty() == true ) {
2740
123
        return;
2741
123
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
10.6k
#if 1
2745
10.6k
    {
2746
10.6k
        std::set<uint64_t> moduleIDs;
2747
20.2k
        for (const auto& m : modules ) {
2748
20.2k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
20.2k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
20.2k
            moduleIDs.insert(moduleID);
2756
20.2k
        }
2757
2758
10.6k
        std::set<uint64_t> operationModuleIDs;
2759
14.8k
        for (const auto& op : operations) {
2760
14.8k
            operationModuleIDs.insert(op.first->ID);
2761
14.8k
        }
2762
2763
10.6k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
10.6k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
10.6k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
10.6k
        for (const auto& id : addModuleIDs) {
2768
10.0k
            operations.push_back({ modules.at(id), operations[0].second});
2769
10.0k
        }
2770
10.6k
    }
2771
10.6k
#endif
2772
2773
10.6k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
10.6k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
35.5k
    for (size_t i = 0; i < operations.size(); i++) {
2781
24.8k
        auto& operation = operations[i];
2782
2783
24.8k
        auto& module = operation.first;
2784
24.8k
        auto& op = operation.second;
2785
2786
24.8k
        if ( i > 0 ) {
2787
14.7k
            auto& prevModule = operations[i-1].first;
2788
14.7k
            auto& prevOp = operations[i].second;
2789
2790
14.7k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
4.61k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
4.61k
                if ( curModifier.size() == 0 ) {
2793
1.29M
                    for (size_t j = 0; j < 512; j++) {
2794
1.29M
                        curModifier.push_back(1);
2795
1.29M
                    }
2796
2.53k
                } else {
2797
98.4k
                    for (auto& c : curModifier) {
2798
98.4k
                        c++;
2799
98.4k
                    }
2800
2.08k
                }
2801
4.61k
            }
2802
14.7k
        }
2803
2804
24.8k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
24.8k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
24.8k
        const auto& result = results.back();
2811
2812
24.8k
        if ( result.second != std::nullopt ) {
2813
7.14k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
7.14k
        }
2820
2821
24.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
24.8k
        if ( options.disableTests == false ) {
2830
24.8k
            tests::test(op, result.second);
2831
24.8k
        }
2832
2833
24.8k
        postprocess(module, op, result);
2834
24.8k
    }
2835
2836
10.6k
    if ( options.noCompare == false ) {
2837
10.1k
        compare(operations, results, data, size);
2838
10.1k
    }
2839
10.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
254
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
254
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
254
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.96k
    do {
2725
3.96k
        auto op = getOp(&parentDs, data, size);
2726
3.96k
        auto module = getModule(parentDs);
2727
3.96k
        if ( module == nullptr ) {
2728
3.52k
            continue;
2729
3.52k
        }
2730
2731
434
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
434
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
3.94k
    } while ( parentDs.Get<bool>() == true );
2738
2739
254
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
239
#if 1
2745
239
    {
2746
239
        std::set<uint64_t> moduleIDs;
2747
312
        for (const auto& m : modules ) {
2748
312
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
312
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
312
            moduleIDs.insert(moduleID);
2756
312
        }
2757
2758
239
        std::set<uint64_t> operationModuleIDs;
2759
320
        for (const auto& op : operations) {
2760
320
            operationModuleIDs.insert(op.first->ID);
2761
320
        }
2762
2763
239
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
239
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
239
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
239
        for (const auto& id : addModuleIDs) {
2768
135
            operations.push_back({ modules.at(id), operations[0].second});
2769
135
        }
2770
239
    }
2771
239
#endif
2772
2773
239
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
239
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
694
    for (size_t i = 0; i < operations.size(); i++) {
2781
455
        auto& operation = operations[i];
2782
2783
455
        auto& module = operation.first;
2784
455
        auto& op = operation.second;
2785
2786
455
        if ( i > 0 ) {
2787
299
            auto& prevModule = operations[i-1].first;
2788
299
            auto& prevOp = operations[i].second;
2789
2790
299
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
129
                auto& curModifier = op.modifier.GetVectorPtr();
2792
129
                if ( curModifier.size() == 0 ) {
2793
38.9k
                    for (size_t j = 0; j < 512; j++) {
2794
38.9k
                        curModifier.push_back(1);
2795
38.9k
                    }
2796
76
                } else {
2797
34.6k
                    for (auto& c : curModifier) {
2798
34.6k
                        c++;
2799
34.6k
                    }
2800
53
                }
2801
129
            }
2802
299
        }
2803
2804
455
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
455
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
455
        const auto& result = results.back();
2811
2812
455
        if ( result.second != std::nullopt ) {
2813
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
455
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
455
        if ( options.disableTests == false ) {
2830
455
            tests::test(op, result.second);
2831
455
        }
2832
2833
455
        postprocess(module, op, result);
2834
455
    }
2835
2836
239
    if ( options.noCompare == false ) {
2837
156
        compare(operations, results, data, size);
2838
156
    }
2839
239
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
626
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
626
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
626
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.08k
    do {
2725
4.08k
        auto op = getOp(&parentDs, data, size);
2726
4.08k
        auto module = getModule(parentDs);
2727
4.08k
        if ( module == nullptr ) {
2728
2.92k
            continue;
2729
2.92k
        }
2730
2731
1.15k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.15k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
42
            break;
2736
42
        }
2737
4.03k
    } while ( parentDs.Get<bool>() == true );
2738
2739
626
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
613
#if 1
2745
613
    {
2746
613
        std::set<uint64_t> moduleIDs;
2747
954
        for (const auto& m : modules ) {
2748
954
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
954
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
954
            moduleIDs.insert(moduleID);
2756
954
        }
2757
2758
613
        std::set<uint64_t> operationModuleIDs;
2759
968
        for (const auto& op : operations) {
2760
968
            operationModuleIDs.insert(op.first->ID);
2761
968
        }
2762
2763
613
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
613
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
613
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
613
        for (const auto& id : addModuleIDs) {
2768
458
            operations.push_back({ modules.at(id), operations[0].second});
2769
458
        }
2770
613
    }
2771
613
#endif
2772
2773
613
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
613
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.03k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.42k
        auto& operation = operations[i];
2782
2783
1.42k
        auto& module = operation.first;
2784
1.42k
        auto& op = operation.second;
2785
2786
1.42k
        if ( i > 0 ) {
2787
949
            auto& prevModule = operations[i-1].first;
2788
949
            auto& prevOp = operations[i].second;
2789
2790
949
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
463
                auto& curModifier = op.modifier.GetVectorPtr();
2792
463
                if ( curModifier.size() == 0 ) {
2793
210k
                    for (size_t j = 0; j < 512; j++) {
2794
210k
                        curModifier.push_back(1);
2795
210k
                    }
2796
411
                } else {
2797
61.4k
                    for (auto& c : curModifier) {
2798
61.4k
                        c++;
2799
61.4k
                    }
2800
52
                }
2801
463
            }
2802
949
        }
2803
2804
1.42k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.42k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.42k
        const auto& result = results.back();
2811
2812
1.42k
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
1.42k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.42k
        if ( options.disableTests == false ) {
2830
1.42k
            tests::test(op, result.second);
2831
1.42k
        }
2832
2833
1.42k
        postprocess(module, op, result);
2834
1.42k
    }
2835
2836
613
    if ( options.noCompare == false ) {
2837
477
        compare(operations, results, data, size);
2838
477
    }
2839
613
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::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.76k
    do {
2725
2.76k
        auto op = getOp(&parentDs, data, size);
2726
2.76k
        auto module = getModule(parentDs);
2727
2.76k
        if ( module == nullptr ) {
2728
2.41k
            continue;
2729
2.41k
        }
2730
2731
350
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
350
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
2.75k
    } 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
190
        for (const auto& m : modules ) {
2748
152
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
152
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
152
            moduleIDs.insert(moduleID);
2756
152
        }
2757
2758
190
        std::set<uint64_t> operationModuleIDs;
2759
207
        for (const auto& op : operations) {
2760
207
            operationModuleIDs.insert(op.first->ID);
2761
207
        }
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
53
            operations.push_back({ modules.at(id), operations[0].second});
2769
53
        }
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
450
    for (size_t i = 0; i < operations.size(); i++) {
2781
260
        auto& operation = operations[i];
2782
2783
260
        auto& module = operation.first;
2784
260
        auto& op = operation.second;
2785
2786
260
        if ( i > 0 ) {
2787
184
            auto& prevModule = operations[i-1].first;
2788
184
            auto& prevOp = operations[i].second;
2789
2790
184
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
96
                auto& curModifier = op.modifier.GetVectorPtr();
2792
96
                if ( curModifier.size() == 0 ) {
2793
22.0k
                    for (size_t j = 0; j < 512; j++) {
2794
22.0k
                        curModifier.push_back(1);
2795
22.0k
                    }
2796
53
                } else {
2797
600
                    for (auto& c : curModifier) {
2798
600
                        c++;
2799
600
                    }
2800
53
                }
2801
96
            }
2802
184
        }
2803
2804
260
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
260
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
260
        const auto& result = results.back();
2811
2812
260
        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
260
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
260
        if ( options.disableTests == false ) {
2830
260
            tests::test(op, result.second);
2831
260
        }
2832
2833
260
        postprocess(module, op, result);
2834
260
    }
2835
2836
190
    if ( options.noCompare == false ) {
2837
76
        compare(operations, results, data, size);
2838
76
    }
2839
190
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
218
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
218
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
218
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.88k
    do {
2725
2.88k
        auto op = getOp(&parentDs, data, size);
2726
2.88k
        auto module = getModule(parentDs);
2727
2.88k
        if ( module == nullptr ) {
2728
2.53k
            continue;
2729
2.53k
        }
2730
2731
345
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
345
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
2.86k
    } while ( parentDs.Get<bool>() == true );
2738
2739
218
    if ( operations.empty() == true ) {
2740
20
        return;
2741
20
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
198
#if 1
2745
198
    {
2746
198
        std::set<uint64_t> moduleIDs;
2747
198
        for (const auto& m : modules ) {
2748
194
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
194
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
194
            moduleIDs.insert(moduleID);
2756
194
        }
2757
2758
198
        std::set<uint64_t> operationModuleIDs;
2759
238
        for (const auto& op : operations) {
2760
238
            operationModuleIDs.insert(op.first->ID);
2761
238
        }
2762
2763
198
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
198
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
198
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
198
        for (const auto& id : addModuleIDs) {
2768
73
            operations.push_back({ modules.at(id), operations[0].second});
2769
73
        }
2770
198
    }
2771
198
#endif
2772
2773
198
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
198
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
509
    for (size_t i = 0; i < operations.size(); i++) {
2781
311
        auto& operation = operations[i];
2782
2783
311
        auto& module = operation.first;
2784
311
        auto& op = operation.second;
2785
2786
311
        if ( i > 0 ) {
2787
214
            auto& prevModule = operations[i-1].first;
2788
214
            auto& prevOp = operations[i].second;
2789
2790
214
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
101
                auto& curModifier = op.modifier.GetVectorPtr();
2792
101
                if ( curModifier.size() == 0 ) {
2793
28.7k
                    for (size_t j = 0; j < 512; j++) {
2794
28.6k
                        curModifier.push_back(1);
2795
28.6k
                    }
2796
56
                } else {
2797
1.02k
                    for (auto& c : curModifier) {
2798
1.02k
                        c++;
2799
1.02k
                    }
2800
45
                }
2801
101
            }
2802
214
        }
2803
2804
311
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
311
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
311
        const auto& result = results.back();
2811
2812
311
        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
311
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
311
        if ( options.disableTests == false ) {
2830
311
            tests::test(op, result.second);
2831
311
        }
2832
2833
311
        postprocess(module, op, result);
2834
311
    }
2835
2836
198
    if ( options.noCompare == false ) {
2837
97
        compare(operations, results, data, size);
2838
97
    }
2839
198
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
221
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
221
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
221
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.22k
    do {
2725
5.22k
        auto op = getOp(&parentDs, data, size);
2726
5.22k
        auto module = getModule(parentDs);
2727
5.22k
        if ( module == nullptr ) {
2728
4.85k
            continue;
2729
4.85k
        }
2730
2731
378
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
378
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
5.21k
    } while ( parentDs.Get<bool>() == true );
2738
2739
221
    if ( operations.empty() == true ) {
2740
25
        return;
2741
25
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
196
#if 1
2745
196
    {
2746
196
        std::set<uint64_t> moduleIDs;
2747
196
        for (const auto& m : modules ) {
2748
142
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
142
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
142
            moduleIDs.insert(moduleID);
2756
142
        }
2757
2758
196
        std::set<uint64_t> operationModuleIDs;
2759
210
        for (const auto& op : operations) {
2760
210
            operationModuleIDs.insert(op.first->ID);
2761
210
        }
2762
2763
196
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
196
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
196
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
196
        for (const auto& id : addModuleIDs) {
2768
50
            operations.push_back({ modules.at(id), operations[0].second});
2769
50
        }
2770
196
    }
2771
196
#endif
2772
2773
196
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
196
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
456
    for (size_t i = 0; i < operations.size(); i++) {
2781
260
        auto& operation = operations[i];
2782
2783
260
        auto& module = operation.first;
2784
260
        auto& op = operation.second;
2785
2786
260
        if ( i > 0 ) {
2787
189
            auto& prevModule = operations[i-1].first;
2788
189
            auto& prevOp = operations[i].second;
2789
2790
189
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
101
                auto& curModifier = op.modifier.GetVectorPtr();
2792
101
                if ( curModifier.size() == 0 ) {
2793
22.5k
                    for (size_t j = 0; j < 512; j++) {
2794
22.5k
                        curModifier.push_back(1);
2795
22.5k
                    }
2796
57
                } else {
2797
1.82k
                    for (auto& c : curModifier) {
2798
1.82k
                        c++;
2799
1.82k
                    }
2800
57
                }
2801
101
            }
2802
189
        }
2803
2804
260
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
260
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
260
        const auto& result = results.back();
2811
2812
260
        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
260
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
260
        if ( options.disableTests == false ) {
2830
260
            tests::test(op, result.second);
2831
260
        }
2832
2833
260
        postprocess(module, op, result);
2834
260
    }
2835
2836
196
    if ( options.noCompare == false ) {
2837
71
        compare(operations, results, data, size);
2838
71
    }
2839
196
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
191
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
191
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
191
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.42k
    do {
2725
4.42k
        auto op = getOp(&parentDs, data, size);
2726
4.42k
        auto module = getModule(parentDs);
2727
4.42k
        if ( module == nullptr ) {
2728
4.05k
            continue;
2729
4.05k
        }
2730
2731
366
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
366
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
4.41k
    } while ( parentDs.Get<bool>() == true );
2738
2739
191
    if ( operations.empty() == true ) {
2740
24
        return;
2741
24
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
167
#if 1
2745
167
    {
2746
167
        std::set<uint64_t> moduleIDs;
2747
167
        for (const auto& m : modules ) {
2748
142
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
142
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
142
            moduleIDs.insert(moduleID);
2756
142
        }
2757
2758
167
        std::set<uint64_t> operationModuleIDs;
2759
225
        for (const auto& op : operations) {
2760
225
            operationModuleIDs.insert(op.first->ID);
2761
225
        }
2762
2763
167
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
167
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
167
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
167
        for (const auto& id : addModuleIDs) {
2768
46
            operations.push_back({ modules.at(id), operations[0].second});
2769
46
        }
2770
167
    }
2771
167
#endif
2772
2773
167
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
167
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
438
    for (size_t i = 0; i < operations.size(); i++) {
2781
271
        auto& operation = operations[i];
2782
2783
271
        auto& module = operation.first;
2784
271
        auto& op = operation.second;
2785
2786
271
        if ( i > 0 ) {
2787
200
            auto& prevModule = operations[i-1].first;
2788
200
            auto& prevOp = operations[i].second;
2789
2790
200
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
113
                auto& curModifier = op.modifier.GetVectorPtr();
2792
113
                if ( curModifier.size() == 0 ) {
2793
21.0k
                    for (size_t j = 0; j < 512; j++) {
2794
20.9k
                        curModifier.push_back(1);
2795
20.9k
                    }
2796
72
                } else {
2797
3.81k
                    for (auto& c : curModifier) {
2798
3.81k
                        c++;
2799
3.81k
                    }
2800
72
                }
2801
113
            }
2802
200
        }
2803
2804
271
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
271
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
271
        const auto& result = results.back();
2811
2812
271
        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
271
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
271
        if ( options.disableTests == false ) {
2830
271
            tests::test(op, result.second);
2831
271
        }
2832
2833
271
        postprocess(module, op, result);
2834
271
    }
2835
2836
167
    if ( options.noCompare == false ) {
2837
71
        compare(operations, results, data, size);
2838
71
    }
2839
167
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
386
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
386
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
386
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.20k
    do {
2725
4.20k
        auto op = getOp(&parentDs, data, size);
2726
4.20k
        auto module = getModule(parentDs);
2727
4.20k
        if ( module == nullptr ) {
2728
3.67k
            continue;
2729
3.67k
        }
2730
2731
530
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
530
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
16
            break;
2736
16
        }
2737
4.19k
    } while ( parentDs.Get<bool>() == true );
2738
2739
386
    if ( operations.empty() == true ) {
2740
31
        return;
2741
31
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
355
#if 1
2745
355
    {
2746
355
        std::set<uint64_t> moduleIDs;
2747
355
        for (const auto& m : modules ) {
2748
194
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
194
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
194
            moduleIDs.insert(moduleID);
2756
194
        }
2757
2758
355
        std::set<uint64_t> operationModuleIDs;
2759
355
        for (const auto& op : operations) {
2760
246
            operationModuleIDs.insert(op.first->ID);
2761
246
        }
2762
2763
355
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
355
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
355
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
355
        for (const auto& id : addModuleIDs) {
2768
73
            operations.push_back({ modules.at(id), operations[0].second});
2769
73
        }
2770
355
    }
2771
355
#endif
2772
2773
355
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
355
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
674
    for (size_t i = 0; i < operations.size(); i++) {
2781
319
        auto& operation = operations[i];
2782
2783
319
        auto& module = operation.first;
2784
319
        auto& op = operation.second;
2785
2786
319
        if ( i > 0 ) {
2787
222
            auto& prevModule = operations[i-1].first;
2788
222
            auto& prevOp = operations[i].second;
2789
2790
222
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
105
                auto& curModifier = op.modifier.GetVectorPtr();
2792
105
                if ( curModifier.size() == 0 ) {
2793
30.2k
                    for (size_t j = 0; j < 512; j++) {
2794
30.2k
                        curModifier.push_back(1);
2795
30.2k
                    }
2796
59
                } else {
2797
907
                    for (auto& c : curModifier) {
2798
907
                        c++;
2799
907
                    }
2800
46
                }
2801
105
            }
2802
222
        }
2803
2804
319
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
319
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
319
        const auto& result = results.back();
2811
2812
319
        if ( result.second != std::nullopt ) {
2813
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
319
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
319
        if ( options.disableTests == false ) {
2830
319
            tests::test(op, result.second);
2831
319
        }
2832
2833
319
        postprocess(module, op, result);
2834
319
    }
2835
2836
355
    if ( options.noCompare == false ) {
2837
97
        compare(operations, results, data, size);
2838
97
    }
2839
355
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
493
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
493
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
493
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.84k
    do {
2725
3.84k
        auto op = getOp(&parentDs, data, size);
2726
3.84k
        auto module = getModule(parentDs);
2727
3.84k
        if ( module == nullptr ) {
2728
3.29k
            continue;
2729
3.29k
        }
2730
2731
555
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
555
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
3.83k
    } while ( parentDs.Get<bool>() == true );
2738
2739
493
    if ( operations.empty() == true ) {
2740
31
        return;
2741
31
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
462
#if 1
2745
462
    {
2746
462
        std::set<uint64_t> moduleIDs;
2747
462
        for (const auto& m : modules ) {
2748
162
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
162
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
162
            moduleIDs.insert(moduleID);
2756
162
        }
2757
2758
462
        std::set<uint64_t> operationModuleIDs;
2759
462
        for (const auto& op : operations) {
2760
233
            operationModuleIDs.insert(op.first->ID);
2761
233
        }
2762
2763
462
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
462
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
462
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
462
        for (const auto& id : addModuleIDs) {
2768
57
            operations.push_back({ modules.at(id), operations[0].second});
2769
57
        }
2770
462
    }
2771
462
#endif
2772
2773
462
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
462
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
752
    for (size_t i = 0; i < operations.size(); i++) {
2781
290
        auto& operation = operations[i];
2782
2783
290
        auto& module = operation.first;
2784
290
        auto& op = operation.second;
2785
2786
290
        if ( i > 0 ) {
2787
209
            auto& prevModule = operations[i-1].first;
2788
209
            auto& prevOp = operations[i].second;
2789
2790
209
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
116
                auto& curModifier = op.modifier.GetVectorPtr();
2792
116
                if ( curModifier.size() == 0 ) {
2793
32.8k
                    for (size_t j = 0; j < 512; j++) {
2794
32.7k
                        curModifier.push_back(1);
2795
32.7k
                    }
2796
64
                } else {
2797
723
                    for (auto& c : curModifier) {
2798
723
                        c++;
2799
723
                    }
2800
52
                }
2801
116
            }
2802
209
        }
2803
2804
290
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
290
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
290
        const auto& result = results.back();
2811
2812
290
        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
290
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
290
        if ( options.disableTests == false ) {
2830
290
            tests::test(op, result.second);
2831
290
        }
2832
2833
290
        postprocess(module, op, result);
2834
290
    }
2835
2836
462
    if ( options.noCompare == false ) {
2837
81
        compare(operations, results, data, size);
2838
81
    }
2839
462
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
431
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
431
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
431
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.90k
    do {
2725
3.90k
        auto op = getOp(&parentDs, data, size);
2726
3.90k
        auto module = getModule(parentDs);
2727
3.90k
        if ( module == nullptr ) {
2728
3.40k
            continue;
2729
3.40k
        }
2730
2731
497
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
497
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
3.89k
    } while ( parentDs.Get<bool>() == true );
2738
2739
431
    if ( operations.empty() == true ) {
2740
36
        return;
2741
36
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
395
#if 1
2745
395
    {
2746
395
        std::set<uint64_t> moduleIDs;
2747
395
        for (const auto& m : modules ) {
2748
140
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
140
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
140
            moduleIDs.insert(moduleID);
2756
140
        }
2757
2758
395
        std::set<uint64_t> operationModuleIDs;
2759
395
        for (const auto& op : operations) {
2760
206
            operationModuleIDs.insert(op.first->ID);
2761
206
        }
2762
2763
395
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
395
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
395
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
395
        for (const auto& id : addModuleIDs) {
2768
49
            operations.push_back({ modules.at(id), operations[0].second});
2769
49
        }
2770
395
    }
2771
395
#endif
2772
2773
395
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
395
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
650
    for (size_t i = 0; i < operations.size(); i++) {
2781
255
        auto& operation = operations[i];
2782
2783
255
        auto& module = operation.first;
2784
255
        auto& op = operation.second;
2785
2786
255
        if ( i > 0 ) {
2787
185
            auto& prevModule = operations[i-1].first;
2788
185
            auto& prevOp = operations[i].second;
2789
2790
185
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
101
                auto& curModifier = op.modifier.GetVectorPtr();
2792
101
                if ( curModifier.size() == 0 ) {
2793
28.7k
                    for (size_t j = 0; j < 512; j++) {
2794
28.6k
                        curModifier.push_back(1);
2795
28.6k
                    }
2796
56
                } else {
2797
871
                    for (auto& c : curModifier) {
2798
871
                        c++;
2799
871
                    }
2800
45
                }
2801
101
            }
2802
185
        }
2803
2804
255
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
255
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
255
        const auto& result = results.back();
2811
2812
255
        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
255
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
255
        if ( options.disableTests == false ) {
2830
255
            tests::test(op, result.second);
2831
255
        }
2832
2833
255
        postprocess(module, op, result);
2834
255
    }
2835
2836
395
    if ( options.noCompare == false ) {
2837
70
        compare(operations, results, data, size);
2838
70
    }
2839
395
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
280
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
280
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
280
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.73k
    do {
2725
3.73k
        auto op = getOp(&parentDs, data, size);
2726
3.73k
        auto module = getModule(parentDs);
2727
3.73k
        if ( module == nullptr ) {
2728
3.33k
            continue;
2729
3.33k
        }
2730
2731
396
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
396
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
3.72k
    } while ( parentDs.Get<bool>() == true );
2738
2739
280
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
259
#if 1
2745
259
    {
2746
259
        std::set<uint64_t> moduleIDs;
2747
259
        for (const auto& m : modules ) {
2748
150
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
150
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
150
            moduleIDs.insert(moduleID);
2756
150
        }
2757
2758
259
        std::set<uint64_t> operationModuleIDs;
2759
259
        for (const auto& op : operations) {
2760
218
            operationModuleIDs.insert(op.first->ID);
2761
218
        }
2762
2763
259
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
259
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
259
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
259
        for (const auto& id : addModuleIDs) {
2768
47
            operations.push_back({ modules.at(id), operations[0].second});
2769
47
        }
2770
259
    }
2771
259
#endif
2772
2773
259
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
259
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
524
    for (size_t i = 0; i < operations.size(); i++) {
2781
265
        auto& operation = operations[i];
2782
2783
265
        auto& module = operation.first;
2784
265
        auto& op = operation.second;
2785
2786
265
        if ( i > 0 ) {
2787
190
            auto& prevModule = operations[i-1].first;
2788
190
            auto& prevOp = operations[i].second;
2789
2790
190
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
103
                auto& curModifier = op.modifier.GetVectorPtr();
2792
103
                if ( curModifier.size() == 0 ) {
2793
30.7k
                    for (size_t j = 0; j < 512; j++) {
2794
30.7k
                        curModifier.push_back(1);
2795
30.7k
                    }
2796
60
                } else {
2797
688
                    for (auto& c : curModifier) {
2798
688
                        c++;
2799
688
                    }
2800
43
                }
2801
103
            }
2802
190
        }
2803
2804
265
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
265
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
265
        const auto& result = results.back();
2811
2812
265
        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
265
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
265
        if ( options.disableTests == false ) {
2830
265
            tests::test(op, result.second);
2831
265
        }
2832
2833
265
        postprocess(module, op, result);
2834
265
    }
2835
2836
259
    if ( options.noCompare == false ) {
2837
75
        compare(operations, results, data, size);
2838
75
    }
2839
259
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
232
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
232
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
232
    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
3.87k
            continue;
2729
3.87k
        }
2730
2731
361
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
361
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
4.22k
    } while ( parentDs.Get<bool>() == true );
2738
2739
232
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
218
#if 1
2745
218
    {
2746
218
        std::set<uint64_t> moduleIDs;
2747
218
        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
218
        std::set<uint64_t> operationModuleIDs;
2759
218
        for (const auto& op : operations) {
2760
192
            operationModuleIDs.insert(op.first->ID);
2761
192
        }
2762
2763
218
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
218
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
218
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
218
        for (const auto& id : addModuleIDs) {
2768
44
            operations.push_back({ modules.at(id), operations[0].second});
2769
44
        }
2770
218
    }
2771
218
#endif
2772
2773
218
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
218
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
454
    for (size_t i = 0; i < operations.size(); i++) {
2781
236
        auto& operation = operations[i];
2782
2783
236
        auto& module = operation.first;
2784
236
        auto& op = operation.second;
2785
2786
236
        if ( i > 0 ) {
2787
171
            auto& prevModule = operations[i-1].first;
2788
171
            auto& prevOp = operations[i].second;
2789
2790
171
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
94
                auto& curModifier = op.modifier.GetVectorPtr();
2792
94
                if ( curModifier.size() == 0 ) {
2793
18.9k
                    for (size_t j = 0; j < 512; j++) {
2794
18.9k
                        curModifier.push_back(1);
2795
18.9k
                    }
2796
57
                } else {
2797
3.68k
                    for (auto& c : curModifier) {
2798
3.68k
                        c++;
2799
3.68k
                    }
2800
57
                }
2801
94
            }
2802
171
        }
2803
2804
236
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
236
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
236
        const auto& result = results.back();
2811
2812
236
        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
236
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
236
        if ( options.disableTests == false ) {
2830
236
            tests::test(op, result.second);
2831
236
        }
2832
2833
236
        postprocess(module, op, result);
2834
236
    }
2835
2836
218
    if ( options.noCompare == false ) {
2837
65
        compare(operations, results, data, size);
2838
65
    }
2839
218
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
219
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
219
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
219
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.73k
    do {
2725
3.73k
        auto op = getOp(&parentDs, data, size);
2726
3.73k
        auto module = getModule(parentDs);
2727
3.73k
        if ( module == nullptr ) {
2728
3.37k
            continue;
2729
3.37k
        }
2730
2731
364
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
364
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
3.72k
    } while ( parentDs.Get<bool>() == true );
2738
2739
219
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
208
#if 1
2745
208
    {
2746
208
        std::set<uint64_t> moduleIDs;
2747
208
        for (const auto& m : modules ) {
2748
138
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
138
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
138
            moduleIDs.insert(moduleID);
2756
138
        }
2757
2758
208
        std::set<uint64_t> operationModuleIDs;
2759
208
        for (const auto& op : operations) {
2760
201
            operationModuleIDs.insert(op.first->ID);
2761
201
        }
2762
2763
208
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
208
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
208
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
208
        for (const auto& id : addModuleIDs) {
2768
46
            operations.push_back({ modules.at(id), operations[0].second});
2769
46
        }
2770
208
    }
2771
208
#endif
2772
2773
208
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
208
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
455
    for (size_t i = 0; i < operations.size(); i++) {
2781
247
        auto& operation = operations[i];
2782
2783
247
        auto& module = operation.first;
2784
247
        auto& op = operation.second;
2785
2786
247
        if ( i > 0 ) {
2787
178
            auto& prevModule = operations[i-1].first;
2788
178
            auto& prevOp = operations[i].second;
2789
2790
178
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
94
                auto& curModifier = op.modifier.GetVectorPtr();
2792
94
                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
52
                } else {
2797
1.93k
                    for (auto& c : curModifier) {
2798
1.93k
                        c++;
2799
1.93k
                    }
2800
52
                }
2801
94
            }
2802
178
        }
2803
2804
247
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
247
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
247
        const auto& result = results.back();
2811
2812
247
        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
247
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
247
        if ( options.disableTests == false ) {
2830
247
            tests::test(op, result.second);
2831
247
        }
2832
2833
247
        postprocess(module, op, result);
2834
247
    }
2835
2836
208
    if ( options.noCompare == false ) {
2837
69
        compare(operations, results, data, size);
2838
69
    }
2839
208
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
259
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
259
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
259
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.87k
    do {
2725
3.87k
        auto op = getOp(&parentDs, data, size);
2726
3.87k
        auto module = getModule(parentDs);
2727
3.87k
        if ( module == nullptr ) {
2728
3.43k
            continue;
2729
3.43k
        }
2730
2731
442
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
442
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
17
            break;
2736
17
        }
2737
3.85k
    } while ( parentDs.Get<bool>() == true );
2738
2739
259
    if ( operations.empty() == true ) {
2740
24
        return;
2741
24
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
235
#if 1
2745
235
    {
2746
235
        std::set<uint64_t> moduleIDs;
2747
235
        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
235
        std::set<uint64_t> operationModuleIDs;
2759
235
        for (const auto& op : operations) {
2760
235
            operationModuleIDs.insert(op.first->ID);
2761
235
        }
2762
2763
235
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
235
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
235
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
235
        for (const auto& id : addModuleIDs) {
2768
55
            operations.push_back({ modules.at(id), operations[0].second});
2769
55
        }
2770
235
    }
2771
235
#endif
2772
2773
235
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
235
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
525
    for (size_t i = 0; i < operations.size(); i++) {
2781
290
        auto& operation = operations[i];
2782
2783
290
        auto& module = operation.first;
2784
290
        auto& op = operation.second;
2785
2786
290
        if ( i > 0 ) {
2787
208
            auto& prevModule = operations[i-1].first;
2788
208
            auto& prevOp = operations[i].second;
2789
2790
208
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
115
                auto& curModifier = op.modifier.GetVectorPtr();
2792
115
                if ( curModifier.size() == 0 ) {
2793
31.8k
                    for (size_t j = 0; j < 512; j++) {
2794
31.7k
                        curModifier.push_back(1);
2795
31.7k
                    }
2796
62
                } else {
2797
1.01k
                    for (auto& c : curModifier) {
2798
1.01k
                        c++;
2799
1.01k
                    }
2800
53
                }
2801
115
            }
2802
208
        }
2803
2804
290
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
290
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
290
        const auto& result = results.back();
2811
2812
290
        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
290
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
290
        if ( options.disableTests == false ) {
2830
290
            tests::test(op, result.second);
2831
290
        }
2832
2833
290
        postprocess(module, op, result);
2834
290
    }
2835
2836
235
    if ( options.noCompare == false ) {
2837
82
        compare(operations, results, data, size);
2838
82
    }
2839
235
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
206
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
206
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
206
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.19k
    do {
2725
4.19k
        auto op = getOp(&parentDs, data, size);
2726
4.19k
        auto module = getModule(parentDs);
2727
4.19k
        if ( module == nullptr ) {
2728
3.83k
            continue;
2729
3.83k
        }
2730
2731
360
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
360
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
4.17k
    } while ( parentDs.Get<bool>() == true );
2738
2739
206
    if ( operations.empty() == true ) {
2740
22
        return;
2741
22
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
184
#if 1
2745
184
    {
2746
184
        std::set<uint64_t> moduleIDs;
2747
184
        for (const auto& m : modules ) {
2748
144
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
144
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
144
            moduleIDs.insert(moduleID);
2756
144
        }
2757
2758
184
        std::set<uint64_t> operationModuleIDs;
2759
213
        for (const auto& op : operations) {
2760
213
            operationModuleIDs.insert(op.first->ID);
2761
213
        }
2762
2763
184
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
184
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
184
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
184
        for (const auto& id : addModuleIDs) {
2768
49
            operations.push_back({ modules.at(id), operations[0].second});
2769
49
        }
2770
184
    }
2771
184
#endif
2772
2773
184
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
184
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
446
    for (size_t i = 0; i < operations.size(); i++) {
2781
262
        auto& operation = operations[i];
2782
2783
262
        auto& module = operation.first;
2784
262
        auto& op = operation.second;
2785
2786
262
        if ( i > 0 ) {
2787
190
            auto& prevModule = operations[i-1].first;
2788
190
            auto& prevOp = operations[i].second;
2789
2790
190
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
106
                auto& curModifier = op.modifier.GetVectorPtr();
2792
106
                if ( curModifier.size() == 0 ) {
2793
26.6k
                    for (size_t j = 0; j < 512; j++) {
2794
26.6k
                        curModifier.push_back(1);
2795
26.6k
                    }
2796
54
                } else {
2797
790
                    for (auto& c : curModifier) {
2798
790
                        c++;
2799
790
                    }
2800
54
                }
2801
106
            }
2802
190
        }
2803
2804
262
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
262
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
262
        const auto& result = results.back();
2811
2812
262
        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
262
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
262
        if ( options.disableTests == false ) {
2830
262
            tests::test(op, result.second);
2831
262
        }
2832
2833
262
        postprocess(module, op, result);
2834
262
    }
2835
2836
184
    if ( options.noCompare == false ) {
2837
72
        compare(operations, results, data, size);
2838
72
    }
2839
184
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
236
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
236
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
236
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.22k
    do {
2725
5.22k
        auto op = getOp(&parentDs, data, size);
2726
5.22k
        auto module = getModule(parentDs);
2727
5.22k
        if ( module == nullptr ) {
2728
4.85k
            continue;
2729
4.85k
        }
2730
2731
373
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
373
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
5.21k
    } while ( parentDs.Get<bool>() == true );
2738
2739
236
    if ( operations.empty() == true ) {
2740
27
        return;
2741
27
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
209
#if 1
2745
209
    {
2746
209
        std::set<uint64_t> moduleIDs;
2747
209
        for (const auto& m : modules ) {
2748
156
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
156
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
156
            moduleIDs.insert(moduleID);
2756
156
        }
2757
2758
209
        std::set<uint64_t> operationModuleIDs;
2759
224
        for (const auto& op : operations) {
2760
224
            operationModuleIDs.insert(op.first->ID);
2761
224
        }
2762
2763
209
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
209
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
209
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
209
        for (const auto& id : addModuleIDs) {
2768
59
            operations.push_back({ modules.at(id), operations[0].second});
2769
59
        }
2770
209
    }
2771
209
#endif
2772
2773
209
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
209
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
492
    for (size_t i = 0; i < operations.size(); i++) {
2781
283
        auto& operation = operations[i];
2782
2783
283
        auto& module = operation.first;
2784
283
        auto& op = operation.second;
2785
2786
283
        if ( i > 0 ) {
2787
205
            auto& prevModule = operations[i-1].first;
2788
205
            auto& prevOp = operations[i].second;
2789
2790
205
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
118
                auto& curModifier = op.modifier.GetVectorPtr();
2792
118
                if ( curModifier.size() == 0 ) {
2793
29.7k
                    for (size_t j = 0; j < 512; j++) {
2794
29.6k
                        curModifier.push_back(1);
2795
29.6k
                    }
2796
60
                } else {
2797
1.22k
                    for (auto& c : curModifier) {
2798
1.22k
                        c++;
2799
1.22k
                    }
2800
60
                }
2801
118
            }
2802
205
        }
2803
2804
283
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
283
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
283
        const auto& result = results.back();
2811
2812
283
        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
283
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
283
        if ( options.disableTests == false ) {
2830
283
            tests::test(op, result.second);
2831
283
        }
2832
2833
283
        postprocess(module, op, result);
2834
283
    }
2835
2836
209
    if ( options.noCompare == false ) {
2837
78
        compare(operations, results, data, size);
2838
78
    }
2839
209
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
247
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
247
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
247
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.84k
    do {
2725
4.84k
        auto op = getOp(&parentDs, data, size);
2726
4.84k
        auto module = getModule(parentDs);
2727
4.84k
        if ( module == nullptr ) {
2728
4.48k
            continue;
2729
4.48k
        }
2730
2731
366
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
366
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
4.83k
    } while ( parentDs.Get<bool>() == true );
2738
2739
247
    if ( operations.empty() == true ) {
2740
27
        return;
2741
27
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
220
#if 1
2745
220
    {
2746
220
        std::set<uint64_t> moduleIDs;
2747
220
        for (const auto& m : modules ) {
2748
140
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
140
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
140
            moduleIDs.insert(moduleID);
2756
140
        }
2757
2758
220
        std::set<uint64_t> operationModuleIDs;
2759
220
        for (const auto& op : operations) {
2760
209
            operationModuleIDs.insert(op.first->ID);
2761
209
        }
2762
2763
220
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
220
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
220
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
220
        for (const auto& id : addModuleIDs) {
2768
45
            operations.push_back({ modules.at(id), operations[0].second});
2769
45
        }
2770
220
    }
2771
220
#endif
2772
2773
220
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
220
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
474
    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
184
            auto& prevModule = operations[i-1].first;
2788
184
            auto& prevOp = operations[i].second;
2789
2790
184
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
102
                auto& curModifier = op.modifier.GetVectorPtr();
2792
102
                if ( curModifier.size() == 0 ) {
2793
26.1k
                    for (size_t j = 0; j < 512; j++) {
2794
26.1k
                        curModifier.push_back(1);
2795
26.1k
                    }
2796
51
                } else {
2797
1.25k
                    for (auto& c : curModifier) {
2798
1.25k
                        c++;
2799
1.25k
                    }
2800
51
                }
2801
102
            }
2802
184
        }
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
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
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
220
    if ( options.noCompare == false ) {
2837
70
        compare(operations, results, data, size);
2838
70
    }
2839
220
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::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
4.31k
    do {
2725
4.31k
        auto op = getOp(&parentDs, data, size);
2726
4.31k
        auto module = getModule(parentDs);
2727
4.31k
        if ( module == nullptr ) {
2728
3.94k
            continue;
2729
3.94k
        }
2730
2731
371
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
371
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
4.30k
    } while ( parentDs.Get<bool>() == true );
2738
2739
205
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
191
#if 1
2745
191
    {
2746
191
        std::set<uint64_t> moduleIDs;
2747
191
        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
191
        std::set<uint64_t> operationModuleIDs;
2759
191
        for (const auto& op : operations) {
2760
191
            operationModuleIDs.insert(op.first->ID);
2761
191
        }
2762
2763
191
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
191
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
191
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
191
        for (const auto& id : addModuleIDs) {
2768
44
            operations.push_back({ modules.at(id), operations[0].second});
2769
44
        }
2770
191
    }
2771
191
#endif
2772
2773
191
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
191
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
426
    for (size_t i = 0; i < operations.size(); i++) {
2781
235
        auto& operation = operations[i];
2782
2783
235
        auto& module = operation.first;
2784
235
        auto& op = operation.second;
2785
2786
235
        if ( i > 0 ) {
2787
169
            auto& prevModule = operations[i-1].first;
2788
169
            auto& prevOp = operations[i].second;
2789
2790
169
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
89
                auto& curModifier = op.modifier.GetVectorPtr();
2792
89
                if ( curModifier.size() == 0 ) {
2793
20.5k
                    for (size_t j = 0; j < 512; j++) {
2794
20.4k
                        curModifier.push_back(1);
2795
20.4k
                    }
2796
49
                } else {
2797
501
                    for (auto& c : curModifier) {
2798
501
                        c++;
2799
501
                    }
2800
49
                }
2801
89
            }
2802
169
        }
2803
2804
235
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
235
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
235
        const auto& result = results.back();
2811
2812
235
        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
235
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
235
        if ( options.disableTests == false ) {
2830
235
            tests::test(op, result.second);
2831
235
        }
2832
2833
235
        postprocess(module, op, result);
2834
235
    }
2835
2836
191
    if ( options.noCompare == false ) {
2837
66
        compare(operations, results, data, size);
2838
66
    }
2839
191
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
301
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
301
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
301
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.20k
    do {
2725
3.20k
        auto op = getOp(&parentDs, data, size);
2726
3.20k
        auto module = getModule(parentDs);
2727
3.20k
        if ( module == nullptr ) {
2728
2.83k
            continue;
2729
2.83k
        }
2730
2731
365
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
365
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
3.18k
    } while ( parentDs.Get<bool>() == true );
2738
2739
301
    if ( operations.empty() == true ) {
2740
46
        return;
2741
46
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
255
#if 1
2745
255
    {
2746
255
        std::set<uint64_t> moduleIDs;
2747
255
        for (const auto& m : modules ) {
2748
152
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
152
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
152
            moduleIDs.insert(moduleID);
2756
152
        }
2757
2758
255
        std::set<uint64_t> operationModuleIDs;
2759
255
        for (const auto& op : operations) {
2760
211
            operationModuleIDs.insert(op.first->ID);
2761
211
        }
2762
2763
255
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
255
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
255
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
255
        for (const auto& id : addModuleIDs) {
2768
53
            operations.push_back({ modules.at(id), operations[0].second});
2769
53
        }
2770
255
    }
2771
255
#endif
2772
2773
255
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
255
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
519
    for (size_t i = 0; i < operations.size(); i++) {
2781
264
        auto& operation = operations[i];
2782
2783
264
        auto& module = operation.first;
2784
264
        auto& op = operation.second;
2785
2786
264
        if ( i > 0 ) {
2787
188
            auto& prevModule = operations[i-1].first;
2788
188
            auto& prevOp = operations[i].second;
2789
2790
188
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
96
                auto& curModifier = op.modifier.GetVectorPtr();
2792
96
                if ( curModifier.size() == 0 ) {
2793
18.9k
                    for (size_t j = 0; j < 512; j++) {
2794
18.9k
                        curModifier.push_back(1);
2795
18.9k
                    }
2796
59
                } else {
2797
1.10k
                    for (auto& c : curModifier) {
2798
1.10k
                        c++;
2799
1.10k
                    }
2800
59
                }
2801
96
            }
2802
188
        }
2803
2804
264
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
264
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
264
        const auto& result = results.back();
2811
2812
264
        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
264
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
264
        if ( options.disableTests == false ) {
2830
264
            tests::test(op, result.second);
2831
264
        }
2832
2833
264
        postprocess(module, op, result);
2834
264
    }
2835
2836
255
    if ( options.noCompare == false ) {
2837
76
        compare(operations, results, data, size);
2838
76
    }
2839
255
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
287
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
287
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
287
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.80k
    do {
2725
3.80k
        auto op = getOp(&parentDs, data, size);
2726
3.80k
        auto module = getModule(parentDs);
2727
3.80k
        if ( module == nullptr ) {
2728
3.40k
            continue;
2729
3.40k
        }
2730
2731
395
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
395
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
3.78k
    } while ( parentDs.Get<bool>() == true );
2738
2739
287
    if ( operations.empty() == true ) {
2740
26
        return;
2741
26
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
261
#if 1
2745
261
    {
2746
261
        std::set<uint64_t> moduleIDs;
2747
261
        for (const auto& m : modules ) {
2748
160
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
160
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
160
            moduleIDs.insert(moduleID);
2756
160
        }
2757
2758
261
        std::set<uint64_t> operationModuleIDs;
2759
261
        for (const auto& op : operations) {
2760
232
            operationModuleIDs.insert(op.first->ID);
2761
232
        }
2762
2763
261
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
261
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
261
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
261
        for (const auto& id : addModuleIDs) {
2768
55
            operations.push_back({ modules.at(id), operations[0].second});
2769
55
        }
2770
261
    }
2771
261
#endif
2772
2773
261
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
261
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
548
    for (size_t i = 0; i < operations.size(); i++) {
2781
287
        auto& operation = operations[i];
2782
2783
287
        auto& module = operation.first;
2784
287
        auto& op = operation.second;
2785
2786
287
        if ( i > 0 ) {
2787
207
            auto& prevModule = operations[i-1].first;
2788
207
            auto& prevOp = operations[i].second;
2789
2790
207
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
112
                auto& curModifier = op.modifier.GetVectorPtr();
2792
112
                if ( curModifier.size() == 0 ) {
2793
32.3k
                    for (size_t j = 0; j < 512; j++) {
2794
32.2k
                        curModifier.push_back(1);
2795
32.2k
                    }
2796
63
                } else {
2797
3.51k
                    for (auto& c : curModifier) {
2798
3.51k
                        c++;
2799
3.51k
                    }
2800
49
                }
2801
112
            }
2802
207
        }
2803
2804
287
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
287
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
287
        const auto& result = results.back();
2811
2812
287
        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
287
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
287
        if ( options.disableTests == false ) {
2830
287
            tests::test(op, result.second);
2831
287
        }
2832
2833
287
        postprocess(module, op, result);
2834
287
    }
2835
2836
261
    if ( options.noCompare == false ) {
2837
80
        compare(operations, results, data, size);
2838
80
    }
2839
261
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
261
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
261
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
261
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.30k
    do {
2725
4.30k
        auto op = getOp(&parentDs, data, size);
2726
4.30k
        auto module = getModule(parentDs);
2727
4.30k
        if ( module == nullptr ) {
2728
3.93k
            continue;
2729
3.93k
        }
2730
2731
366
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
366
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
4.29k
    } while ( parentDs.Get<bool>() == true );
2738
2739
261
    if ( operations.empty() == true ) {
2740
37
        return;
2741
37
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
224
#if 1
2745
224
    {
2746
224
        std::set<uint64_t> moduleIDs;
2747
224
        for (const auto& m : modules ) {
2748
144
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
144
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
144
            moduleIDs.insert(moduleID);
2756
144
        }
2757
2758
224
        std::set<uint64_t> operationModuleIDs;
2759
224
        for (const auto& op : operations) {
2760
217
            operationModuleIDs.insert(op.first->ID);
2761
217
        }
2762
2763
224
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
224
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
224
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
224
        for (const auto& id : addModuleIDs) {
2768
51
            operations.push_back({ modules.at(id), operations[0].second});
2769
51
        }
2770
224
    }
2771
224
#endif
2772
2773
224
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
224
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
492
    for (size_t i = 0; i < operations.size(); i++) {
2781
268
        auto& operation = operations[i];
2782
2783
268
        auto& module = operation.first;
2784
268
        auto& op = operation.second;
2785
2786
268
        if ( i > 0 ) {
2787
196
            auto& prevModule = operations[i-1].first;
2788
196
            auto& prevOp = operations[i].second;
2789
2790
196
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
110
                auto& curModifier = op.modifier.GetVectorPtr();
2792
110
                if ( curModifier.size() == 0 ) {
2793
30.7k
                    for (size_t j = 0; j < 512; j++) {
2794
30.7k
                        curModifier.push_back(1);
2795
30.7k
                    }
2796
60
                } else {
2797
628
                    for (auto& c : curModifier) {
2798
628
                        c++;
2799
628
                    }
2800
50
                }
2801
110
            }
2802
196
        }
2803
2804
268
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
268
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
268
        const auto& result = results.back();
2811
2812
268
        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
268
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
268
        if ( options.disableTests == false ) {
2830
268
            tests::test(op, result.second);
2831
268
        }
2832
2833
268
        postprocess(module, op, result);
2834
268
    }
2835
2836
224
    if ( options.noCompare == false ) {
2837
72
        compare(operations, results, data, size);
2838
72
    }
2839
224
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
296
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
296
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
296
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.22k
    do {
2725
3.22k
        auto op = getOp(&parentDs, data, size);
2726
3.22k
        auto module = getModule(parentDs);
2727
3.22k
        if ( module == nullptr ) {
2728
2.86k
            continue;
2729
2.86k
        }
2730
2731
362
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
362
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
3.21k
    } while ( parentDs.Get<bool>() == true );
2738
2739
296
    if ( operations.empty() == true ) {
2740
42
        return;
2741
42
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
254
#if 1
2745
254
    {
2746
254
        std::set<uint64_t> moduleIDs;
2747
254
        for (const auto& m : modules ) {
2748
156
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
156
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
156
            moduleIDs.insert(moduleID);
2756
156
        }
2757
2758
254
        std::set<uint64_t> operationModuleIDs;
2759
254
        for (const auto& op : operations) {
2760
208
            operationModuleIDs.insert(op.first->ID);
2761
208
        }
2762
2763
254
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
254
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
254
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
254
        for (const auto& id : addModuleIDs) {
2768
50
            operations.push_back({ modules.at(id), operations[0].second});
2769
50
        }
2770
254
    }
2771
254
#endif
2772
2773
254
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
254
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
512
    for (size_t i = 0; i < operations.size(); i++) {
2781
258
        auto& operation = operations[i];
2782
2783
258
        auto& module = operation.first;
2784
258
        auto& op = operation.second;
2785
2786
258
        if ( i > 0 ) {
2787
180
            auto& prevModule = operations[i-1].first;
2788
180
            auto& prevOp = operations[i].second;
2789
2790
180
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
90
                auto& curModifier = op.modifier.GetVectorPtr();
2792
90
                if ( curModifier.size() == 0 ) {
2793
27.1k
                    for (size_t j = 0; j < 512; j++) {
2794
27.1k
                        curModifier.push_back(1);
2795
27.1k
                    }
2796
53
                } else {
2797
1.21k
                    for (auto& c : curModifier) {
2798
1.21k
                        c++;
2799
1.21k
                    }
2800
37
                }
2801
90
            }
2802
180
        }
2803
2804
258
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
258
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
258
        const auto& result = results.back();
2811
2812
258
        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
258
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
258
        if ( options.disableTests == false ) {
2830
258
            tests::test(op, result.second);
2831
258
        }
2832
2833
258
        postprocess(module, op, result);
2834
258
    }
2835
2836
254
    if ( options.noCompare == false ) {
2837
78
        compare(operations, results, data, size);
2838
78
    }
2839
254
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::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
3.31k
    do {
2725
3.31k
        auto op = getOp(&parentDs, data, size);
2726
3.31k
        auto module = getModule(parentDs);
2727
3.31k
        if ( module == nullptr ) {
2728
2.98k
            continue;
2729
2.98k
        }
2730
2731
326
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
326
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
3.30k
    } while ( parentDs.Get<bool>() == true );
2738
2739
205
    if ( operations.empty() == true ) {
2740
19
        return;
2741
19
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
186
#if 1
2745
186
    {
2746
186
        std::set<uint64_t> moduleIDs;
2747
186
        for (const auto& m : modules ) {
2748
144
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
144
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
144
            moduleIDs.insert(moduleID);
2756
144
        }
2757
2758
186
        std::set<uint64_t> operationModuleIDs;
2759
205
        for (const auto& op : operations) {
2760
205
            operationModuleIDs.insert(op.first->ID);
2761
205
        }
2762
2763
186
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
186
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
186
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
186
        for (const auto& id : addModuleIDs) {
2768
44
            operations.push_back({ modules.at(id), operations[0].second});
2769
44
        }
2770
186
    }
2771
186
#endif
2772
2773
186
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
186
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
435
    for (size_t i = 0; i < operations.size(); i++) {
2781
249
        auto& operation = operations[i];
2782
2783
249
        auto& module = operation.first;
2784
249
        auto& op = operation.second;
2785
2786
249
        if ( i > 0 ) {
2787
177
            auto& prevModule = operations[i-1].first;
2788
177
            auto& prevOp = operations[i].second;
2789
2790
177
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
91
                auto& curModifier = op.modifier.GetVectorPtr();
2792
91
                if ( curModifier.size() == 0 ) {
2793
24.1k
                    for (size_t j = 0; j < 512; j++) {
2794
24.0k
                        curModifier.push_back(1);
2795
24.0k
                    }
2796
47
                } else {
2797
1.13k
                    for (auto& c : curModifier) {
2798
1.13k
                        c++;
2799
1.13k
                    }
2800
44
                }
2801
91
            }
2802
177
        }
2803
2804
249
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
249
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
249
        const auto& result = results.back();
2811
2812
249
        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
249
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
249
        if ( options.disableTests == false ) {
2830
249
            tests::test(op, result.second);
2831
249
        }
2832
2833
249
        postprocess(module, op, result);
2834
249
    }
2835
2836
186
    if ( options.noCompare == false ) {
2837
72
        compare(operations, results, data, size);
2838
72
    }
2839
186
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::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
3.55k
    do {
2725
3.55k
        auto op = getOp(&parentDs, data, size);
2726
3.55k
        auto module = getModule(parentDs);
2727
3.55k
        if ( module == nullptr ) {
2728
3.24k
            continue;
2729
3.24k
        }
2730
2731
307
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
307
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
3.54k
    } while ( parentDs.Get<bool>() == true );
2738
2739
205
    if ( operations.empty() == true ) {
2740
17
        return;
2741
17
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
188
#if 1
2745
188
    {
2746
188
        std::set<uint64_t> moduleIDs;
2747
188
        for (const auto& m : modules ) {
2748
128
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
128
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
128
            moduleIDs.insert(moduleID);
2756
128
        }
2757
2758
188
        std::set<uint64_t> operationModuleIDs;
2759
188
        for (const auto& op : operations) {
2760
178
            operationModuleIDs.insert(op.first->ID);
2761
178
        }
2762
2763
188
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
188
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
188
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
188
        for (const auto& id : addModuleIDs) {
2768
42
            operations.push_back({ modules.at(id), operations[0].second});
2769
42
        }
2770
188
    }
2771
188
#endif
2772
2773
188
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
188
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
408
    for (size_t i = 0; i < operations.size(); i++) {
2781
220
        auto& operation = operations[i];
2782
2783
220
        auto& module = operation.first;
2784
220
        auto& op = operation.second;
2785
2786
220
        if ( i > 0 ) {
2787
156
            auto& prevModule = operations[i-1].first;
2788
156
            auto& prevOp = operations[i].second;
2789
2790
156
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
80
                auto& curModifier = op.modifier.GetVectorPtr();
2792
80
                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
45
                } else {
2797
538
                    for (auto& c : curModifier) {
2798
538
                        c++;
2799
538
                    }
2800
45
                }
2801
80
            }
2802
156
        }
2803
2804
220
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
220
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
220
        const auto& result = results.back();
2811
2812
220
        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
220
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
220
        if ( options.disableTests == false ) {
2830
220
            tests::test(op, result.second);
2831
220
        }
2832
2833
220
        postprocess(module, op, result);
2834
220
    }
2835
2836
188
    if ( options.noCompare == false ) {
2837
64
        compare(operations, results, data, size);
2838
64
    }
2839
188
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
237
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
237
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
237
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.44k
    do {
2725
3.44k
        auto op = getOp(&parentDs, data, size);
2726
3.44k
        auto module = getModule(parentDs);
2727
3.44k
        if ( module == nullptr ) {
2728
3.11k
            continue;
2729
3.11k
        }
2730
2731
334
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
334
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
3.43k
    } while ( parentDs.Get<bool>() == true );
2738
2739
237
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
219
#if 1
2745
219
    {
2746
219
        std::set<uint64_t> moduleIDs;
2747
219
        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
219
        std::set<uint64_t> operationModuleIDs;
2759
219
        for (const auto& op : operations) {
2760
176
            operationModuleIDs.insert(op.first->ID);
2761
176
        }
2762
2763
219
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
219
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
219
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
219
        for (const auto& id : addModuleIDs) {
2768
35
            operations.push_back({ modules.at(id), operations[0].second});
2769
35
        }
2770
219
    }
2771
219
#endif
2772
2773
219
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
219
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
430
    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
155
            auto& prevModule = operations[i-1].first;
2788
155
            auto& prevOp = operations[i].second;
2789
2790
155
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
85
                auto& curModifier = op.modifier.GetVectorPtr();
2792
85
                if ( curModifier.size() == 0 ) {
2793
19.4k
                    for (size_t j = 0; j < 512; j++) {
2794
19.4k
                        curModifier.push_back(1);
2795
19.4k
                    }
2796
47
                } else {
2797
907
                    for (auto& c : curModifier) {
2798
907
                        c++;
2799
907
                    }
2800
47
                }
2801
85
            }
2802
155
        }
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
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
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
219
    if ( options.noCompare == false ) {
2837
56
        compare(operations, results, data, size);
2838
56
    }
2839
219
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
271
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
271
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
271
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.60k
    do {
2725
3.60k
        auto op = getOp(&parentDs, data, size);
2726
3.60k
        auto module = getModule(parentDs);
2727
3.60k
        if ( module == nullptr ) {
2728
3.18k
            continue;
2729
3.18k
        }
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
10
            break;
2736
10
        }
2737
3.59k
    } while ( parentDs.Get<bool>() == true );
2738
2739
271
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
250
#if 1
2745
250
    {
2746
250
        std::set<uint64_t> moduleIDs;
2747
250
        for (const auto& m : modules ) {
2748
196
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
196
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
196
            moduleIDs.insert(moduleID);
2756
196
        }
2757
2758
250
        std::set<uint64_t> operationModuleIDs;
2759
250
        for (const auto& op : operations) {
2760
219
            operationModuleIDs.insert(op.first->ID);
2761
219
        }
2762
2763
250
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
250
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
250
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
250
        for (const auto& id : addModuleIDs) {
2768
77
            operations.push_back({ modules.at(id), operations[0].second});
2769
77
        }
2770
250
    }
2771
250
#endif
2772
2773
250
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
250
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
546
    for (size_t i = 0; i < operations.size(); i++) {
2781
296
        auto& operation = operations[i];
2782
2783
296
        auto& module = operation.first;
2784
296
        auto& op = operation.second;
2785
2786
296
        if ( i > 0 ) {
2787
198
            auto& prevModule = operations[i-1].first;
2788
198
            auto& prevOp = operations[i].second;
2789
2790
198
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
88
                auto& curModifier = op.modifier.GetVectorPtr();
2792
88
                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
1.64k
                    for (auto& c : curModifier) {
2798
1.64k
                        c++;
2799
1.64k
                    }
2800
38
                }
2801
88
            }
2802
198
        }
2803
2804
296
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
296
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
296
        const auto& result = results.back();
2811
2812
296
        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
296
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
296
        if ( options.disableTests == false ) {
2830
296
            tests::test(op, result.second);
2831
296
        }
2832
2833
296
        postprocess(module, op, result);
2834
296
    }
2835
2836
250
    if ( options.noCompare == false ) {
2837
98
        compare(operations, results, data, size);
2838
98
    }
2839
250
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
235
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
235
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
235
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.17k
    do {
2725
4.17k
        auto op = getOp(&parentDs, data, size);
2726
4.17k
        auto module = getModule(parentDs);
2727
4.17k
        if ( module == nullptr ) {
2728
3.82k
            continue;
2729
3.82k
        }
2730
2731
350
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
350
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
4.16k
    } while ( parentDs.Get<bool>() == true );
2738
2739
235
    if ( operations.empty() == true ) {
2740
29
        return;
2741
29
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
206
#if 1
2745
206
    {
2746
206
        std::set<uint64_t> moduleIDs;
2747
206
        for (const auto& m : modules ) {
2748
168
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
168
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
168
            moduleIDs.insert(moduleID);
2756
168
        }
2757
2758
206
        std::set<uint64_t> operationModuleIDs;
2759
214
        for (const auto& op : operations) {
2760
214
            operationModuleIDs.insert(op.first->ID);
2761
214
        }
2762
2763
206
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
206
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
206
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
206
        for (const auto& id : addModuleIDs) {
2768
59
            operations.push_back({ modules.at(id), operations[0].second});
2769
59
        }
2770
206
    }
2771
206
#endif
2772
2773
206
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
206
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
479
    for (size_t i = 0; i < operations.size(); i++) {
2781
273
        auto& operation = operations[i];
2782
2783
273
        auto& module = operation.first;
2784
273
        auto& op = operation.second;
2785
2786
273
        if ( i > 0 ) {
2787
189
            auto& prevModule = operations[i-1].first;
2788
189
            auto& prevOp = operations[i].second;
2789
2790
189
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
91
                auto& curModifier = op.modifier.GetVectorPtr();
2792
91
                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
46
                } else {
2797
863
                    for (auto& c : curModifier) {
2798
863
                        c++;
2799
863
                    }
2800
46
                }
2801
91
            }
2802
189
        }
2803
2804
273
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
273
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
273
        const auto& result = results.back();
2811
2812
273
        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
273
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
273
        if ( options.disableTests == false ) {
2830
273
            tests::test(op, result.second);
2831
273
        }
2832
2833
273
        postprocess(module, op, result);
2834
273
    }
2835
2836
206
    if ( options.noCompare == false ) {
2837
84
        compare(operations, results, data, size);
2838
84
    }
2839
206
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
291
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
291
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
291
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.30k
    do {
2725
4.30k
        auto op = getOp(&parentDs, data, size);
2726
4.30k
        auto module = getModule(parentDs);
2727
4.30k
        if ( module == nullptr ) {
2728
3.83k
            continue;
2729
3.83k
        }
2730
2731
470
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
470
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
4.29k
    } while ( parentDs.Get<bool>() == true );
2738
2739
291
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
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
288
        for (const auto& m : modules ) {
2748
288
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
288
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
288
            moduleIDs.insert(moduleID);
2756
288
        }
2757
2758
273
        std::set<uint64_t> operationModuleIDs;
2759
304
        for (const auto& op : operations) {
2760
304
            operationModuleIDs.insert(op.first->ID);
2761
304
        }
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
118
            operations.push_back({ modules.at(id), operations[0].second});
2769
118
        }
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
695
    for (size_t i = 0; i < operations.size(); i++) {
2781
422
        auto& operation = operations[i];
2782
2783
422
        auto& module = operation.first;
2784
422
        auto& op = operation.second;
2785
2786
422
        if ( i > 0 ) {
2787
278
            auto& prevModule = operations[i-1].first;
2788
278
            auto& prevOp = operations[i].second;
2789
2790
278
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
119
                auto& curModifier = op.modifier.GetVectorPtr();
2792
119
                if ( curModifier.size() == 0 ) {
2793
36.4k
                    for (size_t j = 0; j < 512; j++) {
2794
36.3k
                        curModifier.push_back(1);
2795
36.3k
                    }
2796
71
                } else {
2797
1.52k
                    for (auto& c : curModifier) {
2798
1.52k
                        c++;
2799
1.52k
                    }
2800
48
                }
2801
119
            }
2802
278
        }
2803
2804
422
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
422
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
422
        const auto& result = results.back();
2811
2812
422
        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
422
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
422
        if ( options.disableTests == false ) {
2830
422
            tests::test(op, result.second);
2831
422
        }
2832
2833
422
        postprocess(module, op, result);
2834
422
    }
2835
2836
273
    if ( options.noCompare == false ) {
2837
144
        compare(operations, results, data, size);
2838
144
    }
2839
273
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
217
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
217
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
217
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.64k
    do {
2725
3.64k
        auto op = getOp(&parentDs, data, size);
2726
3.64k
        auto module = getModule(parentDs);
2727
3.64k
        if ( module == nullptr ) {
2728
3.30k
            continue;
2729
3.30k
        }
2730
2731
349
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
349
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
3.63k
    } while ( parentDs.Get<bool>() == true );
2738
2739
217
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
203
#if 1
2745
203
    {
2746
203
        std::set<uint64_t> moduleIDs;
2747
203
        for (const auto& m : modules ) {
2748
172
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
172
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
172
            moduleIDs.insert(moduleID);
2756
172
        }
2757
2758
203
        std::set<uint64_t> operationModuleIDs;
2759
210
        for (const auto& op : operations) {
2760
210
            operationModuleIDs.insert(op.first->ID);
2761
210
        }
2762
2763
203
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
203
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
203
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
203
        for (const auto& id : addModuleIDs) {
2768
64
            operations.push_back({ modules.at(id), operations[0].second});
2769
64
        }
2770
203
    }
2771
203
#endif
2772
2773
203
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
203
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
477
    for (size_t i = 0; i < operations.size(); i++) {
2781
274
        auto& operation = operations[i];
2782
2783
274
        auto& module = operation.first;
2784
274
        auto& op = operation.second;
2785
2786
274
        if ( i > 0 ) {
2787
188
            auto& prevModule = operations[i-1].first;
2788
188
            auto& prevOp = operations[i].second;
2789
2790
188
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
90
                auto& curModifier = op.modifier.GetVectorPtr();
2792
90
                if ( curModifier.size() == 0 ) {
2793
20.0k
                    for (size_t j = 0; j < 512; j++) {
2794
19.9k
                        curModifier.push_back(1);
2795
19.9k
                    }
2796
51
                } else {
2797
577
                    for (auto& c : curModifier) {
2798
577
                        c++;
2799
577
                    }
2800
51
                }
2801
90
            }
2802
188
        }
2803
2804
274
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
274
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
274
        const auto& result = results.back();
2811
2812
274
        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
274
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
274
        if ( options.disableTests == false ) {
2830
274
            tests::test(op, result.second);
2831
274
        }
2832
2833
274
        postprocess(module, op, result);
2834
274
    }
2835
2836
203
    if ( options.noCompare == false ) {
2837
86
        compare(operations, results, data, size);
2838
86
    }
2839
203
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::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
4.67k
    do {
2725
4.67k
        auto op = getOp(&parentDs, data, size);
2726
4.67k
        auto module = getModule(parentDs);
2727
4.67k
        if ( module == nullptr ) {
2728
4.13k
            continue;
2729
4.13k
        }
2730
2731
546
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
546
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
18
            break;
2736
18
        }
2737
4.66k
    } while ( parentDs.Get<bool>() == true );
2738
2739
312
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
300
#if 1
2745
300
    {
2746
300
        std::set<uint64_t> moduleIDs;
2747
312
        for (const auto& m : modules ) {
2748
312
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
312
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
312
            moduleIDs.insert(moduleID);
2756
312
        }
2757
2758
300
        std::set<uint64_t> operationModuleIDs;
2759
340
        for (const auto& op : operations) {
2760
340
            operationModuleIDs.insert(op.first->ID);
2761
340
        }
2762
2763
300
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
300
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
300
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
300
        for (const auto& id : addModuleIDs) {
2768
131
            operations.push_back({ modules.at(id), operations[0].second});
2769
131
        }
2770
300
    }
2771
300
#endif
2772
2773
300
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
300
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
771
    for (size_t i = 0; i < operations.size(); i++) {
2781
471
        auto& operation = operations[i];
2782
2783
471
        auto& module = operation.first;
2784
471
        auto& op = operation.second;
2785
2786
471
        if ( i > 0 ) {
2787
315
            auto& prevModule = operations[i-1].first;
2788
315
            auto& prevOp = operations[i].second;
2789
2790
315
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
143
                auto& curModifier = op.modifier.GetVectorPtr();
2792
143
                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
4.81k
                    for (auto& c : curModifier) {
2798
4.81k
                        c++;
2799
4.81k
                    }
2800
55
                }
2801
143
            }
2802
315
        }
2803
2804
471
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
471
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
471
        const auto& result = results.back();
2811
2812
471
        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
471
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
471
        if ( options.disableTests == false ) {
2830
471
            tests::test(op, result.second);
2831
471
        }
2832
2833
471
        postprocess(module, op, result);
2834
471
    }
2835
2836
300
    if ( options.noCompare == false ) {
2837
156
        compare(operations, results, data, size);
2838
156
    }
2839
300
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
190
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
190
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
190
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.95k
    do {
2725
3.95k
        auto op = getOp(&parentDs, data, size);
2726
3.95k
        auto module = getModule(parentDs);
2727
3.95k
        if ( module == nullptr ) {
2728
3.62k
            continue;
2729
3.62k
        }
2730
2731
333
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
333
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
3.94k
    } while ( parentDs.Get<bool>() == true );
2738
2739
190
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
177
#if 1
2745
177
    {
2746
177
        std::set<uint64_t> moduleIDs;
2747
177
        for (const auto& m : modules ) {
2748
154
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
154
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
154
            moduleIDs.insert(moduleID);
2756
154
        }
2757
2758
177
        std::set<uint64_t> operationModuleIDs;
2759
204
        for (const auto& op : operations) {
2760
204
            operationModuleIDs.insert(op.first->ID);
2761
204
        }
2762
2763
177
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
177
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
177
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
177
        for (const auto& id : addModuleIDs) {
2768
57
            operations.push_back({ modules.at(id), operations[0].second});
2769
57
        }
2770
177
    }
2771
177
#endif
2772
2773
177
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
177
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
438
    for (size_t i = 0; i < operations.size(); i++) {
2781
261
        auto& operation = operations[i];
2782
2783
261
        auto& module = operation.first;
2784
261
        auto& op = operation.second;
2785
2786
261
        if ( i > 0 ) {
2787
184
            auto& prevModule = operations[i-1].first;
2788
184
            auto& prevOp = operations[i].second;
2789
2790
184
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
90
                auto& curModifier = op.modifier.GetVectorPtr();
2792
90
                if ( curModifier.size() == 0 ) {
2793
20.5k
                    for (size_t j = 0; j < 512; j++) {
2794
20.4k
                        curModifier.push_back(1);
2795
20.4k
                    }
2796
50
                } else {
2797
2.10k
                    for (auto& c : curModifier) {
2798
2.10k
                        c++;
2799
2.10k
                    }
2800
50
                }
2801
90
            }
2802
184
        }
2803
2804
261
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
261
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
261
        const auto& result = results.back();
2811
2812
261
        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
261
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
261
        if ( options.disableTests == false ) {
2830
261
            tests::test(op, result.second);
2831
261
        }
2832
2833
261
        postprocess(module, op, result);
2834
261
    }
2835
2836
177
    if ( options.noCompare == false ) {
2837
77
        compare(operations, results, data, size);
2838
77
    }
2839
177
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
297
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
297
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
297
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.17k
    do {
2725
4.17k
        auto op = getOp(&parentDs, data, size);
2726
4.17k
        auto module = getModule(parentDs);
2727
4.17k
        if ( module == nullptr ) {
2728
3.71k
            continue;
2729
3.71k
        }
2730
2731
460
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
460
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
18
            break;
2736
18
        }
2737
4.16k
    } while ( parentDs.Get<bool>() == true );
2738
2739
297
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
279
#if 1
2745
279
    {
2746
279
        std::set<uint64_t> moduleIDs;
2747
279
        for (const auto& m : modules ) {
2748
246
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
246
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
246
            moduleIDs.insert(moduleID);
2756
246
        }
2757
2758
279
        std::set<uint64_t> operationModuleIDs;
2759
294
        for (const auto& op : operations) {
2760
294
            operationModuleIDs.insert(op.first->ID);
2761
294
        }
2762
2763
279
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
279
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
279
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
279
        for (const auto& id : addModuleIDs) {
2768
99
            operations.push_back({ modules.at(id), operations[0].second});
2769
99
        }
2770
279
    }
2771
279
#endif
2772
2773
279
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
279
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
672
    for (size_t i = 0; i < operations.size(); i++) {
2781
393
        auto& operation = operations[i];
2782
2783
393
        auto& module = operation.first;
2784
393
        auto& op = operation.second;
2785
2786
393
        if ( i > 0 ) {
2787
270
            auto& prevModule = operations[i-1].first;
2788
270
            auto& prevOp = operations[i].second;
2789
2790
270
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
128
                auto& curModifier = op.modifier.GetVectorPtr();
2792
128
                if ( curModifier.size() == 0 ) {
2793
37.4k
                    for (size_t j = 0; j < 512; j++) {
2794
37.3k
                        curModifier.push_back(1);
2795
37.3k
                    }
2796
73
                } else {
2797
2.19k
                    for (auto& c : curModifier) {
2798
2.19k
                        c++;
2799
2.19k
                    }
2800
55
                }
2801
128
            }
2802
270
        }
2803
2804
393
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
393
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
393
        const auto& result = results.back();
2811
2812
393
        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
393
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
393
        if ( options.disableTests == false ) {
2830
393
            tests::test(op, result.second);
2831
393
        }
2832
2833
393
        postprocess(module, op, result);
2834
393
    }
2835
2836
279
    if ( options.noCompare == false ) {
2837
123
        compare(operations, results, data, size);
2838
123
    }
2839
279
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
256
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
256
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
256
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.74k
    do {
2725
3.74k
        auto op = getOp(&parentDs, data, size);
2726
3.74k
        auto module = getModule(parentDs);
2727
3.74k
        if ( module == nullptr ) {
2728
3.36k
            continue;
2729
3.36k
        }
2730
2731
380
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
380
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
3.72k
    } while ( parentDs.Get<bool>() == true );
2738
2739
256
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
243
#if 1
2745
243
    {
2746
243
        std::set<uint64_t> moduleIDs;
2747
243
        for (const auto& m : modules ) {
2748
180
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
180
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
180
            moduleIDs.insert(moduleID);
2756
180
        }
2757
2758
243
        std::set<uint64_t> operationModuleIDs;
2759
243
        for (const auto& op : operations) {
2760
224
            operationModuleIDs.insert(op.first->ID);
2761
224
        }
2762
2763
243
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
243
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
243
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
243
        for (const auto& id : addModuleIDs) {
2768
64
            operations.push_back({ modules.at(id), operations[0].second});
2769
64
        }
2770
243
    }
2771
243
#endif
2772
2773
243
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
243
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
531
    for (size_t i = 0; i < operations.size(); i++) {
2781
288
        auto& operation = operations[i];
2782
2783
288
        auto& module = operation.first;
2784
288
        auto& op = operation.second;
2785
2786
288
        if ( i > 0 ) {
2787
198
            auto& prevModule = operations[i-1].first;
2788
198
            auto& prevOp = operations[i].second;
2789
2790
198
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
91
                auto& curModifier = op.modifier.GetVectorPtr();
2792
91
                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
651
                    for (auto& c : curModifier) {
2798
651
                        c++;
2799
651
                    }
2800
41
                }
2801
91
            }
2802
198
        }
2803
2804
288
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
288
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
288
        const auto& result = results.back();
2811
2812
288
        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
288
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
288
        if ( options.disableTests == false ) {
2830
288
            tests::test(op, result.second);
2831
288
        }
2832
2833
288
        postprocess(module, op, result);
2834
288
    }
2835
2836
243
    if ( options.noCompare == false ) {
2837
90
        compare(operations, results, data, size);
2838
90
    }
2839
243
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
436
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
436
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
436
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.96k
    do {
2725
4.96k
        auto op = getOp(&parentDs, data, size);
2726
4.96k
        auto module = getModule(parentDs);
2727
4.96k
        if ( module == nullptr ) {
2728
4.33k
            continue;
2729
4.33k
        }
2730
2731
623
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
623
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
16
            break;
2736
16
        }
2737
4.94k
    } while ( parentDs.Get<bool>() == true );
2738
2739
436
    if ( operations.empty() == true ) {
2740
19
        return;
2741
19
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
417
#if 1
2745
417
    {
2746
417
        std::set<uint64_t> moduleIDs;
2747
417
        for (const auto& m : modules ) {
2748
254
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
254
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
254
            moduleIDs.insert(moduleID);
2756
254
        }
2757
2758
417
        std::set<uint64_t> operationModuleIDs;
2759
417
        for (const auto& op : operations) {
2760
317
            operationModuleIDs.insert(op.first->ID);
2761
317
        }
2762
2763
417
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
417
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
417
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
417
        for (const auto& id : addModuleIDs) {
2768
101
            operations.push_back({ modules.at(id), operations[0].second});
2769
101
        }
2770
417
    }
2771
417
#endif
2772
2773
417
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
417
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
835
    for (size_t i = 0; i < operations.size(); i++) {
2781
418
        auto& operation = operations[i];
2782
2783
418
        auto& module = operation.first;
2784
418
        auto& op = operation.second;
2785
2786
418
        if ( i > 0 ) {
2787
291
            auto& prevModule = operations[i-1].first;
2788
291
            auto& prevOp = operations[i].second;
2789
2790
291
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
151
                auto& curModifier = op.modifier.GetVectorPtr();
2792
151
                if ( curModifier.size() == 0 ) {
2793
40.5k
                    for (size_t j = 0; j < 512; j++) {
2794
40.4k
                        curModifier.push_back(1);
2795
40.4k
                    }
2796
79
                } else {
2797
44.5k
                    for (auto& c : curModifier) {
2798
44.5k
                        c++;
2799
44.5k
                    }
2800
72
                }
2801
151
            }
2802
291
        }
2803
2804
418
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
418
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
418
        const auto& result = results.back();
2811
2812
418
        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
418
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
418
        if ( options.disableTests == false ) {
2830
418
            tests::test(op, result.second);
2831
418
        }
2832
2833
418
        postprocess(module, op, result);
2834
418
    }
2835
2836
417
    if ( options.noCompare == false ) {
2837
127
        compare(operations, results, data, size);
2838
127
    }
2839
417
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
222
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
222
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
222
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.01k
    do {
2725
3.01k
        auto op = getOp(&parentDs, data, size);
2726
3.01k
        auto module = getModule(parentDs);
2727
3.01k
        if ( module == nullptr ) {
2728
2.70k
            continue;
2729
2.70k
        }
2730
2731
309
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
309
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
3.00k
    } while ( parentDs.Get<bool>() == true );
2738
2739
222
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
215
#if 1
2745
215
    {
2746
215
        std::set<uint64_t> moduleIDs;
2747
215
        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
215
        std::set<uint64_t> operationModuleIDs;
2759
215
        for (const auto& op : operations) {
2760
170
            operationModuleIDs.insert(op.first->ID);
2761
170
        }
2762
2763
215
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
215
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
215
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
215
        for (const auto& id : addModuleIDs) {
2768
37
            operations.push_back({ modules.at(id), operations[0].second});
2769
37
        }
2770
215
    }
2771
215
#endif
2772
2773
215
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
215
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
422
    for (size_t i = 0; i < operations.size(); i++) {
2781
207
        auto& operation = operations[i];
2782
2783
207
        auto& module = operation.first;
2784
207
        auto& op = operation.second;
2785
2786
207
        if ( i > 0 ) {
2787
151
            auto& prevModule = operations[i-1].first;
2788
151
            auto& prevOp = operations[i].second;
2789
2790
151
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
81
                auto& curModifier = op.modifier.GetVectorPtr();
2792
81
                if ( curModifier.size() == 0 ) {
2793
19.4k
                    for (size_t j = 0; j < 512; j++) {
2794
19.4k
                        curModifier.push_back(1);
2795
19.4k
                    }
2796
43
                } else {
2797
663
                    for (auto& c : curModifier) {
2798
663
                        c++;
2799
663
                    }
2800
43
                }
2801
81
            }
2802
151
        }
2803
2804
207
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
207
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
207
        const auto& result = results.back();
2811
2812
207
        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
207
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
207
        if ( options.disableTests == false ) {
2830
207
            tests::test(op, result.second);
2831
207
        }
2832
2833
207
        postprocess(module, op, result);
2834
207
    }
2835
2836
215
    if ( options.noCompare == false ) {
2837
56
        compare(operations, results, data, size);
2838
56
    }
2839
215
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
227
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
227
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
227
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.57k
    do {
2725
3.57k
        auto op = getOp(&parentDs, data, size);
2726
3.57k
        auto module = getModule(parentDs);
2727
3.57k
        if ( module == nullptr ) {
2728
3.16k
            continue;
2729
3.16k
        }
2730
2731
410
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
410
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
3.56k
    } while ( parentDs.Get<bool>() == true );
2738
2739
227
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
215
#if 1
2745
215
    {
2746
215
        std::set<uint64_t> moduleIDs;
2747
215
        for (const auto& m : modules ) {
2748
166
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
166
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
166
            moduleIDs.insert(moduleID);
2756
166
        }
2757
2758
215
        std::set<uint64_t> operationModuleIDs;
2759
222
        for (const auto& op : operations) {
2760
222
            operationModuleIDs.insert(op.first->ID);
2761
222
        }
2762
2763
215
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
215
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
215
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
215
        for (const auto& id : addModuleIDs) {
2768
60
            operations.push_back({ modules.at(id), operations[0].second});
2769
60
        }
2770
215
    }
2771
215
#endif
2772
2773
215
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
215
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
497
    for (size_t i = 0; i < operations.size(); i++) {
2781
282
        auto& operation = operations[i];
2782
2783
282
        auto& module = operation.first;
2784
282
        auto& op = operation.second;
2785
2786
282
        if ( i > 0 ) {
2787
199
            auto& prevModule = operations[i-1].first;
2788
199
            auto& prevOp = operations[i].second;
2789
2790
199
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
103
                auto& curModifier = op.modifier.GetVectorPtr();
2792
103
                if ( curModifier.size() == 0 ) {
2793
30.7k
                    for (size_t j = 0; j < 512; j++) {
2794
30.7k
                        curModifier.push_back(1);
2795
30.7k
                    }
2796
60
                } else {
2797
1.71k
                    for (auto& c : curModifier) {
2798
1.71k
                        c++;
2799
1.71k
                    }
2800
43
                }
2801
103
            }
2802
199
        }
2803
2804
282
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
282
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
282
        const auto& result = results.back();
2811
2812
282
        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
282
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
282
        if ( options.disableTests == false ) {
2830
282
            tests::test(op, result.second);
2831
282
        }
2832
2833
282
        postprocess(module, op, result);
2834
282
    }
2835
2836
215
    if ( options.noCompare == false ) {
2837
83
        compare(operations, results, data, size);
2838
83
    }
2839
215
}
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 */