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
90.2k
#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
5.62k
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
5.62k
    (void)module;
53
5.62k
    (void)op;
54
55
5.62k
    if ( result.second != std::nullopt ) {
56
3.10k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
3.10k
    }
58
5.62k
}
59
60
5.62k
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
5.62k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
5.62k
    return module->OpDigest(op);
64
5.62k
}
65
66
/* Specialization for operation::HMAC */
67
2.71k
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
2.71k
    (void)module;
69
2.71k
    (void)op;
70
71
2.71k
    if ( result.second != std::nullopt ) {
72
1.12k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
1.12k
    }
74
2.71k
}
75
76
2.71k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
2.71k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
2.71k
    return module->OpHMAC(op);
80
2.71k
}
81
82
/* Specialization for operation::UMAC */
83
3.27k
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
3.27k
    (void)module;
85
3.27k
    (void)op;
86
87
3.27k
    if ( result.second != std::nullopt ) {
88
1.61k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
1.61k
    }
90
3.27k
}
91
92
3.27k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
3.27k
    return module->OpUMAC(op);
94
3.27k
}
95
96
/* Specialization for operation::CMAC */
97
3.48k
template<> void ExecutorBase<component::MAC, operation::CMAC>::postprocess(std::shared_ptr<Module> module, operation::CMAC& op, const ExecutorBase<component::MAC, operation::CMAC>::ResultPair& result) const {
98
3.48k
    (void)module;
99
3.48k
    (void)op;
100
101
3.48k
    if ( result.second != std::nullopt ) {
102
1.76k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
1.76k
    }
104
3.48k
}
105
106
3.48k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
3.48k
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
3.48k
    return module->OpCMAC(op);
110
3.48k
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
16.4k
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
16.4k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
16.4k
    if ( result.second != std::nullopt ) {
119
6.18k
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
6.18k
        if ( result.second->tag != std::nullopt ) {
121
2.50k
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
2.50k
        }
123
6.18k
    }
124
125
16.4k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
5.69k
        using fuzzing::datasource::ID;
127
128
5.69k
        bool tryDecrypt = true;
129
130
5.69k
        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
5.69k
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
5.69k
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
5.69k
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
5.69k
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
5.69k
                    op.cleartext.GetSize() + 32,
171
172
5.69k
                    op.aad,
173
174
                    /* Empty modifier */
175
5.69k
                    {});
176
177
5.69k
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
5.69k
            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
5.69k
            } 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
5.69k
        }
208
5.69k
    }
209
16.4k
}
210
211
16.4k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
16.4k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
16.4k
    return module->OpSymmetricEncrypt(op);
215
16.4k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
12.5k
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
12.5k
    (void)module;
220
12.5k
    (void)op;
221
222
12.5k
    if ( result.second != std::nullopt ) {
223
922
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
922
    }
225
12.5k
}
226
227
12.5k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
12.5k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
12.5k
    return module->OpSymmetricDecrypt(op);
231
12.5k
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
820
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
820
    (void)module;
236
820
    (void)op;
237
238
820
    if ( result.second != std::nullopt ) {
239
210
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
210
    }
241
820
}
242
243
820
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
820
    return module->OpKDF_SCRYPT(op);
245
820
}
246
247
/* Specialization for operation::KDF_HKDF */
248
6.48k
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
6.48k
    (void)module;
250
6.48k
    (void)op;
251
252
6.48k
    if ( result.second != std::nullopt ) {
253
2.84k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
2.84k
    }
255
6.48k
}
256
257
6.48k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
6.48k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
6.48k
    return module->OpKDF_HKDF(op);
261
6.48k
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
463
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
463
    (void)module;
266
463
    (void)op;
267
268
463
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
463
}
272
273
463
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
463
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
463
    return module->OpKDF_PBKDF(op);
277
463
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
399
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
399
    (void)module;
282
399
    (void)op;
283
284
399
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
399
}
288
289
399
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
399
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
399
    return module->OpKDF_PBKDF1(op);
293
399
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
2.26k
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
2.26k
    (void)module;
298
2.26k
    (void)op;
299
300
2.26k
    if ( result.second != std::nullopt ) {
301
778
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
778
    }
303
2.26k
}
304
305
2.26k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
2.26k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
2.26k
    return module->OpKDF_PBKDF2(op);
309
2.26k
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
494
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
494
    (void)module;
314
494
    (void)op;
315
316
494
    if ( result.second != std::nullopt ) {
317
216
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
216
    }
319
494
}
320
321
494
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
494
    return module->OpKDF_ARGON2(op);
323
494
}
324
325
/* Specialization for operation::KDF_SSH */
326
426
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
426
    (void)module;
328
426
    (void)op;
329
330
426
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
426
}
334
335
426
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
426
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
426
    return module->OpKDF_SSH(op);
339
426
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
701
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
701
    (void)module;
344
701
    (void)op;
345
346
701
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
701
}
350
351
701
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
701
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
701
    return module->OpKDF_TLS1_PRF(op);
355
701
}
356
357
/* Specialization for operation::KDF_X963 */
358
420
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
420
    (void)module;
360
420
    (void)op;
361
362
420
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
420
}
366
367
420
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
420
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
420
    return module->OpKDF_X963(op);
371
420
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
194
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
194
    (void)module;
376
194
    (void)op;
377
378
194
    if ( result.second != std::nullopt ) {
379
31
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
31
    }
381
194
}
382
383
194
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
194
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
194
    return module->OpKDF_BCRYPT(op);
387
194
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
1.82k
template<> void ExecutorBase<component::Key, operation::KDF_SP_800_108>::postprocess(std::shared_ptr<Module> module, operation::KDF_SP_800_108& op, const ExecutorBase<component::Key, operation::KDF_SP_800_108>::ResultPair& result) const {
391
1.82k
    (void)module;
392
1.82k
    (void)op;
393
394
1.82k
    if ( result.second != std::nullopt ) {
395
893
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
893
    }
397
1.82k
}
398
399
1.82k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SP_800_108>::callModule(std::shared_ptr<Module> module, operation::KDF_SP_800_108& op) const {
400
1.82k
    if ( op.mech.mode == true ) {
401
979
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
979
    }
403
404
1.82k
    return module->OpKDF_SP_800_108(op);
405
1.82k
}
406
407
/* Specialization for operation::KDF_SRTP */
408
371
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
371
    (void)module;
410
371
    (void)op;
411
371
    (void)result;
412
371
}
413
414
371
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const {
415
371
    return module->OpKDF_SRTP(op);
416
371
}
417
418
/* Specialization for operation::KDF_SRTCP */
419
516
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
516
    (void)module;
421
516
    (void)op;
422
516
    (void)result;
423
516
}
424
425
516
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const {
426
516
    return module->OpKDF_SRTCP(op);
427
516
}
428
429
/* Specialization for operation::ECC_PrivateToPublic */
430
1.87k
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op, const ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::ResultPair& result) const {
431
1.87k
    (void)module;
432
433
1.87k
    if ( result.second != std::nullopt  ) {
434
716
        const auto curveID = op.curveType.Get();
435
716
        const auto privkey = op.priv.ToTrimmedString();
436
716
        const auto pub_x = result.second->first.ToTrimmedString();
437
716
        const auto pub_y = result.second->second.ToTrimmedString();
438
439
716
        Pool_CurvePrivkey.Set({ curveID, privkey });
440
716
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
441
716
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
442
443
716
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
444
716
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
445
716
    }
446
1.87k
}
447
448
1.87k
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op) const {
449
1.87k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
450
451
1.87k
    const size_t size = op.priv.ToTrimmedString().size();
452
453
1.87k
    if ( size == 0 || size > 4096 ) {
454
0
        return std::nullopt;
455
0
    }
456
457
1.87k
    return module->OpECC_PrivateToPublic(op);
458
1.87k
}
459
460
/* Specialization for operation::ECC_ValidatePubkey */
461
1.42k
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
1.42k
    (void)module;
463
1.42k
    (void)op;
464
1.42k
    (void)result;
465
1.42k
}
466
467
1.42k
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
468
1.42k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
469
470
1.42k
    return module->OpECC_ValidatePubkey(op);
471
1.42k
}
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
49
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
49
    (void)operations;
479
49
    (void)results;
480
49
    (void)data;
481
49
    (void)size;
482
49
}
483
484
2.16k
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
2.16k
    (void)module;
486
487
2.16k
    if ( result.second != std::nullopt  ) {
488
503
        const auto curveID = op.curveType.Get();
489
503
        const auto privkey = result.second->priv.ToTrimmedString();
490
503
        const auto pub_x = result.second->pub.first.ToTrimmedString();
491
503
        const auto pub_y = result.second->pub.second.ToTrimmedString();
492
493
503
        Pool_CurvePrivkey.Set({ curveID, privkey });
494
503
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
495
503
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
496
497
503
        {
498
503
            auto opValidate = operation::ECC_ValidatePubkey(
499
503
                    op.curveType,
500
503
                    result.second->pub,
501
503
                    op.modifier);
502
503
503
            const auto validateResult = module->OpECC_ValidatePubkey(opValidate);
504
503
            CF_ASSERT(
505
503
                    validateResult == std::nullopt ||
506
503
                    *validateResult == true,
507
503
                    "Cannot validate generated public key");
508
503
        }
509
503
    }
510
2.16k
}
511
512
2.16k
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
2.16k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
514
515
2.16k
    return module->OpECC_GenerateKeyPair(op);
516
2.16k
}
517
518
/* Specialization for operation::ECCSI_Sign */
519
154
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
154
    (void)module;
521
522
154
    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
154
}
565
566
154
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
154
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
568
154
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
569
570
154
    const size_t size = op.priv.ToTrimmedString().size();
571
572
154
    if ( size == 0 || size > 4096 ) {
573
0
        return std::nullopt;
574
0
    }
575
576
154
    return module->OpECCSI_Sign(op);
577
154
}
578
579
/* Specialization for operation::ECDSA_Sign */
580
1.35k
template<> void ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Sign& op, const ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::ResultPair& result) const {
581
1.35k
    (void)module;
582
583
1.35k
    if ( result.second != std::nullopt  ) {
584
679
        const auto curveID = op.curveType.Get();
585
679
        const auto cleartext = op.cleartext.ToHex();
586
679
        const auto pub_x = result.second->pub.first.ToTrimmedString();
587
679
        const auto pub_y = result.second->pub.second.ToTrimmedString();
588
679
        const auto sig_r = result.second->signature.first.ToTrimmedString();
589
679
        const auto sig_s = result.second->signature.second.ToTrimmedString();
590
591
679
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
592
679
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
593
679
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
594
595
679
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
596
679
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
597
679
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
598
679
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
599
600
679
        {
601
679
            auto opVerify = operation::ECDSA_Verify(
602
679
                    op,
603
679
                    *(result.second),
604
679
                    op.modifier);
605
606
679
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
607
679
            CF_ASSERT(
608
679
                    verifyResult == std::nullopt ||
609
679
                    *verifyResult == true,
610
679
                    "Cannot verify generated signature");
611
679
        }
612
679
    }
613
1.35k
}
614
615
1.35k
template<> std::optional<component::ECDSA_Signature> ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Sign& op) const {
616
1.35k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
617
1.35k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
618
619
1.35k
    const size_t size = op.priv.ToTrimmedString().size();
620
621
1.35k
    if ( size == 0 || size > 4096 ) {
622
2
        return std::nullopt;
623
2
    }
624
625
1.35k
    return module->OpECDSA_Sign(op);
626
1.35k
}
627
628
/* Specialization for operation::ECGDSA_Sign */
629
471
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
471
    (void)module;
631
632
471
    if ( result.second != std::nullopt  ) {
633
71
        const auto curveID = op.curveType.Get();
634
71
        const auto cleartext = op.cleartext.ToHex();
635
71
        const auto pub_x = result.second->pub.first.ToTrimmedString();
636
71
        const auto pub_y = result.second->pub.second.ToTrimmedString();
637
71
        const auto sig_r = result.second->signature.first.ToTrimmedString();
638
71
        const auto sig_s = result.second->signature.second.ToTrimmedString();
639
640
71
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
641
71
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
642
71
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
643
644
71
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
645
71
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
646
71
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
647
71
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
648
71
    }
649
471
}
650
651
471
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
471
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
653
471
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
654
655
471
    const size_t size = op.priv.ToTrimmedString().size();
656
657
471
    if ( size == 0 || size > 4096 ) {
658
0
        return std::nullopt;
659
0
    }
660
661
471
    return module->OpECGDSA_Sign(op);
662
471
}
663
664
/* Specialization for operation::ECRDSA_Sign */
665
133
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
133
    (void)module;
667
668
133
    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
133
}
686
687
133
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
133
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
689
133
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
690
691
133
    const size_t size = op.priv.ToTrimmedString().size();
692
693
133
    if ( size == 0 || size > 4096 ) {
694
0
        return std::nullopt;
695
0
    }
696
697
133
    return module->OpECRDSA_Sign(op);
698
133
}
699
700
/* Specialization for operation::Schnorr_Sign */
701
130
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
130
    (void)module;
703
704
130
    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
130
}
722
723
130
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
130
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
130
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
726
727
130
    const size_t size = op.priv.ToTrimmedString().size();
728
729
130
    if ( size == 0 || size > 4096 ) {
730
0
        return std::nullopt;
731
0
    }
732
733
130
    return module->OpSchnorr_Sign(op);
734
130
}
735
736
/* Specialization for operation::ECCSI_Verify */
737
147
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
147
    (void)module;
739
147
    (void)op;
740
147
    (void)result;
741
147
}
742
743
147
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
744
147
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
745
147
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
746
747
147
    return module->OpECCSI_Verify(op);
748
147
}
749
750
/* Specialization for operation::ECDSA_Verify */
751
800
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
800
    (void)module;
753
800
    (void)op;
754
800
    (void)result;
755
800
}
756
757
800
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
758
800
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
759
800
    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
800
    return module->OpECDSA_Verify(op);
772
800
}
773
774
/* Specialization for operation::ECGDSA_Verify */
775
467
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
467
    (void)module;
777
467
    (void)op;
778
467
    (void)result;
779
467
}
780
781
467
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
782
467
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
783
467
    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
467
    return module->OpECGDSA_Verify(op);
796
467
}
797
798
/* Specialization for operation::ECRDSA_Verify */
799
135
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
135
    (void)module;
801
135
    (void)op;
802
135
    (void)result;
803
135
}
804
805
135
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
806
135
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
807
135
    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
135
    return module->OpECRDSA_Verify(op);
820
135
}
821
822
/* Specialization for operation::Schnorr_Verify */
823
99
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
99
    (void)module;
825
99
    (void)op;
826
99
    (void)result;
827
99
}
828
829
99
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
830
99
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
831
99
    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
99
    return module->OpSchnorr_Verify(op);
844
99
}
845
846
1.34k
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Recover& op, const ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::ResultPair& result) const {
847
1.34k
    (void)module;
848
1.34k
    (void)op;
849
1.34k
    (void)result;
850
1.34k
}
851
852
1.34k
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Recover& op) const {
853
1.34k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
854
1.34k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
855
856
1.34k
    return module->OpECDSA_Recover(op);
857
1.34k
}
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
623
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
623
    (void)module;
869
623
    (void)op;
870
623
    (void)result;
871
623
}
872
873
623
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
874
623
    const std::vector<size_t> sizes = {
875
623
        op.parameters.p.ToTrimmedString().size(),
876
623
        op.parameters.q.ToTrimmedString().size(),
877
623
        op.parameters.g.ToTrimmedString().size(),
878
623
        op.pub.ToTrimmedString().size(),
879
623
        op.signature.first.ToTrimmedString().size(),
880
623
        op.signature.second.ToTrimmedString().size(),
881
623
    };
882
883
3.73k
    for (const auto& size : sizes) {
884
3.73k
        if ( size == 0 || size > 4096 ) {
885
2
            return std::nullopt;
886
2
        }
887
3.73k
    }
888
889
621
    return module->OpDSA_Verify(op);
890
623
}
891
892
/* Specialization for operation::DSA_Sign */
893
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
894
template <>
895
56
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
56
    (void)operations;
897
56
    (void)results;
898
56
    (void)data;
899
56
    (void)size;
900
56
}
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
191
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
191
    (void)module;
910
191
    (void)op;
911
191
    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
191
}
934
935
191
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
191
    const std::vector<size_t> sizes = {
937
191
        op.parameters.p.ToTrimmedString().size(),
938
191
        op.parameters.q.ToTrimmedString().size(),
939
191
        op.parameters.g.ToTrimmedString().size(),
940
191
        op.priv.ToTrimmedString().size(),
941
191
    };
942
943
758
    for (const auto& size : sizes) {
944
758
        if ( size == 0 || size > 4096 ) {
945
2
            return std::nullopt;
946
2
        }
947
758
    }
948
949
189
    return module->OpDSA_Sign(op);
950
191
}
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
140
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
140
    (void)result;
963
140
    (void)module;
964
140
    (void)op;
965
140
    if ( result.second != std::nullopt ) {
966
        //Pool_DSA_PubPriv.Set({pub, priv});
967
0
    }
968
140
}
969
970
140
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
971
140
    return module->OpDSA_PrivateToPublic(op);
972
140
}
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
53
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
53
    (void)operations;
980
53
    (void)results;
981
53
    (void)data;
982
53
    (void)size;
983
53
}
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
170
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
170
    (void)result;
994
170
    (void)module;
995
170
    (void)op;
996
170
    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
170
}
1003
1004
170
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
170
    const std::vector<size_t> sizes = {
1006
170
        op.p.ToTrimmedString().size(),
1007
170
        op.q.ToTrimmedString().size(),
1008
170
        op.g.ToTrimmedString().size(),
1009
170
    };
1010
1011
510
    for (const auto& size : sizes) {
1012
510
        if ( size == 0 || size > 4096 ) {
1013
0
            return std::nullopt;
1014
0
        }
1015
510
    }
1016
1017
170
    return module->OpDSA_GenerateKeyPair(op);
1018
170
}
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
35
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
35
    (void)operations;
1026
35
    (void)results;
1027
35
    (void)data;
1028
35
    (void)size;
1029
35
}
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
126
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
126
    (void)result;
1040
126
    (void)module;
1041
126
    (void)op;
1042
126
    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
126
}
1054
1055
126
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
126
    return module->OpDSA_GenerateParameters(op);
1057
126
}
1058
1059
/* Specialization for operation::ECDH_Derive */
1060
120
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
120
    (void)module;
1062
120
    (void)op;
1063
120
    (void)result;
1064
120
}
1065
1066
120
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1067
120
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1068
1069
120
    return module->OpECDH_Derive(op);
1070
120
}
1071
1072
/* Specialization for operation::ECIES_Encrypt */
1073
template <>
1074
47
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
47
    (void)operations;
1076
47
    (void)results;
1077
47
    (void)data;
1078
47
    (void)size;
1079
47
}
1080
163
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
163
    (void)module;
1082
163
    (void)op;
1083
163
    (void)result;
1084
163
}
1085
1086
163
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1087
163
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1088
1089
163
    return module->OpECIES_Encrypt(op);
1090
163
}
1091
1092
/* Specialization for operation::ECIES_Decrypt */
1093
169
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
169
    (void)module;
1095
169
    (void)op;
1096
169
    (void)result;
1097
169
}
1098
1099
169
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1100
169
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1101
1102
169
    return module->OpECIES_Decrypt(op);
1103
169
}
1104
1105
/* Specialization for operation::ECC_Point_Add */
1106
241
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
241
    (void)module;
1108
1109
241
    if ( result.second != std::nullopt  ) {
1110
24
        const auto curveID = op.curveType.Get();
1111
24
        const auto x = result.second->first.ToTrimmedString();
1112
24
        const auto y = result.second->second.ToTrimmedString();
1113
1114
24
        Pool_CurveECC_Point.Set({ curveID, x, y });
1115
1116
24
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1117
24
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1118
24
    }
1119
241
}
1120
1121
241
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
241
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1123
1124
241
    return module->OpECC_Point_Add(op);
1125
241
}
1126
1127
/* Specialization for operation::ECC_Point_Sub */
1128
291
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
291
    (void)module;
1130
1131
291
    if ( result.second != std::nullopt  ) {
1132
50
        const auto curveID = op.curveType.Get();
1133
50
        const auto x = result.second->first.ToTrimmedString();
1134
50
        const auto y = result.second->second.ToTrimmedString();
1135
1136
50
        Pool_CurveECC_Point.Set({ curveID, x, y });
1137
1138
50
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1139
50
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1140
50
    }
1141
291
}
1142
1143
291
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
291
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1145
1146
291
    return module->OpECC_Point_Sub(op);
1147
291
}
1148
1149
/* Specialization for operation::ECC_Point_Mul */
1150
506
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
506
    (void)module;
1152
1153
506
    if ( result.second != std::nullopt  ) {
1154
148
        const auto curveID = op.curveType.Get();
1155
148
        const auto x = result.second->first.ToTrimmedString();
1156
148
        const auto y = result.second->second.ToTrimmedString();
1157
1158
148
        Pool_CurveECC_Point.Set({ curveID, x, y });
1159
1160
148
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1161
148
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1162
148
    }
1163
506
}
1164
1165
506
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
506
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1167
1168
506
    return module->OpECC_Point_Mul(op);
1169
506
}
1170
1171
/* Specialization for operation::ECC_Point_Neg */
1172
218
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
218
    (void)module;
1174
1175
218
    if ( result.second != std::nullopt  ) {
1176
37
        const auto curveID = op.curveType.Get();
1177
37
        const auto x = result.second->first.ToTrimmedString();
1178
37
        const auto y = result.second->second.ToTrimmedString();
1179
1180
37
        Pool_CurveECC_Point.Set({ curveID, x, y });
1181
1182
37
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1183
37
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1184
37
    }
1185
218
}
1186
1187
218
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
218
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1189
1190
218
    return module->OpECC_Point_Neg(op);
1191
218
}
1192
1193
/* Specialization for operation::ECC_Point_Dbl */
1194
237
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
237
    (void)module;
1196
1197
237
    if ( result.second != std::nullopt  ) {
1198
33
        const auto curveID = op.curveType.Get();
1199
33
        const auto x = result.second->first.ToTrimmedString();
1200
33
        const auto y = result.second->second.ToTrimmedString();
1201
1202
33
        Pool_CurveECC_Point.Set({ curveID, x, y });
1203
1204
33
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1205
33
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1206
33
    }
1207
237
}
1208
1209
237
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
237
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1211
1212
237
    return module->OpECC_Point_Dbl(op);
1213
237
}
1214
1215
/* Specialization for operation::ECC_Point_Cmp */
1216
213
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
213
    (void)module;
1218
213
    (void)result;
1219
213
    (void)op;
1220
213
}
1221
1222
213
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1223
213
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1224
1225
213
    return module->OpECC_Point_Cmp(op);
1226
213
}
1227
1228
/* Specialization for operation::DH_Derive */
1229
617
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
617
    (void)module;
1231
617
    (void)op;
1232
617
    (void)result;
1233
617
}
1234
1235
617
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1236
617
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1237
608
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1238
599
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1239
589
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1240
1241
580
    return module->OpDH_Derive(op);
1242
589
}
1243
1244
/* Specialization for operation::DH_GenerateKeyPair */
1245
168
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
168
    (void)result;
1247
168
    (void)op;
1248
168
    (void)module;
1249
1250
168
    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
168
}
1258
1259
168
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
168
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1261
159
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1262
1263
150
    return module->OpDH_GenerateKeyPair(op);
1264
159
}
1265
1266
/* Specialization for operation::BignumCalc */
1267
15.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
15.8k
    (void)module;
1269
15.8k
    (void)op;
1270
1271
15.8k
    if ( result.second != std::nullopt  ) {
1272
3.78k
        const auto bignum = result.second->ToTrimmedString();
1273
1274
3.78k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1275
3.76k
            Pool_Bignum.Set(bignum);
1276
3.76k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1277
519
                Pool_Bignum_Primes.Set(bignum);
1278
519
            }
1279
3.76k
        }
1280
3.78k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1281
188
            if ( bignum == "1" ) {
1282
117
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1283
117
            }
1284
188
        }
1285
3.78k
    }
1286
15.8k
}
1287
1288
15.8k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1289
15.8k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1290
1291
    /* Prevent timeouts */
1292
15.8k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1293
15.8k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1294
15.8k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1295
15.7k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1296
1297
15.7k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1298
1.36k
        return std::nullopt;
1299
1.36k
    }
1300
1301
14.4k
    switch ( op.calcOp.Get() ) {
1302
63
        case    CF_CALCOP("SetBit(A,B)"):
1303
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1304
63
            if ( op.bn1.GetSize() > 4 ) {
1305
10
                return std::nullopt;
1306
10
            }
1307
53
            break;
1308
71
        case    CF_CALCOP("Exp(A,B)"):
1309
71
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1310
20
                return std::nullopt;
1311
20
            }
1312
51
            break;
1313
51
        case    CF_CALCOP("ModLShift(A,B,C)"):
1314
20
            if ( op.bn1.GetSize() > 4 ) {
1315
10
                return std::nullopt;
1316
10
            }
1317
10
            break;
1318
98
        case    CF_CALCOP("Exp2(A)"):
1319
98
            if ( op.bn0.GetSize() > 4 ) {
1320
11
                return std::nullopt;
1321
11
            }
1322
87
            break;
1323
14.4k
    }
1324
1325
14.3k
    return module->OpBignumCalc(op);
1326
14.4k
}
1327
1328
/* Specialization for operation::BignumCalc_Fp2 */
1329
234
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
234
    (void)module;
1331
234
    (void)op;
1332
1333
234
    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
234
}
1345
1346
234
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1347
234
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1348
1349
    /* Prevent timeouts */
1350
234
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1351
225
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1352
216
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1353
207
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1354
196
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1355
187
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1356
178
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1357
169
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1358
1359
160
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1360
0
        return std::nullopt;
1361
0
    }
1362
1363
160
    return module->OpBignumCalc_Fp2(op);
1364
160
}
1365
1366
/* Specialization for operation::BignumCalc_Fp12 */
1367
689
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
689
    (void)module;
1369
689
    (void)op;
1370
1371
689
    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
689
}
1400
1401
689
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1402
689
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1403
1404
    /* Prevent timeouts */
1405
689
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1406
680
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1407
671
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1408
662
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1409
653
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1410
644
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1411
635
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1412
626
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1413
617
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1414
608
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1415
598
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1416
589
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1417
1418
580
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1419
571
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1420
562
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1421
553
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1422
544
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1423
535
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1424
526
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1425
517
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1426
508
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1427
499
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1428
490
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1429
481
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1430
1431
471
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1432
462
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1433
453
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1434
444
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1435
435
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1436
426
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1437
417
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1438
408
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1439
399
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1440
390
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1441
381
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1442
372
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1443
1444
363
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1445
354
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1446
345
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1447
336
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1448
325
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1449
316
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1450
307
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1451
298
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1452
289
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1453
280
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1454
271
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1455
262
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1456
1457
253
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1458
0
        return std::nullopt;
1459
0
    }
1460
1461
253
    return module->OpBignumCalc_Fp12(op);
1462
253
}
1463
1464
/* Specialization for operation::BLS_PrivateToPublic */
1465
128
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
128
    (void)module;
1467
1468
128
    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
128
}
1479
1480
128
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
128
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1482
1483
128
    const size_t size = op.priv.ToTrimmedString().size();
1484
1485
128
    if ( size == 0 || size > 4096 ) {
1486
0
        return std::nullopt;
1487
0
    }
1488
1489
128
    return module->OpBLS_PrivateToPublic(op);
1490
128
}
1491
1492
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1493
138
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
138
    (void)module;
1495
138
    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
138
}
1510
1511
138
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
138
    const size_t size = op.priv.ToTrimmedString().size();
1513
1514
138
    if ( size == 0 || size > 4096 ) {
1515
0
        return std::nullopt;
1516
0
    }
1517
1518
138
    return module->OpBLS_PrivateToPublic_G2(op);
1519
138
}
1520
1521
/* Specialization for operation::BLS_Sign */
1522
154
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
154
    (void)module;
1524
1525
154
    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
154
}
1553
1554
154
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
154
    const size_t size = op.priv.ToTrimmedString().size();
1556
1557
154
    if ( size == 0 || size > 4096 ) {
1558
0
        return std::nullopt;
1559
0
    }
1560
1561
154
    return module->OpBLS_Sign(op);
1562
154
}
1563
1564
/* Specialization for operation::BLS_Verify */
1565
157
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
157
    (void)module;
1567
157
    (void)op;
1568
157
    (void)result;
1569
157
}
1570
1571
157
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
157
    return module->OpBLS_Verify(op);
1588
157
}
1589
1590
/* Specialization for operation::BLS_BatchSign */
1591
168
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
168
    (void)module;
1593
168
    (void)op;
1594
1595
168
    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
168
}
1624
1625
168
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
168
    return module->OpBLS_BatchSign(op);
1627
168
}
1628
1629
/* Specialization for operation::BLS_BatchVerify */
1630
152
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
152
    (void)module;
1632
152
    (void)op;
1633
152
    (void)result;
1634
152
}
1635
1636
152
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1637
152
    return module->OpBLS_BatchVerify(op);
1638
152
}
1639
1640
/* Specialization for operation::BLS_Aggregate_G1 */
1641
134
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
134
    (void)module;
1643
134
    (void)op;
1644
134
    (void)result;
1645
134
}
1646
1647
134
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
134
    return module->OpBLS_Aggregate_G1(op);
1649
134
}
1650
1651
/* Specialization for operation::BLS_Aggregate_G2 */
1652
135
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
135
    (void)module;
1654
135
    (void)op;
1655
135
    (void)result;
1656
135
}
1657
1658
135
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
135
    return module->OpBLS_Aggregate_G2(op);
1660
135
}
1661
1662
/* Specialization for operation::BLS_Pairing */
1663
105
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
105
    (void)module;
1665
105
    (void)op;
1666
1667
105
    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
105
}
1684
1685
105
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1686
105
    return module->OpBLS_Pairing(op);
1687
105
}
1688
1689
/* Specialization for operation::BLS_MillerLoop */
1690
127
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
127
    (void)module;
1692
127
    (void)op;
1693
1694
127
    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
127
}
1711
1712
127
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1713
127
    return module->OpBLS_MillerLoop(op);
1714
127
}
1715
1716
/* Specialization for operation::BLS_FinalExp */
1717
170
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
170
    (void)module;
1719
170
    (void)op;
1720
1721
170
    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
170
}
1738
1739
170
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1740
170
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1741
170
    return module->OpBLS_FinalExp(op);
1742
170
}
1743
1744
/* Specialization for operation::BLS_HashToG1 */
1745
146
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
146
    (void)module;
1747
1748
146
    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
146
}
1759
1760
146
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1761
146
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1762
146
    return module->OpBLS_HashToG1(op);
1763
146
}
1764
1765
/* Specialization for operation::BLS_MapToG1 */
1766
131
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
131
    (void)module;
1768
1769
131
    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
131
}
1780
1781
131
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1782
131
    return module->OpBLS_MapToG1(op);
1783
131
}
1784
1785
/* Specialization for operation::BLS_MapToG2 */
1786
120
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
120
    (void)module;
1788
1789
120
    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
120
}
1804
1805
120
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1806
120
    return module->OpBLS_MapToG2(op);
1807
120
}
1808
1809
/* Specialization for operation::BLS_IsG1OnCurve */
1810
122
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
122
    (void)module;
1812
122
    (void)op;
1813
122
    (void)result;
1814
122
}
1815
1816
122
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1817
122
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1818
122
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1819
122
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1820
1821
120
    return module->OpBLS_IsG1OnCurve(op);
1822
122
}
1823
1824
/* Specialization for operation::BLS_IsG2OnCurve */
1825
157
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
157
    (void)module;
1827
157
    (void)op;
1828
157
    (void)result;
1829
157
}
1830
1831
157
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1832
157
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1833
148
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1834
139
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1835
130
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1836
1837
121
    return module->OpBLS_IsG2OnCurve(op);
1838
130
}
1839
1840
/* Specialization for operation::BLS_GenerateKeyPair */
1841
139
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
139
    (void)module;
1843
1844
139
    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
139
}
1857
1858
139
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
139
    return module->OpBLS_GenerateKeyPair(op);
1860
139
}
1861
1862
/* Specialization for operation::BLS_Decompress_G1 */
1863
117
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
117
    (void)module;
1865
1866
117
    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
117
}
1877
1878
117
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
117
    return module->OpBLS_Decompress_G1(op);
1880
117
}
1881
1882
/* Specialization for operation::BLS_Compress_G1 */
1883
124
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
124
    (void)module;
1885
124
    (void)op;
1886
1887
124
    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
124
}
1893
1894
124
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
124
    return module->OpBLS_Compress_G1(op);
1896
124
}
1897
1898
/* Specialization for operation::BLS_Decompress_G2 */
1899
99
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
99
    (void)module;
1901
1902
99
    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
99
}
1917
1918
99
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
99
    return module->OpBLS_Decompress_G2(op);
1920
99
}
1921
1922
/* Specialization for operation::BLS_Compress_G2 */
1923
109
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
109
    (void)module;
1925
1926
109
    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
109
}
1937
1938
109
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
109
    return module->OpBLS_Compress_G2(op);
1940
109
}
1941
1942
/* Specialization for operation::BLS_G1_Add */
1943
167
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
167
    (void)module;
1945
1946
167
    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
167
}
1957
1958
167
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
167
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1960
167
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1961
158
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1962
149
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1963
140
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1964
1965
131
    return module->OpBLS_G1_Add(op);
1966
140
}
1967
1968
/* Specialization for operation::BLS_G1_Mul */
1969
130
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
130
    (void)module;
1971
1972
130
    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
130
}
1983
1984
130
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
130
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1986
130
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1987
130
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1988
130
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1989
1990
130
    return module->OpBLS_G1_Mul(op);
1991
130
}
1992
1993
/* Specialization for operation::BLS_G1_IsEq */
1994
187
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
187
    (void)module;
1996
187
    (void)op;
1997
187
    (void)result;
1998
187
}
1999
2000
187
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
2001
187
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2002
187
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2003
178
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2004
169
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2005
160
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2006
2007
149
    return module->OpBLS_G1_IsEq(op);
2008
160
}
2009
2010
/* Specialization for operation::BLS_G1_Neg */
2011
128
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
128
    (void)module;
2013
2014
128
    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
128
}
2025
2026
128
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
128
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2028
128
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
126
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
2031
126
    return module->OpBLS_G1_Neg(op);
2032
126
}
2033
2034
/* Specialization for operation::BLS_G2_Add */
2035
247
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
247
    (void)module;
2037
2038
247
    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
247
}
2053
2054
247
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
247
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2056
247
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2057
238
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2058
229
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2059
220
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2060
211
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2061
202
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2062
193
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2063
184
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2064
2065
175
    return module->OpBLS_G2_Add(op);
2066
184
}
2067
2068
/* Specialization for operation::BLS_G2_Mul */
2069
155
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
155
    (void)module;
2071
2072
155
    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
155
}
2087
2088
155
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
155
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2090
155
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2091
155
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2092
155
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2093
155
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2094
155
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2095
2096
146
    return module->OpBLS_G2_Mul(op);
2097
155
}
2098
2099
/* Specialization for operation::BLS_G2_IsEq */
2100
206
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
206
    (void)module;
2102
206
    (void)op;
2103
206
    (void)result;
2104
206
}
2105
2106
206
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2107
206
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2108
206
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2109
197
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2110
188
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2111
179
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2112
170
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2113
161
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2114
152
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2115
143
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2116
2117
141
    return module->OpBLS_G2_IsEq(op);
2118
143
}
2119
2120
/* Specialization for operation::BLS_G2_Neg */
2121
156
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
156
    (void)module;
2123
2124
156
    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
156
}
2139
2140
156
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
156
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2142
156
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2143
147
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2144
140
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2145
131
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2146
2147
122
    return module->OpBLS_G2_Neg(op);
2148
131
}
2149
2150
/* Specialization for operation::BLS_G1_MultiExp */
2151
232
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
232
    (void)module;
2153
2154
232
    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
232
}
2165
2166
232
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
232
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2168
2169
1.06k
    for (const auto& point_scalar : op.points_scalars.points_scalars) {
2170
1.06k
        if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2171
1.05k
        if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2172
1.04k
        if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2173
1.04k
    }
2174
2175
205
    return module->OpBLS_G1_MultiExp(op);
2176
232
}
2177
2178
/* Specialization for operation::Misc */
2179
111
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2180
111
    (void)module;
2181
111
    (void)op;
2182
111
    (void)result;
2183
111
}
2184
2185
111
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2186
111
    return module->OpMisc(op);
2187
111
}
2188
2189
/* Specialization for operation::BLS_HashToG2 */
2190
157
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
157
    (void)module;
2192
2193
157
    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
157
}
2208
2209
157
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2210
157
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2211
157
    return module->OpBLS_HashToG2(op);
2212
157
}
2213
2214
ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2215
    ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options)
2216
23
{ }
2217
22
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2218
22
    this->modulo = component::Bignum(modulo);
2219
22
}
2220
2221
ExecutorBignumCalc_Mod_BLS12_381_R::ExecutorBignumCalc_Mod_BLS12_381_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2222
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2223
1
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2224
1
}
2225
2226
ExecutorBignumCalc_Mod_BLS12_381_P::ExecutorBignumCalc_Mod_BLS12_381_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2227
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2228
1
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2229
1
}
2230
2231
ExecutorBignumCalc_Mod_BLS12_377_R::ExecutorBignumCalc_Mod_BLS12_377_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2232
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2233
1
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2234
1
}
2235
2236
ExecutorBignumCalc_Mod_BLS12_377_P::ExecutorBignumCalc_Mod_BLS12_377_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2237
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2238
1
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2239
1
}
2240
2241
ExecutorBignumCalc_Mod_BN128_R::ExecutorBignumCalc_Mod_BN128_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2242
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2243
1
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2244
1
}
2245
2246
ExecutorBignumCalc_Mod_BN128_P::ExecutorBignumCalc_Mod_BN128_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2247
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2248
1
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2249
1
}
2250
2251
ExecutorBignumCalc_Mod_Vesta_R::ExecutorBignumCalc_Mod_Vesta_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2252
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2253
1
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337"));
2254
1
}
2255
2256
ExecutorBignumCalc_Mod_Vesta_P::ExecutorBignumCalc_Mod_Vesta_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2257
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2258
1
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097"));
2259
1
}
2260
2261
ExecutorBignumCalc_Mod_ED25519::ExecutorBignumCalc_Mod_ED25519(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2262
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2263
1
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2264
1
}
2265
2266
ExecutorBignumCalc_Mod_Edwards_R::ExecutorBignumCalc_Mod_Edwards_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2267
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2268
1
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2269
1
}
2270
2271
ExecutorBignumCalc_Mod_Edwards_P::ExecutorBignumCalc_Mod_Edwards_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2272
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2273
1
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2274
1
}
2275
2276
ExecutorBignumCalc_Mod_Goldilocks::ExecutorBignumCalc_Mod_Goldilocks(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2277
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2278
1
    CF_NORET(SetModulo("18446744069414584321"));
2279
1
}
2280
2281
ExecutorBignumCalc_Mod_MNT4_R::ExecutorBignumCalc_Mod_MNT4_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2282
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2283
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2284
1
}
2285
2286
ExecutorBignumCalc_Mod_MNT4_P::ExecutorBignumCalc_Mod_MNT4_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2287
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2288
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2289
1
}
2290
2291
ExecutorBignumCalc_Mod_MNT6_R::ExecutorBignumCalc_Mod_MNT6_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2292
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2293
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2294
1
}
2295
2296
ExecutorBignumCalc_Mod_MNT6_P::ExecutorBignumCalc_Mod_MNT6_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2297
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2298
1
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2299
1
}
2300
2301
ExecutorBignumCalc_Mod_2Exp64::ExecutorBignumCalc_Mod_2Exp64(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2302
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2303
1
    CF_NORET(SetModulo("18446744073709551616"));
2304
1
}
2305
2306
ExecutorBignumCalc_Mod_2Exp128::ExecutorBignumCalc_Mod_2Exp128(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2307
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2308
1
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2309
1
}
2310
2311
ExecutorBignumCalc_Mod_2Exp256::ExecutorBignumCalc_Mod_2Exp256(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2312
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2313
1
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2314
1
}
2315
2316
ExecutorBignumCalc_Mod_2Exp512::ExecutorBignumCalc_Mod_2Exp512(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2317
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2318
1
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2319
1
}
2320
2321
ExecutorBignumCalc_Mod_SECP256K1::ExecutorBignumCalc_Mod_SECP256K1(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2322
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2323
1
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2324
1
}
2325
2326
ExecutorBignumCalc_Mod_SECP256K1_P::ExecutorBignumCalc_Mod_SECP256K1_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2327
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2328
1
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2329
1
}
2330
2331
ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2332
    ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options)
2333
1
{ }
2334
0
void ExecutorBignumCalc_Fp2::SetModulo(const std::string& modulo) {
2335
0
    this->modulo = component::Bignum(modulo);
2336
0
}
2337
2338
ExecutorBignumCalc_Fp12::ExecutorBignumCalc_Fp12(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2339
    ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options)
2340
1
{ }
2341
0
void ExecutorBignumCalc_Fp12::SetModulo(const std::string& modulo) {
2342
0
    this->modulo = component::Bignum(modulo);
2343
0
}
2344
2345
template <class ResultType, class OperationType>
2346
ExecutorBase<ResultType, OperationType>::ExecutorBase(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2347
    operationID(operationID),
2348
    modules(modules),
2349
    options(options)
2350
107
{
2351
107
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
23
{
2351
23
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
2352
2353
/* Specialization for operation::SR25519_Verify */
2354
151
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
151
    (void)module;
2356
151
    (void)op;
2357
151
    (void)result;
2358
151
}
2359
2360
151
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2361
151
    return module->OpSR25519_Verify(op);
2362
151
}
2363
2364
template <class ResultType, class OperationType>
2365
107
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
107
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2365
23
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
23
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
2367
2368
/* Filter away the values in the set that are std::nullopt */
2369
template <class ResultType, class OperationType>
2370
27.6k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
27.6k
    ResultSet ret;
2372
2373
92.9k
    for (const auto& result : results) {
2374
92.9k
        if ( result.second == std::nullopt ) {
2375
65.3k
            continue;
2376
65.3k
        }
2377
2378
27.5k
        ret.push_back(result);
2379
27.5k
    }
2380
2381
27.6k
    return ret;
2382
27.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
1.78k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.78k
    ResultSet ret;
2372
2373
5.62k
    for (const auto& result : results) {
2374
5.62k
        if ( result.second == std::nullopt ) {
2375
2.52k
            continue;
2376
2.52k
        }
2377
2378
3.10k
        ret.push_back(result);
2379
3.10k
    }
2380
2381
1.78k
    return ret;
2382
1.78k
}
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
811
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
811
    ResultSet ret;
2372
2373
2.71k
    for (const auto& result : results) {
2374
2.71k
        if ( result.second == std::nullopt ) {
2375
1.58k
            continue;
2376
1.58k
        }
2377
2378
1.12k
        ret.push_back(result);
2379
1.12k
    }
2380
2381
811
    return ret;
2382
811
}
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
588
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
588
    ResultSet ret;
2372
2373
3.27k
    for (const auto& result : results) {
2374
3.27k
        if ( result.second == std::nullopt ) {
2375
1.65k
            continue;
2376
1.65k
        }
2377
2378
1.61k
        ret.push_back(result);
2379
1.61k
    }
2380
2381
588
    return ret;
2382
588
}
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
716
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
716
    ResultSet ret;
2372
2373
3.48k
    for (const auto& result : results) {
2374
3.48k
        if ( result.second == std::nullopt ) {
2375
1.72k
            continue;
2376
1.72k
        }
2377
2378
1.76k
        ret.push_back(result);
2379
1.76k
    }
2380
2381
716
    return ret;
2382
716
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> > > > const&) const
Line
Count
Source
2370
3.73k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3.73k
    ResultSet ret;
2372
2373
16.4k
    for (const auto& result : results) {
2374
16.4k
        if ( result.second == std::nullopt ) {
2375
10.2k
            continue;
2376
10.2k
        }
2377
2378
6.18k
        ret.push_back(result);
2379
6.18k
    }
2380
2381
3.73k
    return ret;
2382
3.73k
}
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
3.33k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3.33k
    ResultSet ret;
2372
2373
12.5k
    for (const auto& result : results) {
2374
12.5k
        if ( result.second == std::nullopt ) {
2375
11.5k
            continue;
2376
11.5k
        }
2377
2378
922
        ret.push_back(result);
2379
922
    }
2380
2381
3.33k
    return ret;
2382
3.33k
}
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
122
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
122
    ResultSet ret;
2372
2373
820
    for (const auto& result : results) {
2374
820
        if ( result.second == std::nullopt ) {
2375
610
            continue;
2376
610
        }
2377
2378
210
        ret.push_back(result);
2379
210
    }
2380
2381
122
    return ret;
2382
122
}
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
2.13k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2.13k
    ResultSet ret;
2372
2373
6.48k
    for (const auto& result : results) {
2374
6.48k
        if ( result.second == std::nullopt ) {
2375
3.63k
            continue;
2376
3.63k
        }
2377
2378
2.84k
        ret.push_back(result);
2379
2.84k
    }
2380
2381
2.13k
    return ret;
2382
2.13k
}
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
123
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
123
    ResultSet ret;
2372
2373
701
    for (const auto& result : results) {
2374
701
        if ( result.second == std::nullopt ) {
2375
701
            continue;
2376
701
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
123
    return ret;
2382
123
}
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
59
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
59
    ResultSet ret;
2372
2373
463
    for (const auto& result : results) {
2374
463
        if ( result.second == std::nullopt ) {
2375
463
            continue;
2376
463
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
59
    return ret;
2382
59
}
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
58
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
58
    ResultSet ret;
2372
2373
399
    for (const auto& result : results) {
2374
399
        if ( result.second == std::nullopt ) {
2375
399
            continue;
2376
399
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
58
    return ret;
2382
58
}
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
668
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
668
    ResultSet ret;
2372
2373
2.26k
    for (const auto& result : results) {
2374
2.26k
        if ( result.second == std::nullopt ) {
2375
1.48k
            continue;
2376
1.48k
        }
2377
2378
778
        ret.push_back(result);
2379
778
    }
2380
2381
668
    return ret;
2382
668
}
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
197
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
197
    ResultSet ret;
2372
2373
494
    for (const auto& result : results) {
2374
494
        if ( result.second == std::nullopt ) {
2375
278
            continue;
2376
278
        }
2377
2378
216
        ret.push_back(result);
2379
216
    }
2380
2381
197
    return ret;
2382
197
}
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
61
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
61
    ResultSet ret;
2372
2373
426
    for (const auto& result : results) {
2374
426
        if ( result.second == std::nullopt ) {
2375
426
            continue;
2376
426
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
61
    return ret;
2382
61
}
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
55
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
55
    ResultSet ret;
2372
2373
420
    for (const auto& result : results) {
2374
420
        if ( result.second == std::nullopt ) {
2375
420
            continue;
2376
420
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
55
    return ret;
2382
55
}
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
88
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
88
    ResultSet ret;
2372
2373
194
    for (const auto& result : results) {
2374
194
        if ( result.second == std::nullopt ) {
2375
163
            continue;
2376
163
        }
2377
2378
31
        ret.push_back(result);
2379
31
    }
2380
2381
88
    return ret;
2382
88
}
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
396
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
396
    ResultSet ret;
2372
2373
1.82k
    for (const auto& result : results) {
2374
1.82k
        if ( result.second == std::nullopt ) {
2375
934
            continue;
2376
934
        }
2377
2378
893
        ret.push_back(result);
2379
893
    }
2380
2381
396
    return ret;
2382
396
}
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
57
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
57
    ResultSet ret;
2372
2373
371
    for (const auto& result : results) {
2374
371
        if ( result.second == std::nullopt ) {
2375
371
            continue;
2376
371
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
57
    return ret;
2382
57
}
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
66
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
66
    ResultSet ret;
2372
2373
516
    for (const auto& result : results) {
2374
516
        if ( result.second == std::nullopt ) {
2375
516
            continue;
2376
516
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
66
    return ret;
2382
66
}
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
811
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
811
    ResultSet ret;
2372
2373
1.87k
    for (const auto& result : results) {
2374
1.87k
        if ( result.second == std::nullopt ) {
2375
1.15k
            continue;
2376
1.15k
        }
2377
2378
716
        ret.push_back(result);
2379
716
    }
2380
2381
811
    return ret;
2382
811
}
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
611
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
611
    ResultSet ret;
2372
2373
1.42k
    for (const auto& result : results) {
2374
1.42k
        if ( result.second == std::nullopt ) {
2375
270
            continue;
2376
270
        }
2377
2378
1.15k
        ret.push_back(result);
2379
1.15k
    }
2380
2381
611
    return ret;
2382
611
}
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
41
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
41
    ResultSet ret;
2372
2373
154
    for (const auto& result : results) {
2374
154
        if ( result.second == std::nullopt ) {
2375
154
            continue;
2376
154
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
41
    return ret;
2382
41
}
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
445
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
445
    ResultSet ret;
2372
2373
1.35k
    for (const auto& result : results) {
2374
1.35k
        if ( result.second == std::nullopt ) {
2375
677
            continue;
2376
677
        }
2377
2378
679
        ret.push_back(result);
2379
679
    }
2380
2381
445
    return ret;
2382
445
}
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
160
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
160
    ResultSet ret;
2372
2373
471
    for (const auto& result : results) {
2374
471
        if ( result.second == std::nullopt ) {
2375
400
            continue;
2376
400
        }
2377
2378
71
        ret.push_back(result);
2379
71
    }
2380
2381
160
    return ret;
2382
160
}
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
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
37
    ResultSet ret;
2372
2373
133
    for (const auto& result : results) {
2374
133
        if ( result.second == std::nullopt ) {
2375
133
            continue;
2376
133
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
37
    return ret;
2382
37
}
cryptofuzz::ExecutorBase<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
38
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
38
    ResultSet ret;
2372
2373
130
    for (const auto& result : results) {
2374
130
        if ( result.second == std::nullopt ) {
2375
130
            continue;
2376
130
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
38
    return ret;
2382
38
}
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
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
40
    ResultSet ret;
2372
2373
147
    for (const auto& result : results) {
2374
147
        if ( result.second == std::nullopt ) {
2375
147
            continue;
2376
147
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
40
    return ret;
2382
40
}
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
257
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
257
    ResultSet ret;
2372
2373
800
    for (const auto& result : results) {
2374
800
        if ( result.second == std::nullopt ) {
2375
392
            continue;
2376
392
        }
2377
2378
408
        ret.push_back(result);
2379
408
    }
2380
2381
257
    return ret;
2382
257
}
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
168
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
168
    ResultSet ret;
2372
2373
467
    for (const auto& result : results) {
2374
467
        if ( result.second == std::nullopt ) {
2375
334
            continue;
2376
334
        }
2377
2378
133
        ret.push_back(result);
2379
133
    }
2380
2381
168
    return ret;
2382
168
}
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
38
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
38
    ResultSet ret;
2372
2373
135
    for (const auto& result : results) {
2374
135
        if ( result.second == std::nullopt ) {
2375
135
            continue;
2376
135
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
38
    return ret;
2382
38
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::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
27
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
27
    ResultSet ret;
2372
2373
99
    for (const auto& result : results) {
2374
99
        if ( result.second == std::nullopt ) {
2375
99
            continue;
2376
99
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
27
    return ret;
2382
27
}
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
522
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
522
    ResultSet ret;
2372
2373
1.34k
    for (const auto& result : results) {
2374
1.34k
        if ( result.second == std::nullopt ) {
2375
824
            continue;
2376
824
        }
2377
2378
516
        ret.push_back(result);
2379
516
    }
2380
2381
522
    return ret;
2382
522
}
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
183
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
183
    ResultSet ret;
2372
2373
623
    for (const auto& result : results) {
2374
623
        if ( result.second == std::nullopt ) {
2375
535
            continue;
2376
535
        }
2377
2378
88
        ret.push_back(result);
2379
88
    }
2380
2381
183
    return ret;
2382
183
}
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
36
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
36
    ResultSet ret;
2372
2373
140
    for (const auto& result : results) {
2374
140
        if ( result.second == std::nullopt ) {
2375
140
            continue;
2376
140
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
36
    return ret;
2382
36
}
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
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
34
    ResultSet ret;
2372
2373
120
    for (const auto& result : results) {
2374
120
        if ( result.second == std::nullopt ) {
2375
120
            continue;
2376
120
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
34
    return ret;
2382
34
}
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
46
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
46
    ResultSet ret;
2372
2373
169
    for (const auto& result : results) {
2374
169
        if ( result.second == std::nullopt ) {
2375
169
            continue;
2376
169
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
46
    return ret;
2382
46
}
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
69
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
69
    ResultSet ret;
2372
2373
241
    for (const auto& result : results) {
2374
241
        if ( result.second == std::nullopt ) {
2375
217
            continue;
2376
217
        }
2377
2378
24
        ret.push_back(result);
2379
24
    }
2380
2381
69
    return ret;
2382
69
}
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
85
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
85
    ResultSet ret;
2372
2373
291
    for (const auto& result : results) {
2374
291
        if ( result.second == std::nullopt ) {
2375
241
            continue;
2376
241
        }
2377
2378
50
        ret.push_back(result);
2379
50
    }
2380
2381
85
    return ret;
2382
85
}
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
160
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
160
    ResultSet ret;
2372
2373
506
    for (const auto& result : results) {
2374
506
        if ( result.second == std::nullopt ) {
2375
358
            continue;
2376
358
        }
2377
2378
148
        ret.push_back(result);
2379
148
    }
2380
2381
160
    return ret;
2382
160
}
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
64
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
64
    ResultSet ret;
2372
2373
218
    for (const auto& result : results) {
2374
218
        if ( result.second == std::nullopt ) {
2375
181
            continue;
2376
181
        }
2377
2378
37
        ret.push_back(result);
2379
37
    }
2380
2381
64
    return ret;
2382
64
}
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
72
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
72
    ResultSet ret;
2372
2373
237
    for (const auto& result : results) {
2374
237
        if ( result.second == std::nullopt ) {
2375
204
            continue;
2376
204
        }
2377
2378
33
        ret.push_back(result);
2379
33
    }
2380
2381
72
    return ret;
2382
72
}
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
58
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
58
    ResultSet ret;
2372
2373
213
    for (const auto& result : results) {
2374
213
        if ( result.second == std::nullopt ) {
2375
192
            continue;
2376
192
        }
2377
2378
21
        ret.push_back(result);
2379
21
    }
2380
2381
58
    return ret;
2382
58
}
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
193
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
193
    ResultSet ret;
2372
2373
617
    for (const auto& result : results) {
2374
617
        if ( result.second == std::nullopt ) {
2375
580
            continue;
2376
580
        }
2377
2378
37
        ret.push_back(result);
2379
37
    }
2380
2381
193
    return ret;
2382
193
}
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
6.72k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
6.72k
    ResultSet ret;
2372
2373
15.8k
    for (const auto& result : results) {
2374
15.8k
        if ( result.second == std::nullopt ) {
2375
12.0k
            continue;
2376
12.0k
        }
2377
2378
3.78k
        ret.push_back(result);
2379
3.78k
    }
2380
2381
6.72k
    return ret;
2382
6.72k
}
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
79
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
79
    ResultSet ret;
2372
2373
234
    for (const auto& result : results) {
2374
234
        if ( result.second == std::nullopt ) {
2375
234
            continue;
2376
234
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
79
    return ret;
2382
79
}
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
230
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
230
    ResultSet ret;
2372
2373
689
    for (const auto& result : results) {
2374
689
        if ( result.second == std::nullopt ) {
2375
689
            continue;
2376
689
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
230
    return ret;
2382
230
}
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
36
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
36
    ResultSet ret;
2372
2373
128
    for (const auto& result : results) {
2374
128
        if ( result.second == std::nullopt ) {
2375
128
            continue;
2376
128
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
36
    return ret;
2382
36
}
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
42
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
42
    ResultSet ret;
2372
2373
138
    for (const auto& result : results) {
2374
138
        if ( result.second == std::nullopt ) {
2375
138
            continue;
2376
138
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
42
    return ret;
2382
42
}
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
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
43
    ResultSet ret;
2372
2373
154
    for (const auto& result : results) {
2374
154
        if ( result.second == std::nullopt ) {
2375
154
            continue;
2376
154
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
43
    return ret;
2382
43
}
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
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
40
    ResultSet ret;
2372
2373
157
    for (const auto& result : results) {
2374
157
        if ( result.second == std::nullopt ) {
2375
157
            continue;
2376
157
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
40
    return ret;
2382
40
}
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
51
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
51
    ResultSet ret;
2372
2373
168
    for (const auto& result : results) {
2374
168
        if ( result.second == std::nullopt ) {
2375
168
            continue;
2376
168
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
51
    return ret;
2382
51
}
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
42
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
42
    ResultSet ret;
2372
2373
152
    for (const auto& result : results) {
2374
152
        if ( result.second == std::nullopt ) {
2375
152
            continue;
2376
152
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
42
    return ret;
2382
42
}
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
36
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
36
    ResultSet ret;
2372
2373
134
    for (const auto& result : results) {
2374
134
        if ( result.second == std::nullopt ) {
2375
134
            continue;
2376
134
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
36
    return ret;
2382
36
}
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
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
37
    ResultSet ret;
2372
2373
135
    for (const auto& result : results) {
2374
135
        if ( result.second == std::nullopt ) {
2375
135
            continue;
2376
135
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
37
    return ret;
2382
37
}
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
28
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
28
    ResultSet ret;
2372
2373
105
    for (const auto& result : results) {
2374
105
        if ( result.second == std::nullopt ) {
2375
105
            continue;
2376
105
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
28
    return ret;
2382
28
}
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
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
34
    ResultSet ret;
2372
2373
127
    for (const auto& result : results) {
2374
127
        if ( result.second == std::nullopt ) {
2375
127
            continue;
2376
127
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
34
    return ret;
2382
34
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
47
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
47
    ResultSet ret;
2372
2373
170
    for (const auto& result : results) {
2374
170
        if ( result.second == std::nullopt ) {
2375
170
            continue;
2376
170
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
47
    return ret;
2382
47
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
40
    ResultSet ret;
2372
2373
146
    for (const auto& result : results) {
2374
146
        if ( result.second == std::nullopt ) {
2375
146
            continue;
2376
146
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
40
    return ret;
2382
40
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
44
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
44
    ResultSet ret;
2372
2373
157
    for (const auto& result : results) {
2374
157
        if ( result.second == std::nullopt ) {
2375
157
            continue;
2376
157
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
44
    return ret;
2382
44
}
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
35
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
35
    ResultSet ret;
2372
2373
131
    for (const auto& result : results) {
2374
131
        if ( result.second == std::nullopt ) {
2375
131
            continue;
2376
131
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
35
    return ret;
2382
35
}
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
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
34
    ResultSet ret;
2372
2373
120
    for (const auto& result : results) {
2374
120
        if ( result.second == std::nullopt ) {
2375
120
            continue;
2376
120
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
34
    return ret;
2382
34
}
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
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
37
    ResultSet ret;
2372
2373
122
    for (const auto& result : results) {
2374
122
        if ( result.second == std::nullopt ) {
2375
122
            continue;
2376
122
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
37
    return ret;
2382
37
}
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
46
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
46
    ResultSet ret;
2372
2373
157
    for (const auto& result : results) {
2374
157
        if ( result.second == std::nullopt ) {
2375
157
            continue;
2376
157
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
46
    return ret;
2382
46
}
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
38
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
38
    ResultSet ret;
2372
2373
139
    for (const auto& result : results) {
2374
139
        if ( result.second == std::nullopt ) {
2375
139
            continue;
2376
139
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
38
    return ret;
2382
38
}
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
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
34
    ResultSet ret;
2372
2373
117
    for (const auto& result : results) {
2374
117
        if ( result.second == std::nullopt ) {
2375
117
            continue;
2376
117
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
34
    return ret;
2382
34
}
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
35
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
35
    ResultSet ret;
2372
2373
124
    for (const auto& result : results) {
2374
124
        if ( result.second == std::nullopt ) {
2375
124
            continue;
2376
124
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
35
    return ret;
2382
35
}
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
28
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
28
    ResultSet ret;
2372
2373
99
    for (const auto& result : results) {
2374
99
        if ( result.second == std::nullopt ) {
2375
99
            continue;
2376
99
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
28
    return ret;
2382
28
}
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
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
30
    ResultSet ret;
2372
2373
109
    for (const auto& result : results) {
2374
109
        if ( result.second == std::nullopt ) {
2375
109
            continue;
2376
109
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
30
    return ret;
2382
30
}
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
53
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
53
    ResultSet ret;
2372
2373
167
    for (const auto& result : results) {
2374
167
        if ( result.second == std::nullopt ) {
2375
167
            continue;
2376
167
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
53
    return ret;
2382
53
}
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
38
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
38
    ResultSet ret;
2372
2373
130
    for (const auto& result : results) {
2374
130
        if ( result.second == std::nullopt ) {
2375
130
            continue;
2376
130
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
38
    return ret;
2382
38
}
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
60
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
60
    ResultSet ret;
2372
2373
187
    for (const auto& result : results) {
2374
187
        if ( result.second == std::nullopt ) {
2375
187
            continue;
2376
187
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
60
    return ret;
2382
60
}
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
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
39
    ResultSet ret;
2372
2373
128
    for (const auto& result : results) {
2374
128
        if ( result.second == std::nullopt ) {
2375
128
            continue;
2376
128
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
39
    return ret;
2382
39
}
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
83
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
83
    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
83
    return ret;
2382
83
}
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
47
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
47
    ResultSet ret;
2372
2373
155
    for (const auto& result : results) {
2374
155
        if ( result.second == std::nullopt ) {
2375
155
            continue;
2376
155
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
47
    return ret;
2382
47
}
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
63
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
63
    ResultSet ret;
2372
2373
206
    for (const auto& result : results) {
2374
206
        if ( result.second == std::nullopt ) {
2375
206
            continue;
2376
206
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
63
    return ret;
2382
63
}
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
48
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
48
    ResultSet ret;
2372
2373
156
    for (const auto& result : results) {
2374
156
        if ( result.second == std::nullopt ) {
2375
156
            continue;
2376
156
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
48
    return ret;
2382
48
}
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
70
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
70
    ResultSet ret;
2372
2373
232
    for (const auto& result : results) {
2374
232
        if ( result.second == std::nullopt ) {
2375
232
            continue;
2376
232
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
70
    return ret;
2382
70
}
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
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
30
    ResultSet ret;
2372
2373
111
    for (const auto& result : results) {
2374
111
        if ( result.second == std::nullopt ) {
2375
111
            continue;
2376
111
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
30
    return ret;
2382
30
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
43
    ResultSet ret;
2372
2373
151
    for (const auto& result : results) {
2374
151
        if ( result.second == std::nullopt ) {
2375
151
            continue;
2376
151
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
43
    return ret;
2382
43
}
2383
2384
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2385
template <>
2386
990
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
990
    (void)operations;
2388
990
    (void)results;
2389
990
    (void)data;
2390
990
    (void)size;
2391
990
}
2392
2393
template <class ResultType, class OperationType>
2394
2.82k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
2.82k
    (void)operation;
2396
2397
2.82k
    return false;
2398
2.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2394
605
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
605
    (void)operation;
2396
2397
605
    return false;
2398
605
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
Line
Count
Source
2394
211
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
211
    (void)operation;
2396
2397
211
    return false;
2398
211
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const
Line
Count
Source
2394
24
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
24
    (void)operation;
2396
2397
24
    return false;
2398
24
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
Line
Count
Source
2394
658
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
658
    (void)operation;
2396
2397
658
    return false;
2398
658
}
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
137
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
137
    (void)operation;
2396
2397
137
    return false;
2398
137
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const
Line
Count
Source
2394
34
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
34
    (void)operation;
2396
2397
34
    return false;
2398
34
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::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
4
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
4
    (void)operation;
2396
2397
4
    return false;
2398
4
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
Line
Count
Source
2394
109
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
109
    (void)operation;
2396
2397
109
    return false;
2398
109
}
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
196
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
196
    (void)operation;
2396
2397
196
    return false;
2398
196
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2394
502
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
502
    (void)operation;
2396
2397
502
    return false;
2398
502
}
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
121
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
121
    (void)operation;
2396
2397
121
    return false;
2398
121
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const
Line
Count
Source
2394
33
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
33
    (void)operation;
2396
2397
33
    return false;
2398
33
}
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
77
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
77
    (void)operation;
2396
2397
77
    return false;
2398
77
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const
Line
Count
Source
2394
25
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
25
    (void)operation;
2396
2397
25
    return false;
2398
25
}
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
7
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
7
    (void)operation;
2396
2397
7
    return false;
2398
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::dontCompare(cryptofuzz::operation::ECC_Point_Sub const&) const
Line
Count
Source
2394
14
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
14
    (void)operation;
2396
2397
14
    return false;
2398
14
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const
Line
Count
Source
2394
37
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
37
    (void)operation;
2396
2397
37
    return false;
2398
37
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2394
11
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
11
    (void)operation;
2396
2397
11
    return false;
2398
11
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
Line
Count
Source
2394
8
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
8
    (void)operation;
2396
2397
8
    return false;
2398
8
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2394
5
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
5
    (void)operation;
2396
2397
5
    return false;
2398
5
}
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
8
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
8
    (void)operation;
2396
2397
8
    return false;
2398
8
}
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
822
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2402
822
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2403
822
    if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; }
2404
822
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2405
728
    if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; }
2406
2407
725
    return false;
2408
728
}
2409
2410
template <>
2411
0
bool ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::dontCompare(const operation::ECCSI_Sign& operation) const {
2412
0
    (void)operation;
2413
0
    return true;
2414
0
}
2415
2416
template <>
2417
141
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2418
141
    if (
2419
141
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2420
141
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2421
85
        if ( operation.UseRandomNonce() ) {
2422
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2423
57
            return true;
2424
57
        }
2425
85
    }
2426
2427
84
    return false;
2428
141
}
2429
2430
template <>
2431
19
bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const {
2432
19
    if (
2433
19
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2434
19
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2435
19
        if ( operation.UseRandomNonce() ) {
2436
            /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */
2437
19
            return true;
2438
19
        }
2439
19
    }
2440
2441
0
    return false;
2442
19
}
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
924
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2461
924
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2462
2463
924
    return false;
2464
924
}
2465
2466
template <>
2467
132
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2468
132
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2469
2470
132
    return false;
2471
132
}
2472
2473
template <>
2474
241
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2475
241
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2476
2477
241
    return false;
2478
241
}
2479
2480
template <>
2481
210
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2482
210
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2483
2484
208
    return false;
2485
210
}
2486
2487
template <class ResultType, class OperationType>
2488
27.6k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
27.6k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
27.6k
    const auto filtered = filter(results);
2495
2496
27.6k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
22.3k
        return;
2499
22.3k
    }
2500
2501
5.31k
    if ( dontCompare(operations[0].second) == true ) {
2502
175
        return;
2503
175
    }
2504
2505
22.9k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
17.8k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
17.8k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
17.8k
        const bool equal = *prev == *cur;
2510
2511
17.8k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
17.8k
    }
2528
5.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Digest>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Digest> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1.78k
void ExecutorBase<ResultType, OperationType>::compare(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.78k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1.78k
    const auto filtered = filter(results);
2495
2496
1.78k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.17k
        return;
2499
1.17k
    }
2500
2501
605
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
2.90k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
2.29k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
2.29k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
2.29k
        const bool equal = *prev == *cur;
2510
2511
2.29k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.29k
    }
2528
605
}
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
811
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
811
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
811
    const auto filtered = filter(results);
2495
2496
811
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
601
        return;
2499
601
    }
2500
2501
210
    if ( dontCompare(operations[0].second) == true ) {
2502
2
        return;
2503
2
    }
2504
2505
1.06k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
860
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
860
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
860
        const bool equal = *prev == *cur;
2510
2511
860
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
860
    }
2528
208
}
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
588
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
588
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
588
    const auto filtered = filter(results);
2495
2496
588
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
377
        return;
2499
377
    }
2500
2501
211
    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
1.21k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.21k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.21k
        const bool equal = *prev == *cur;
2510
2511
1.21k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.21k
    }
2528
211
}
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
716
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
716
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
716
    const auto filtered = filter(results);
2495
2496
716
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
475
        return;
2499
475
    }
2500
2501
241
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.54k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.30k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.30k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.30k
        const bool equal = *prev == *cur;
2510
2511
1.30k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.30k
    }
2528
241
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricEncrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricEncrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
3.73k
void ExecutorBase<ResultType, OperationType>::compare(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.73k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
3.73k
    const auto filtered = filter(results);
2495
2496
3.73k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2.81k
        return;
2499
2.81k
    }
2500
2501
924
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
5.83k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
4.91k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
4.91k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
4.91k
        const bool equal = *prev == *cur;
2510
2511
4.91k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
4.91k
    }
2528
924
}
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
3.33k
void ExecutorBase<ResultType, OperationType>::compare(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.33k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
3.33k
    const auto filtered = filter(results);
2495
2496
3.33k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3.20k
        return;
2499
3.20k
    }
2500
2501
132
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
769
    for (size_t i = 1; i < filtered.size(); i++) {
2506
637
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
637
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
637
        const bool equal = *prev == *cur;
2510
2511
637
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
637
    }
2528
132
}
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
122
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
122
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
122
    const auto filtered = filter(results);
2495
2496
122
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
98
        return;
2499
98
    }
2500
2501
24
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
176
    for (size_t i = 1; i < filtered.size(); i++) {
2506
152
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
152
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
152
        const bool equal = *prev == *cur;
2510
2511
152
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
152
    }
2528
24
}
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
2.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
2.13k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
2.13k
    const auto filtered = filter(results);
2495
2496
2.13k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.47k
        return;
2499
1.47k
    }
2500
2501
658
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
2.54k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.88k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.88k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.88k
        const bool equal = *prev == *cur;
2510
2511
1.88k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.88k
    }
2528
658
}
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
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::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
59
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
59
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
59
    const auto filtered = filter(results);
2495
2496
59
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
59
        return;
2499
59
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
58
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
58
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
58
    const auto filtered = filter(results);
2495
2496
58
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
58
        return;
2499
58
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->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
668
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
668
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
668
    const auto filtered = filter(results);
2495
2496
668
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
531
        return;
2499
531
    }
2500
2501
137
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
675
    for (size_t i = 1; i < filtered.size(); i++) {
2506
538
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
538
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
538
        const bool equal = *prev == *cur;
2510
2511
538
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
538
    }
2528
137
}
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
197
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
197
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
197
    const auto filtered = filter(results);
2495
2496
197
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
163
        return;
2499
163
    }
2500
2501
34
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
92
    for (size_t i = 1; i < filtered.size(); i++) {
2506
58
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
58
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
58
        const bool equal = *prev == *cur;
2510
2511
58
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
58
    }
2528
34
}
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
61
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
61
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
61
    const auto filtered = filter(results);
2495
2496
61
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
61
        return;
2499
61
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->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
55
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
55
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
55
    const auto filtered = filter(results);
2495
2496
55
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
55
        return;
2499
55
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_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
88
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
88
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
88
    const auto filtered = filter(results);
2495
2496
88
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
84
        return;
2499
84
    }
2500
2501
4
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
8
    for (size_t i = 1; i < filtered.size(); i++) {
2506
4
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
4
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
4
        const bool equal = *prev == *cur;
2510
2511
4
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
4
    }
2528
4
}
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
396
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
396
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
396
    const auto filtered = filter(results);
2495
2496
396
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
287
        return;
2499
287
    }
2500
2501
109
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
700
    for (size_t i = 1; i < filtered.size(); i++) {
2506
591
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
591
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
591
        const bool equal = *prev == *cur;
2510
2511
591
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
591
    }
2528
109
}
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
57
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
57
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
57
    const auto filtered = filter(results);
2495
2496
57
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
57
        return;
2499
57
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
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<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
811
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
811
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
811
    const auto filtered = filter(results);
2495
2496
811
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
615
        return;
2499
615
    }
2500
2501
196
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
480
    for (size_t i = 1; i < filtered.size(); i++) {
2506
284
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
284
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
284
        const bool equal = *prev == *cur;
2510
2511
284
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
284
    }
2528
196
}
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
611
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
611
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
611
    const auto filtered = filter(results);
2495
2496
611
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
109
        return;
2499
109
    }
2500
2501
502
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.14k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
643
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
643
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
643
        const bool equal = *prev == *cur;
2510
2511
643
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
643
    }
2528
502
}
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
41
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
41
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
41
    const auto filtered = filter(results);
2495
2496
41
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
41
        return;
2499
41
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
445
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
445
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
445
    const auto filtered = filter(results);
2495
2496
445
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
304
        return;
2499
304
    }
2500
2501
141
    if ( dontCompare(operations[0].second) == true ) {
2502
57
        return;
2503
57
    }
2504
2505
292
    for (size_t i = 1; i < filtered.size(); i++) {
2506
208
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
208
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
208
        const bool equal = *prev == *cur;
2510
2511
208
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
208
    }
2528
84
}
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
160
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
160
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
160
    const auto filtered = filter(results);
2495
2496
160
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
141
        return;
2499
141
    }
2500
2501
19
    if ( dontCompare(operations[0].second) == true ) {
2502
19
        return;
2503
19
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->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
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
37
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
37
    const auto filtered = filter(results);
2495
2496
37
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
37
        return;
2499
37
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
38
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
38
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
38
    const auto filtered = filter(results);
2495
2496
38
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
38
        return;
2499
38
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::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
40
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
40
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
40
    const auto filtered = filter(results);
2495
2496
40
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
40
        return;
2499
40
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::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
257
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
257
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
257
    const auto filtered = filter(results);
2495
2496
257
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
136
        return;
2499
136
    }
2500
2501
121
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
347
    for (size_t i = 1; i < filtered.size(); i++) {
2506
226
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
226
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
226
        const bool equal = *prev == *cur;
2510
2511
226
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
226
    }
2528
121
}
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
168
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
168
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
168
    const auto filtered = filter(results);
2495
2496
168
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
135
        return;
2499
135
    }
2500
2501
33
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
98
    for (size_t i = 1; i < filtered.size(); i++) {
2506
65
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
65
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
65
        const bool equal = *prev == *cur;
2510
2511
65
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
65
    }
2528
33
}
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
38
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
38
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
38
    const auto filtered = filter(results);
2495
2496
38
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
38
        return;
2499
38
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::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
27
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
27
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
27
    const auto filtered = filter(results);
2495
2496
27
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
27
        return;
2499
27
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->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
522
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
522
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
522
    const auto filtered = filter(results);
2495
2496
522
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
445
        return;
2499
445
    }
2500
2501
77
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
248
    for (size_t i = 1; i < filtered.size(); i++) {
2506
171
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
171
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
171
        const bool equal = *prev == *cur;
2510
2511
171
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
171
    }
2528
77
}
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
183
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
183
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
183
    const auto filtered = filter(results);
2495
2496
183
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
158
        return;
2499
158
    }
2500
2501
25
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
80
    for (size_t i = 1; i < filtered.size(); i++) {
2506
55
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
55
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
55
        const bool equal = *prev == *cur;
2510
2511
55
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
55
    }
2528
25
}
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
36
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
36
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
36
    const auto filtered = filter(results);
2495
2496
36
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
36
        return;
2499
36
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
34
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
34
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
34
    const auto filtered = filter(results);
2495
2496
34
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
34
        return;
2499
34
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
46
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
46
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
46
    const auto filtered = filter(results);
2495
2496
46
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
46
        return;
2499
46
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
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
62
        return;
2499
62
    }
2500
2501
7
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
21
    for (size_t i = 1; i < filtered.size(); i++) {
2506
14
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
14
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
14
        const bool equal = *prev == *cur;
2510
2511
14
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
14
    }
2528
7
}
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
85
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
85
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
85
    const auto filtered = filter(results);
2495
2496
85
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
71
        return;
2499
71
    }
2500
2501
14
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
43
    for (size_t i = 1; i < filtered.size(); i++) {
2506
29
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
29
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
29
        const bool equal = *prev == *cur;
2510
2511
29
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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
    }
2528
14
}
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
160
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
160
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
160
    const auto filtered = filter(results);
2495
2496
160
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
123
        return;
2499
123
    }
2500
2501
37
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
125
    for (size_t i = 1; i < filtered.size(); i++) {
2506
88
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
88
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
88
        const bool equal = *prev == *cur;
2510
2511
88
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
88
    }
2528
37
}
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
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
53
        return;
2499
53
    }
2500
2501
11
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
34
    for (size_t i = 1; i < filtered.size(); i++) {
2506
23
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
23
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
23
        const bool equal = *prev == *cur;
2510
2511
23
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
23
    }
2528
11
}
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
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
64
        return;
2499
64
    }
2500
2501
8
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
28
    for (size_t i = 1; i < filtered.size(); i++) {
2506
20
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
20
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
20
        const bool equal = *prev == *cur;
2510
2511
20
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
20
    }
2528
8
}
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
58
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
58
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
58
    const auto filtered = filter(results);
2495
2496
58
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
53
        return;
2499
53
    }
2500
2501
5
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
19
    for (size_t i = 1; i < filtered.size(); i++) {
2506
14
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
14
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
14
        const bool equal = *prev == *cur;
2510
2511
14
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
14
    }
2528
5
}
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
193
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
193
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
193
    const auto filtered = filter(results);
2495
2496
193
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
185
        return;
2499
185
    }
2500
2501
8
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
25
    for (size_t i = 1; i < filtered.size(); i++) {
2506
17
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
17
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
17
        const bool equal = *prev == *cur;
2510
2511
17
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
17
    }
2528
8
}
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
6.72k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
6.72k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
6.72k
    const auto filtered = filter(results);
2495
2496
6.72k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
5.89k
        return;
2499
5.89k
    }
2500
2501
822
    if ( dontCompare(operations[0].second) == true ) {
2502
97
        return;
2503
97
    }
2504
2505
2.21k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.48k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.48k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.48k
        const bool equal = *prev == *cur;
2510
2511
1.48k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.48k
    }
2528
725
}
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
79
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
79
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
79
    const auto filtered = filter(results);
2495
2496
79
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
79
        return;
2499
79
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->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
230
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
230
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
230
    const auto filtered = filter(results);
2495
2496
230
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
230
        return;
2499
230
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->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
36
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
36
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
36
    const auto filtered = filter(results);
2495
2496
36
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
36
        return;
2499
36
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_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
42
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
42
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
42
    const auto filtered = filter(results);
2495
2496
42
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
42
        return;
2499
42
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
43
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
43
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
43
    const auto filtered = filter(results);
2495
2496
43
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
43
        return;
2499
43
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
40
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
40
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
40
    const auto filtered = filter(results);
2495
2496
40
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
40
        return;
2499
40
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
51
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
51
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
51
    const auto filtered = filter(results);
2495
2496
51
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
51
        return;
2499
51
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
42
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
42
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
42
    const auto filtered = filter(results);
2495
2496
42
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
42
        return;
2499
42
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::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
36
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
36
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
36
    const auto filtered = filter(results);
2495
2496
36
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
36
        return;
2499
36
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_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
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
37
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
37
    const auto filtered = filter(results);
2495
2496
37
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
37
        return;
2499
37
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
28
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
28
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
28
    const auto filtered = filter(results);
2495
2496
28
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
28
        return;
2499
28
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
34
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
34
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
34
    const auto filtered = filter(results);
2495
2496
34
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
34
        return;
2499
34
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_FinalExp>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_FinalExp> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
47
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
47
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
47
    const auto filtered = filter(results);
2495
2496
47
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
47
        return;
2499
47
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
40
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
40
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
40
    const auto filtered = filter(results);
2495
2496
40
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
40
        return;
2499
40
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
44
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
44
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
44
    const auto filtered = filter(results);
2495
2496
44
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
44
        return;
2499
44
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
35
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
35
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
35
    const auto filtered = filter(results);
2495
2496
35
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
35
        return;
2499
35
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
34
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
34
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
34
    const auto filtered = filter(results);
2495
2496
34
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
34
        return;
2499
34
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
37
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
37
    const auto filtered = filter(results);
2495
2496
37
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
37
        return;
2499
37
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::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
46
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
46
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
46
    const auto filtered = filter(results);
2495
2496
46
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
46
        return;
2499
46
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
38
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
38
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
38
    const auto filtered = filter(results);
2495
2496
38
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
38
        return;
2499
38
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
34
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
34
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
34
    const auto filtered = filter(results);
2495
2496
34
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
34
        return;
2499
34
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
35
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
35
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
35
    const auto filtered = filter(results);
2495
2496
35
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
35
        return;
2499
35
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
28
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
28
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
28
    const auto filtered = filter(results);
2495
2496
28
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
28
        return;
2499
28
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
30
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
30
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
30
    const auto filtered = filter(results);
2495
2496
30
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
30
        return;
2499
30
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
53
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
53
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
53
    const auto filtered = filter(results);
2495
2496
53
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
53
        return;
2499
53
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->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
38
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
38
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
38
    const auto filtered = filter(results);
2495
2496
38
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
38
        return;
2499
38
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_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
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::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
39
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
39
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
39
    const auto filtered = filter(results);
2495
2496
39
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
39
        return;
2499
39
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
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::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
47
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
47
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
47
    const auto filtered = filter(results);
2495
2496
47
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
47
        return;
2499
47
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
63
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
63
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
63
    const auto filtered = filter(results);
2495
2496
63
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
63
        return;
2499
63
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
48
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
48
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
48
    const auto filtered = filter(results);
2495
2496
48
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
48
        return;
2499
48
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
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::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
30
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
30
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
30
    const auto filtered = filter(results);
2495
2496
30
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
30
        return;
2499
30
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SR25519_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SR25519_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
43
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
43
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
43
    const auto filtered = filter(results);
2495
2496
43
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
43
        return;
2499
43
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
2529
2530
template <class ResultType, class OperationType>
2531
0
void ExecutorBase<ResultType, OperationType>::abort(std::vector<std::string> moduleNames, const std::string operation, const std::string algorithm, const std::string reason) const {
2532
0
    std::sort(moduleNames.begin(), moduleNames.end());
2533
2534
0
    printf("CPU:\n");
2535
0
    system("cat /proc/cpuinfo | grep '^model name' | head -n1");
2536
0
    system("cat /proc/cpuinfo | grep '^flags' | head -n1");
2537
2538
0
    printf("Assertion failure: ");
2539
0
    for (const auto& moduleName : moduleNames) {
2540
0
        printf("%s-", moduleName.c_str());
2541
0
    }
2542
0
    printf("%s-%s-%s\n", operation.c_str(), algorithm.c_str(), reason.c_str());
2543
0
    fflush(stdout);
2544
2545
0
    ::abort();
2546
0
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
2547
2548
template <class ResultType, class OperationType>
2549
246k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
246k
    (void)parentDs;
2551
246k
    return op;
2552
246k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2549
5.76k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.76k
    (void)parentDs;
2551
5.76k
    return op;
2552
5.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2549
4.04k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.04k
    (void)parentDs;
2551
4.04k
    return op;
2552
4.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) 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::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) 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::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2549
16.7k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
16.7k
    (void)parentDs;
2551
16.7k
    return op;
2552
16.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2549
12.4k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
12.4k
    (void)parentDs;
2551
12.4k
    return op;
2552
12.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2549
2.96k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.96k
    (void)parentDs;
2551
2.96k
    return op;
2552
2.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2549
6.90k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
6.90k
    (void)parentDs;
2551
6.90k
    return op;
2552
6.90k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2549
2.69k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.69k
    (void)parentDs;
2551
2.69k
    return op;
2552
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2549
2.23k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.23k
    (void)parentDs;
2551
2.23k
    return op;
2552
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2549
2.34k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.34k
    (void)parentDs;
2551
2.34k
    return op;
2552
2.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2549
3.84k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.84k
    (void)parentDs;
2551
3.84k
    return op;
2552
3.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2549
2.50k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.50k
    (void)parentDs;
2551
2.50k
    return op;
2552
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2549
3.11k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.11k
    (void)parentDs;
2551
3.11k
    return op;
2552
3.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2549
2.12k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.12k
    (void)parentDs;
2551
2.12k
    return op;
2552
2.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2549
2.08k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.08k
    (void)parentDs;
2551
2.08k
    return op;
2552
2.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SP_800_108) 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<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SRTP) const
Line
Count
Source
2549
2.72k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.72k
    (void)parentDs;
2551
2.72k
    return op;
2552
2.72k
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SRTCP) const
Line
Count
Source
2549
2.66k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.66k
    (void)parentDs;
2551
2.66k
    return op;
2552
2.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2549
2.74k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.74k
    (void)parentDs;
2551
2.74k
    return op;
2552
2.74k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2549
2.47k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.47k
    (void)parentDs;
2551
2.47k
    return op;
2552
2.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2549
2.26k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.26k
    (void)parentDs;
2551
2.26k
    return op;
2552
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const
Line
Count
Source
2549
2.38k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.38k
    (void)parentDs;
2551
2.38k
    return op;
2552
2.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) 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::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2549
2.37k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.37k
    (void)parentDs;
2551
2.37k
    return op;
2552
2.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const
Line
Count
Source
2549
2.19k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.19k
    (void)parentDs;
2551
2.19k
    return op;
2552
2.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2549
2.56k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.56k
    (void)parentDs;
2551
2.56k
    return op;
2552
2.56k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2549
2.93k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.93k
    (void)parentDs;
2551
2.93k
    return op;
2552
2.93k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2549
2.32k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.32k
    (void)parentDs;
2551
2.32k
    return op;
2552
2.32k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2549
2.67k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.67k
    (void)parentDs;
2551
2.67k
    return op;
2552
2.67k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2549
2.31k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.31k
    (void)parentDs;
2551
2.31k
    return op;
2552
2.31k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2549
2.42k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.42k
    (void)parentDs;
2551
2.42k
    return op;
2552
2.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) 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::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2549
2.78k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.78k
    (void)parentDs;
2551
2.78k
    return op;
2552
2.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2549
2.60k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.60k
    (void)parentDs;
2551
2.60k
    return op;
2552
2.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2549
1.45k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.45k
    (void)parentDs;
2551
1.45k
    return op;
2552
1.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2549
2.41k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.41k
    (void)parentDs;
2551
2.41k
    return op;
2552
2.41k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const
Line
Count
Source
2549
2.67k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.67k
    (void)parentDs;
2551
2.67k
    return op;
2552
2.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2549
2.01k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.01k
    (void)parentDs;
2551
2.01k
    return op;
2552
2.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2549
3.12k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.12k
    (void)parentDs;
2551
3.12k
    return op;
2552
3.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2549
2.83k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.83k
    (void)parentDs;
2551
2.83k
    return op;
2552
2.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2549
2.22k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.22k
    (void)parentDs;
2551
2.22k
    return op;
2552
2.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const
Line
Count
Source
2549
2.28k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.28k
    (void)parentDs;
2551
2.28k
    return op;
2552
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const
Line
Count
Source
2549
2.69k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.69k
    (void)parentDs;
2551
2.69k
    return op;
2552
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2549
1.91k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.91k
    (void)parentDs;
2551
1.91k
    return op;
2552
1.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2549
1.80k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.80k
    (void)parentDs;
2551
1.80k
    return op;
2552
1.80k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2549
1.88k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.88k
    (void)parentDs;
2551
1.88k
    return op;
2552
1.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2549
2.44k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.44k
    (void)parentDs;
2551
2.44k
    return op;
2552
2.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) 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::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2549
9.56k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
9.56k
    (void)parentDs;
2551
9.56k
    return op;
2552
9.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2549
2.00k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.00k
    (void)parentDs;
2551
2.00k
    return op;
2552
2.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2549
2.42k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.42k
    (void)parentDs;
2551
2.42k
    return op;
2552
2.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2549
1.28k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.28k
    (void)parentDs;
2551
1.28k
    return op;
2552
1.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2549
1.63k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.63k
    (void)parentDs;
2551
1.63k
    return op;
2552
1.63k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2549
2.74k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.74k
    (void)parentDs;
2551
2.74k
    return op;
2552
2.74k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2549
2.49k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.49k
    (void)parentDs;
2551
2.49k
    return op;
2552
2.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2549
1.97k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.97k
    (void)parentDs;
2551
1.97k
    return op;
2552
1.97k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2549
2.06k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.06k
    (void)parentDs;
2551
2.06k
    return op;
2552
2.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2549
1.85k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.85k
    (void)parentDs;
2551
1.85k
    return op;
2552
1.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2549
1.97k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.97k
    (void)parentDs;
2551
1.97k
    return op;
2552
1.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2549
2.04k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.04k
    (void)parentDs;
2551
2.04k
    return op;
2552
2.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2549
2.19k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.19k
    (void)parentDs;
2551
2.19k
    return op;
2552
2.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2549
2.13k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.13k
    (void)parentDs;
2551
2.13k
    return op;
2552
2.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2549
2.61k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.61k
    (void)parentDs;
2551
2.61k
    return op;
2552
2.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2549
2.83k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.83k
    (void)parentDs;
2551
2.83k
    return op;
2552
2.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2549
2.56k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.56k
    (void)parentDs;
2551
2.56k
    return op;
2552
2.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2549
2.13k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.13k
    (void)parentDs;
2551
2.13k
    return op;
2552
2.13k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2549
1.68k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.68k
    (void)parentDs;
2551
1.68k
    return op;
2552
1.68k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2549
2.03k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.03k
    (void)parentDs;
2551
2.03k
    return op;
2552
2.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const
Line
Count
Source
2549
2.59k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.59k
    (void)parentDs;
2551
2.59k
    return op;
2552
2.59k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
Line
Count
Source
2549
1.64k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.64k
    (void)parentDs;
2551
1.64k
    return op;
2552
1.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2549
1.80k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.80k
    (void)parentDs;
2551
1.80k
    return op;
2552
1.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const
Line
Count
Source
2549
1.72k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.72k
    (void)parentDs;
2551
1.72k
    return op;
2552
1.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2549
1.93k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.93k
    (void)parentDs;
2551
1.93k
    return op;
2552
1.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2549
1.98k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.98k
    (void)parentDs;
2551
1.98k
    return op;
2552
1.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2549
2.24k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.24k
    (void)parentDs;
2551
2.24k
    return op;
2552
2.24k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2549
1.87k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.87k
    (void)parentDs;
2551
1.87k
    return op;
2552
1.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2549
1.76k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.76k
    (void)parentDs;
2551
1.76k
    return op;
2552
1.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2549
2.37k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.37k
    (void)parentDs;
2551
2.37k
    return op;
2552
2.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2549
2.34k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.34k
    (void)parentDs;
2551
2.34k
    return op;
2552
2.34k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2549
2.26k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.26k
    (void)parentDs;
2551
2.26k
    return op;
2552
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2549
2.14k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.14k
    (void)parentDs;
2551
2.14k
    return op;
2552
2.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const
Line
Count
Source
2549
2.27k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.27k
    (void)parentDs;
2551
2.27k
    return op;
2552
2.27k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2549
1.63k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.63k
    (void)parentDs;
2551
1.63k
    return op;
2552
1.63k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2549
1.87k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.87k
    (void)parentDs;
2551
1.87k
    return op;
2552
1.87k
}
2553
2554
503
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2555
503
    (void)parentDs;
2556
503
    op.modulo = modulo;
2557
503
    return op;
2558
503
}
2559
2560
355
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2561
355
    (void)parentDs;
2562
355
    op.modulo = modulo;
2563
355
    return op;
2564
355
}
2565
2566
230
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2567
230
    (void)parentDs;
2568
230
    op.modulo = modulo;
2569
230
    return op;
2570
230
}
2571
2572
292
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2573
292
    (void)parentDs;
2574
292
    op.modulo = modulo;
2575
292
    return op;
2576
292
}
2577
2578
203
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2579
203
    (void)parentDs;
2580
203
    op.modulo = modulo;
2581
203
    return op;
2582
203
}
2583
2584
252
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2585
252
    (void)parentDs;
2586
252
    op.modulo = modulo;
2587
252
    return op;
2588
252
}
2589
2590
296
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2591
296
    (void)parentDs;
2592
296
    op.modulo = modulo;
2593
296
    return op;
2594
296
}
2595
2596
218
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2597
218
    (void)parentDs;
2598
218
    op.modulo = modulo;
2599
218
    return op;
2600
218
}
2601
2602
354
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2603
354
    (void)parentDs;
2604
354
    op.modulo = modulo;
2605
354
    return op;
2606
354
}
2607
2608
407
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2609
407
    (void)parentDs;
2610
407
    op.modulo = modulo;
2611
407
    return op;
2612
407
}
2613
2614
300
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2615
300
    (void)parentDs;
2616
300
    op.modulo = modulo;
2617
300
    return op;
2618
300
}
2619
2620
422
operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2621
422
    (void)parentDs;
2622
422
    op.modulo = modulo;
2623
422
    return op;
2624
422
}
2625
2626
339
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2627
339
    (void)parentDs;
2628
339
    op.modulo = modulo;
2629
339
    return op;
2630
339
}
2631
2632
234
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2633
234
    (void)parentDs;
2634
234
    op.modulo = modulo;
2635
234
    return op;
2636
234
}
2637
2638
575
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2639
575
    (void)parentDs;
2640
575
    op.modulo = modulo;
2641
575
    return op;
2642
575
}
2643
2644
241
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2645
241
    (void)parentDs;
2646
241
    op.modulo = modulo;
2647
241
    return op;
2648
241
}
2649
2650
242
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2651
242
    (void)parentDs;
2652
242
    op.modulo = modulo;
2653
242
    return op;
2654
242
}
2655
2656
362
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2657
362
    (void)parentDs;
2658
362
    op.modulo = modulo;
2659
362
    return op;
2660
362
}
2661
2662
273
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2663
273
    (void)parentDs;
2664
273
    op.modulo = modulo;
2665
273
    return op;
2666
273
}
2667
2668
265
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2669
265
    (void)parentDs;
2670
265
    op.modulo = modulo;
2671
265
    return op;
2672
265
}
2673
2674
472
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2675
472
    (void)parentDs;
2676
472
    op.modulo = modulo;
2677
472
    return op;
2678
472
}
2679
2680
330
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2681
330
    (void)parentDs;
2682
330
    op.modulo = modulo;
2683
330
    return op;
2684
330
}
2685
2686
template <class ResultType, class OperationType>
2687
255k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
255k
    Datasource ds(data, size);
2689
255k
    if ( parentDs != nullptr ) {
2690
255k
        auto modifier = parentDs->GetData(0);
2691
255k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
255k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
255k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.77k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.77k
    Datasource ds(data, size);
2689
5.77k
    if ( parentDs != nullptr ) {
2690
5.77k
        auto modifier = parentDs->GetData(0);
2691
5.77k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.77k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.06k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.06k
    Datasource ds(data, size);
2689
4.06k
    if ( parentDs != nullptr ) {
2690
4.06k
        auto modifier = parentDs->GetData(0);
2691
4.06k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.06k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.17k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.17k
    Datasource ds(data, size);
2689
5.17k
    if ( parentDs != nullptr ) {
2690
5.17k
        auto modifier = parentDs->GetData(0);
2691
5.17k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.17k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::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::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
16.7k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
16.7k
    Datasource ds(data, size);
2689
16.7k
    if ( parentDs != nullptr ) {
2690
16.7k
        auto modifier = parentDs->GetData(0);
2691
16.7k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
16.7k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
16.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
12.4k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
12.4k
    Datasource ds(data, size);
2689
12.4k
    if ( parentDs != nullptr ) {
2690
12.4k
        auto modifier = parentDs->GetData(0);
2691
12.4k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
12.4k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
12.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.98k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.98k
    Datasource ds(data, size);
2689
2.98k
    if ( parentDs != nullptr ) {
2690
2.98k
        auto modifier = parentDs->GetData(0);
2691
2.98k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.98k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
6.92k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
6.92k
    Datasource ds(data, size);
2689
6.92k
    if ( parentDs != nullptr ) {
2690
6.92k
        auto modifier = parentDs->GetData(0);
2691
6.92k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
6.92k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
6.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.71k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.71k
    Datasource ds(data, size);
2689
2.71k
    if ( parentDs != nullptr ) {
2690
2.71k
        auto modifier = parentDs->GetData(0);
2691
2.71k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.71k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.25k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.25k
    Datasource ds(data, size);
2689
2.25k
    if ( parentDs != nullptr ) {
2690
2.25k
        auto modifier = parentDs->GetData(0);
2691
2.25k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.25k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.36k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.36k
    Datasource ds(data, size);
2689
2.36k
    if ( parentDs != nullptr ) {
2690
2.36k
        auto modifier = parentDs->GetData(0);
2691
2.36k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.36k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.86k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.86k
    Datasource ds(data, size);
2689
3.86k
    if ( parentDs != nullptr ) {
2690
3.86k
        auto modifier = parentDs->GetData(0);
2691
3.86k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.86k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.52k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.52k
    Datasource ds(data, size);
2689
2.52k
    if ( parentDs != nullptr ) {
2690
2.52k
        auto modifier = parentDs->GetData(0);
2691
2.52k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.52k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.14k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.14k
    Datasource ds(data, size);
2689
3.14k
    if ( parentDs != nullptr ) {
2690
3.14k
        auto modifier = parentDs->GetData(0);
2691
3.14k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.14k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.14k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.14k
    Datasource ds(data, size);
2689
2.14k
    if ( parentDs != nullptr ) {
2690
2.14k
        auto modifier = parentDs->GetData(0);
2691
2.14k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.14k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.10k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.10k
    Datasource ds(data, size);
2689
2.10k
    if ( parentDs != nullptr ) {
2690
2.10k
        auto modifier = parentDs->GetData(0);
2691
2.10k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.10k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.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<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.75k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.75k
    Datasource ds(data, size);
2689
2.75k
    if ( parentDs != nullptr ) {
2690
2.75k
        auto modifier = parentDs->GetData(0);
2691
2.75k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.75k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.75k
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.69k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.69k
    Datasource ds(data, size);
2689
2.69k
    if ( parentDs != nullptr ) {
2690
2.69k
        auto modifier = parentDs->GetData(0);
2691
2.69k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.69k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_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<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.48k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.48k
    Datasource ds(data, size);
2689
2.48k
    if ( parentDs != nullptr ) {
2690
2.48k
        auto modifier = parentDs->GetData(0);
2691
2.48k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.48k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.27k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.27k
    Datasource ds(data, size);
2689
2.27k
    if ( parentDs != nullptr ) {
2690
2.27k
        auto modifier = parentDs->GetData(0);
2691
2.27k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.27k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.27k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.39k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.39k
    Datasource ds(data, size);
2689
2.39k
    if ( parentDs != nullptr ) {
2690
2.39k
        auto modifier = parentDs->GetData(0);
2691
2.39k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.39k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.42k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.42k
    Datasource ds(data, size);
2689
3.42k
    if ( parentDs != nullptr ) {
2690
3.42k
        auto modifier = parentDs->GetData(0);
2691
3.42k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.42k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.39k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.39k
    Datasource ds(data, size);
2689
2.39k
    if ( parentDs != nullptr ) {
2690
2.39k
        auto modifier = parentDs->GetData(0);
2691
2.39k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.39k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.22k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.22k
    Datasource ds(data, size);
2689
2.22k
    if ( parentDs != nullptr ) {
2690
2.22k
        auto modifier = parentDs->GetData(0);
2691
2.22k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.22k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.58k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.58k
    Datasource ds(data, size);
2689
2.58k
    if ( parentDs != nullptr ) {
2690
2.58k
        auto modifier = parentDs->GetData(0);
2691
2.58k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.58k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.58k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.95k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.95k
    Datasource ds(data, size);
2689
2.95k
    if ( parentDs != nullptr ) {
2690
2.95k
        auto modifier = parentDs->GetData(0);
2691
2.95k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.95k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.95k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.34k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.34k
    Datasource ds(data, size);
2689
2.34k
    if ( parentDs != nullptr ) {
2690
2.34k
        auto modifier = parentDs->GetData(0);
2691
2.34k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.34k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.34k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.70k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.70k
    Datasource ds(data, size);
2689
2.70k
    if ( parentDs != nullptr ) {
2690
2.70k
        auto modifier = parentDs->GetData(0);
2691
2.70k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.70k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.70k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.33k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.33k
    Datasource ds(data, size);
2689
2.33k
    if ( parentDs != nullptr ) {
2690
2.33k
        auto modifier = parentDs->GetData(0);
2691
2.33k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.33k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.33k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.45k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.45k
    Datasource ds(data, size);
2689
2.45k
    if ( parentDs != nullptr ) {
2690
2.45k
        auto modifier = parentDs->GetData(0);
2691
2.45k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.45k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.19k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.19k
    Datasource ds(data, size);
2689
3.19k
    if ( parentDs != nullptr ) {
2690
3.19k
        auto modifier = parentDs->GetData(0);
2691
3.19k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.19k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.19k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.81k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.81k
    Datasource ds(data, size);
2689
2.81k
    if ( parentDs != nullptr ) {
2690
2.81k
        auto modifier = parentDs->GetData(0);
2691
2.81k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.81k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.62k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.62k
    Datasource ds(data, size);
2689
2.62k
    if ( parentDs != nullptr ) {
2690
2.62k
        auto modifier = parentDs->GetData(0);
2691
2.62k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.62k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.46k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.46k
    Datasource ds(data, size);
2689
1.46k
    if ( parentDs != nullptr ) {
2690
1.46k
        auto modifier = parentDs->GetData(0);
2691
1.46k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.46k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.46k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.45k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.45k
    Datasource ds(data, size);
2689
2.45k
    if ( parentDs != nullptr ) {
2690
2.45k
        auto modifier = parentDs->GetData(0);
2691
2.45k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.45k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.70k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.70k
    Datasource ds(data, size);
2689
2.70k
    if ( parentDs != nullptr ) {
2690
2.70k
        auto modifier = parentDs->GetData(0);
2691
2.70k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.70k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.70k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.03k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.03k
    Datasource ds(data, size);
2689
2.03k
    if ( parentDs != nullptr ) {
2690
2.03k
        auto modifier = parentDs->GetData(0);
2691
2.03k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.03k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.15k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.15k
    Datasource ds(data, size);
2689
3.15k
    if ( parentDs != nullptr ) {
2690
3.15k
        auto modifier = parentDs->GetData(0);
2691
3.15k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.15k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.85k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.85k
    Datasource ds(data, size);
2689
2.85k
    if ( parentDs != nullptr ) {
2690
2.85k
        auto modifier = parentDs->GetData(0);
2691
2.85k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.85k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.24k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.24k
    Datasource ds(data, size);
2689
2.24k
    if ( parentDs != nullptr ) {
2690
2.24k
        auto modifier = parentDs->GetData(0);
2691
2.24k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.24k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.30k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.30k
    Datasource ds(data, size);
2689
2.30k
    if ( parentDs != nullptr ) {
2690
2.30k
        auto modifier = parentDs->GetData(0);
2691
2.30k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.30k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.71k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.71k
    Datasource ds(data, size);
2689
2.71k
    if ( parentDs != nullptr ) {
2690
2.71k
        auto modifier = parentDs->GetData(0);
2691
2.71k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.71k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.92k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.92k
    Datasource ds(data, size);
2689
1.92k
    if ( parentDs != nullptr ) {
2690
1.92k
        auto modifier = parentDs->GetData(0);
2691
1.92k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.92k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.82k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.82k
    Datasource ds(data, size);
2689
1.82k
    if ( parentDs != nullptr ) {
2690
1.82k
        auto modifier = parentDs->GetData(0);
2691
1.82k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.82k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.82k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.90k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.90k
    Datasource ds(data, size);
2689
1.90k
    if ( parentDs != nullptr ) {
2690
1.90k
        auto modifier = parentDs->GetData(0);
2691
1.90k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.90k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.90k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.45k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.45k
    Datasource ds(data, size);
2689
2.45k
    if ( parentDs != nullptr ) {
2690
2.45k
        auto modifier = parentDs->GetData(0);
2691
2.45k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.45k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.30k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.30k
    Datasource ds(data, size);
2689
3.30k
    if ( parentDs != nullptr ) {
2690
3.30k
        auto modifier = parentDs->GetData(0);
2691
3.30k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.30k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
16.7k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
16.7k
    Datasource ds(data, size);
2689
16.7k
    if ( parentDs != nullptr ) {
2690
16.7k
        auto modifier = parentDs->GetData(0);
2691
16.7k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
16.7k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
16.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.02k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.02k
    Datasource ds(data, size);
2689
2.02k
    if ( parentDs != nullptr ) {
2690
2.02k
        auto modifier = parentDs->GetData(0);
2691
2.02k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.02k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.47k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.47k
    Datasource ds(data, size);
2689
2.47k
    if ( parentDs != nullptr ) {
2690
2.47k
        auto modifier = parentDs->GetData(0);
2691
2.47k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.47k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.29k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.29k
    Datasource ds(data, size);
2689
1.29k
    if ( parentDs != nullptr ) {
2690
1.29k
        auto modifier = parentDs->GetData(0);
2691
1.29k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.29k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.64k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.64k
    Datasource ds(data, size);
2689
1.64k
    if ( parentDs != nullptr ) {
2690
1.64k
        auto modifier = parentDs->GetData(0);
2691
1.64k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.64k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::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<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.51k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.51k
    Datasource ds(data, size);
2689
2.51k
    if ( parentDs != nullptr ) {
2690
2.51k
        auto modifier = parentDs->GetData(0);
2691
2.51k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.51k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.02k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.02k
    Datasource ds(data, size);
2689
2.02k
    if ( parentDs != nullptr ) {
2690
2.02k
        auto modifier = parentDs->GetData(0);
2691
2.02k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.02k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.02k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.14k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.14k
    Datasource ds(data, size);
2689
2.14k
    if ( parentDs != nullptr ) {
2690
2.14k
        auto modifier = parentDs->GetData(0);
2691
2.14k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.14k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.92k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.92k
    Datasource ds(data, size);
2689
1.92k
    if ( parentDs != nullptr ) {
2690
1.92k
        auto modifier = parentDs->GetData(0);
2691
1.92k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.92k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.99k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.99k
    Datasource ds(data, size);
2689
1.99k
    if ( parentDs != nullptr ) {
2690
1.99k
        auto modifier = parentDs->GetData(0);
2691
1.99k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.99k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.06k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.06k
    Datasource ds(data, size);
2689
2.06k
    if ( parentDs != nullptr ) {
2690
2.06k
        auto modifier = parentDs->GetData(0);
2691
2.06k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.06k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.21k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.21k
    Datasource ds(data, size);
2689
2.21k
    if ( parentDs != nullptr ) {
2690
2.21k
        auto modifier = parentDs->GetData(0);
2691
2.21k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.21k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.15k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.15k
    Datasource ds(data, size);
2689
2.15k
    if ( parentDs != nullptr ) {
2690
2.15k
        auto modifier = parentDs->GetData(0);
2691
2.15k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.15k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.63k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.63k
    Datasource ds(data, size);
2689
2.63k
    if ( parentDs != nullptr ) {
2690
2.63k
        auto modifier = parentDs->GetData(0);
2691
2.63k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.63k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.63k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.86k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.86k
    Datasource ds(data, size);
2689
2.86k
    if ( parentDs != nullptr ) {
2690
2.86k
        auto modifier = parentDs->GetData(0);
2691
2.86k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.86k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.58k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.58k
    Datasource ds(data, size);
2689
2.58k
    if ( parentDs != nullptr ) {
2690
2.58k
        auto modifier = parentDs->GetData(0);
2691
2.58k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.58k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.14k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.14k
    Datasource ds(data, size);
2689
2.14k
    if ( parentDs != nullptr ) {
2690
2.14k
        auto modifier = parentDs->GetData(0);
2691
2.14k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.14k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.14k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.70k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.70k
    Datasource ds(data, size);
2689
1.70k
    if ( parentDs != nullptr ) {
2690
1.70k
        auto modifier = parentDs->GetData(0);
2691
1.70k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.70k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.70k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.05k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.05k
    Datasource ds(data, size);
2689
2.05k
    if ( parentDs != nullptr ) {
2690
2.05k
        auto modifier = parentDs->GetData(0);
2691
2.05k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.05k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.61k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.61k
    Datasource ds(data, size);
2689
2.61k
    if ( parentDs != nullptr ) {
2690
2.61k
        auto modifier = parentDs->GetData(0);
2691
2.61k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.61k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.66k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.66k
    Datasource ds(data, size);
2689
1.66k
    if ( parentDs != nullptr ) {
2690
1.66k
        auto modifier = parentDs->GetData(0);
2691
1.66k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.66k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.81k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.81k
    Datasource ds(data, size);
2689
1.81k
    if ( parentDs != nullptr ) {
2690
1.81k
        auto modifier = parentDs->GetData(0);
2691
1.81k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.81k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.74k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.74k
    Datasource ds(data, size);
2689
1.74k
    if ( parentDs != nullptr ) {
2690
1.74k
        auto modifier = parentDs->GetData(0);
2691
1.74k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.74k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.95k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.95k
    Datasource ds(data, size);
2689
1.95k
    if ( parentDs != nullptr ) {
2690
1.95k
        auto modifier = parentDs->GetData(0);
2691
1.95k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.95k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.01k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.01k
    Datasource ds(data, size);
2689
2.01k
    if ( parentDs != nullptr ) {
2690
2.01k
        auto modifier = parentDs->GetData(0);
2691
2.01k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.01k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.26k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.26k
    Datasource ds(data, size);
2689
2.26k
    if ( parentDs != nullptr ) {
2690
2.26k
        auto modifier = parentDs->GetData(0);
2691
2.26k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.26k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.26k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.89k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.89k
    Datasource ds(data, size);
2689
1.89k
    if ( parentDs != nullptr ) {
2690
1.89k
        auto modifier = parentDs->GetData(0);
2691
1.89k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.89k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.77k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.77k
    Datasource ds(data, size);
2689
1.77k
    if ( parentDs != nullptr ) {
2690
1.77k
        auto modifier = parentDs->GetData(0);
2691
1.77k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.77k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.39k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.39k
    Datasource ds(data, size);
2689
2.39k
    if ( parentDs != nullptr ) {
2690
2.39k
        auto modifier = parentDs->GetData(0);
2691
2.39k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.39k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.36k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.36k
    Datasource ds(data, size);
2689
2.36k
    if ( parentDs != nullptr ) {
2690
2.36k
        auto modifier = parentDs->GetData(0);
2691
2.36k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.36k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.36k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.29k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.29k
    Datasource ds(data, size);
2689
2.29k
    if ( parentDs != nullptr ) {
2690
2.29k
        auto modifier = parentDs->GetData(0);
2691
2.29k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.29k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.16k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.16k
    Datasource ds(data, size);
2689
2.16k
    if ( parentDs != nullptr ) {
2690
2.16k
        auto modifier = parentDs->GetData(0);
2691
2.16k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.16k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.35k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.35k
    Datasource ds(data, size);
2689
2.35k
    if ( parentDs != nullptr ) {
2690
2.35k
        auto modifier = parentDs->GetData(0);
2691
2.35k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.35k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.35k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.64k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.64k
    Datasource ds(data, size);
2689
1.64k
    if ( parentDs != nullptr ) {
2690
1.64k
        auto modifier = parentDs->GetData(0);
2691
1.64k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.64k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.64k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.90k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.90k
    Datasource ds(data, size);
2689
1.90k
    if ( parentDs != nullptr ) {
2690
1.90k
        auto modifier = parentDs->GetData(0);
2691
1.90k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.90k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.90k
}
2696
2697
template <class ResultType, class OperationType>
2698
253k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
253k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
253k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
253k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
253k
    if ( modules.find(moduleID) == modules.end() ) {
2712
176k
        return nullptr;
2713
176k
    }
2714
2715
77.1k
    return modules.at(moduleID);
2716
253k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.76k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.76k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.76k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.76k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.76k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.67k
        return nullptr;
2713
1.67k
    }
2714
2715
4.08k
    return modules.at(moduleID);
2716
5.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.04k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.04k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.04k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.04k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.04k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.94k
        return nullptr;
2713
1.94k
    }
2714
2715
2.09k
    return modules.at(moduleID);
2716
4.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::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
2.19k
        return nullptr;
2713
2.19k
    }
2714
2715
2.94k
    return modules.at(moduleID);
2716
5.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::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
1.98k
        return nullptr;
2713
1.98k
    }
2714
2715
2.99k
    return modules.at(moduleID);
2716
4.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
16.7k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
16.7k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
16.7k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
16.7k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
16.7k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.80k
        return nullptr;
2713
3.80k
    }
2714
2715
12.9k
    return modules.at(moduleID);
2716
16.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
12.4k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
12.4k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
12.4k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
12.4k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
12.4k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.96k
        return nullptr;
2713
2.96k
    }
2714
2715
9.50k
    return modules.at(moduleID);
2716
12.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.96k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.96k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.96k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.96k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.96k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.11k
        return nullptr;
2713
2.11k
    }
2714
2715
848
    return modules.at(moduleID);
2716
2.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
6.90k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
6.90k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
6.90k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
6.90k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
6.90k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.26k
        return nullptr;
2713
2.26k
    }
2714
2715
4.63k
    return modules.at(moduleID);
2716
6.90k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.69k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.69k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.69k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.69k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.69k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.86k
        return nullptr;
2713
1.86k
    }
2714
2715
833
    return modules.at(moduleID);
2716
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.23k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.23k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.23k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.23k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.23k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.63k
        return nullptr;
2713
1.63k
    }
2714
2715
602
    return modules.at(moduleID);
2716
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.34k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.34k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.34k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.34k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.34k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.76k
        return nullptr;
2713
1.76k
    }
2714
2715
579
    return modules.at(moduleID);
2716
2.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.84k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.84k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.84k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.84k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.84k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.04k
        return nullptr;
2713
2.04k
    }
2714
2715
1.80k
    return modules.at(moduleID);
2716
3.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.50k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.50k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.50k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.50k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.50k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.13k
        return nullptr;
2713
2.13k
    }
2714
2715
367
    return modules.at(moduleID);
2716
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.11k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.11k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.11k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.11k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.11k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.48k
        return nullptr;
2713
2.48k
    }
2714
2715
629
    return modules.at(moduleID);
2716
3.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.12k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.12k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.12k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.12k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.12k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.49k
        return nullptr;
2713
1.49k
    }
2714
2715
633
    return modules.at(moduleID);
2716
2.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.08k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.08k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.08k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.08k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.08k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.94k
        return nullptr;
2713
1.94k
    }
2714
2715
139
    return modules.at(moduleID);
2716
2.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::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
2.12k
        return nullptr;
2713
2.12k
    }
2714
2715
1.73k
    return modules.at(moduleID);
2716
3.86k
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.72k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.72k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.72k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.72k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.72k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.23k
        return nullptr;
2713
2.23k
    }
2714
2715
492
    return modules.at(moduleID);
2716
2.72k
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.66k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.66k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.66k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.66k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.66k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.97k
        return nullptr;
2713
1.97k
    }
2714
2715
699
    return modules.at(moduleID);
2716
2.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.74k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.74k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.74k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.74k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.74k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.61k
        return nullptr;
2713
1.61k
    }
2714
2715
1.13k
    return modules.at(moduleID);
2716
2.74k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.47k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.47k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.47k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.47k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.47k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.56k
        return nullptr;
2713
1.56k
    }
2714
2715
908
    return modules.at(moduleID);
2716
2.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.26k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.26k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.26k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.26k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.26k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.02k
        return nullptr;
2713
1.02k
    }
2714
2715
1.24k
    return modules.at(moduleID);
2716
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.38k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.38k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.38k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.38k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.38k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.18k
        return nullptr;
2713
2.18k
    }
2714
2715
195
    return modules.at(moduleID);
2716
2.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::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
2.38k
        return nullptr;
2713
2.38k
    }
2714
2715
1.01k
    return modules.at(moduleID);
2716
3.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.37k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.37k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.37k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.37k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.37k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.98k
        return nullptr;
2713
1.98k
    }
2714
2715
385
    return modules.at(moduleID);
2716
2.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.19k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.19k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.19k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.19k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.19k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.03k
        return nullptr;
2713
2.03k
    }
2714
2715
167
    return modules.at(moduleID);
2716
2.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.56k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.56k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.56k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.56k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.56k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.40k
        return nullptr;
2713
2.40k
    }
2714
2715
159
    return modules.at(moduleID);
2716
2.56k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.93k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.93k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.93k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.93k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.93k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.75k
        return nullptr;
2713
2.75k
    }
2714
2715
175
    return modules.at(moduleID);
2716
2.93k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.32k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.32k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.32k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.32k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.32k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.72k
        return nullptr;
2713
1.72k
    }
2714
2715
600
    return modules.at(moduleID);
2716
2.32k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.67k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.67k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.67k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.67k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.67k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.33k
        return nullptr;
2713
2.33k
    }
2714
2715
349
    return modules.at(moduleID);
2716
2.67k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.31k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.31k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.31k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.31k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.31k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.13k
        return nullptr;
2713
2.13k
    }
2714
2715
189
    return modules.at(moduleID);
2716
2.31k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.42k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.42k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.42k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.42k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.42k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.29k
        return nullptr;
2713
2.29k
    }
2714
2715
138
    return modules.at(moduleID);
2716
2.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::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.28k
        return nullptr;
2713
2.28k
    }
2714
2715
881
    return modules.at(moduleID);
2716
3.16k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.78k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.78k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.78k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.78k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.78k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.26k
        return nullptr;
2713
2.26k
    }
2714
2715
527
    return modules.at(moduleID);
2716
2.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.60k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.60k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.60k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.60k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.60k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.37k
        return nullptr;
2713
2.37k
    }
2714
2715
224
    return modules.at(moduleID);
2716
2.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.45k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.45k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.45k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.45k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.45k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.29k
        return nullptr;
2713
1.29k
    }
2714
2715
158
    return modules.at(moduleID);
2716
1.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.41k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.41k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.41k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.41k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.41k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.22k
        return nullptr;
2713
2.22k
    }
2714
2715
194
    return modules.at(moduleID);
2716
2.41k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.67k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.67k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.67k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.67k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.67k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.45k
        return nullptr;
2713
2.45k
    }
2714
2715
223
    return modules.at(moduleID);
2716
2.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.01k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.01k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.01k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.01k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.01k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.85k
        return nullptr;
2713
1.85k
    }
2714
2715
157
    return modules.at(moduleID);
2716
2.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.12k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.12k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.12k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.12k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.12k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.90k
        return nullptr;
2713
2.90k
    }
2714
2715
223
    return modules.at(moduleID);
2716
3.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.83k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.83k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.83k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.83k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.83k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.61k
        return nullptr;
2713
2.61k
    }
2714
2715
216
    return modules.at(moduleID);
2716
2.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.22k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.22k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.22k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.22k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.22k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.95k
        return nullptr;
2713
1.95k
    }
2714
2715
266
    return modules.at(moduleID);
2716
2.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.28k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.28k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.28k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.28k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.28k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.98k
        return nullptr;
2713
1.98k
    }
2714
2715
298
    return modules.at(moduleID);
2716
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.69k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.69k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.69k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.69k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.69k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.27k
        return nullptr;
2713
2.27k
    }
2714
2715
418
    return modules.at(moduleID);
2716
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.91k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.91k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.91k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.91k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.91k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.67k
        return nullptr;
2713
1.67k
    }
2714
2715
236
    return modules.at(moduleID);
2716
1.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.80k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.80k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.80k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.80k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.80k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.55k
        return nullptr;
2713
1.55k
    }
2714
2715
252
    return modules.at(moduleID);
2716
1.80k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.88k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.88k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.88k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.88k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.88k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.63k
        return nullptr;
2713
1.63k
    }
2714
2715
251
    return modules.at(moduleID);
2716
1.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.44k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.44k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.44k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.44k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.44k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.22k
        return nullptr;
2713
2.22k
    }
2714
2715
220
    return modules.at(moduleID);
2716
2.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::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.73k
        return nullptr;
2713
2.73k
    }
2714
2715
551
    return modules.at(moduleID);
2716
3.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
16.7k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
16.7k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
16.7k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
16.7k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
16.7k
    if ( modules.find(moduleID) == modules.end() ) {
2712
7.35k
        return nullptr;
2713
7.35k
    }
2714
2715
9.37k
    return modules.at(moduleID);
2716
16.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.00k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.00k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.00k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.00k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.00k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.76k
        return nullptr;
2713
1.76k
    }
2714
2715
235
    return modules.at(moduleID);
2716
2.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.42k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.42k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.42k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.42k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.42k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.88k
        return nullptr;
2713
1.88k
    }
2714
2715
544
    return modules.at(moduleID);
2716
2.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.28k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.28k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.28k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.28k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.28k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.11k
        return nullptr;
2713
1.11k
    }
2714
2715
167
    return modules.at(moduleID);
2716
1.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.63k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.63k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.63k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.63k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.63k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.47k
        return nullptr;
2713
1.47k
    }
2714
2715
156
    return modules.at(moduleID);
2716
1.63k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.74k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.74k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.74k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.74k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.74k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.52k
        return nullptr;
2713
2.52k
    }
2714
2715
216
    return modules.at(moduleID);
2716
2.74k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.49k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.49k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.49k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.49k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.49k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.29k
        return nullptr;
2713
2.29k
    }
2714
2715
196
    return modules.at(moduleID);
2716
2.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.97k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.97k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.97k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.97k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.97k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.72k
        return nullptr;
2713
1.72k
    }
2714
2715
253
    return modules.at(moduleID);
2716
1.97k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.06k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.06k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.06k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.06k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.06k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.85k
        return nullptr;
2713
1.85k
    }
2714
2715
201
    return modules.at(moduleID);
2716
2.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.85k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.85k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.85k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.85k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.85k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.64k
        return nullptr;
2713
1.64k
    }
2714
2715
208
    return modules.at(moduleID);
2716
1.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.97k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.97k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.97k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.97k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.97k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.79k
        return nullptr;
2713
1.79k
    }
2714
2715
181
    return modules.at(moduleID);
2716
1.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.04k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.04k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.04k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.04k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.04k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.87k
        return nullptr;
2713
1.87k
    }
2714
2715
173
    return modules.at(moduleID);
2716
2.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.19k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.19k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.19k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.19k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.19k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.00k
        return nullptr;
2713
2.00k
    }
2714
2715
186
    return modules.at(moduleID);
2716
2.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.13k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.13k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.13k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.13k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.13k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.90k
        return nullptr;
2713
1.90k
    }
2714
2715
224
    return modules.at(moduleID);
2716
2.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.61k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.61k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.61k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.61k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.61k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.41k
        return nullptr;
2713
2.41k
    }
2714
2715
203
    return modules.at(moduleID);
2716
2.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.83k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.83k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.83k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.83k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.83k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.65k
        return nullptr;
2713
2.65k
    }
2714
2715
187
    return modules.at(moduleID);
2716
2.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.56k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.56k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.56k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.56k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.56k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.39k
        return nullptr;
2713
2.39k
    }
2714
2715
173
    return modules.at(moduleID);
2716
2.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.13k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.13k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.13k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.13k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.13k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.95k
        return nullptr;
2713
1.95k
    }
2714
2715
180
    return modules.at(moduleID);
2716
2.13k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.68k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.68k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.68k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.68k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.68k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.53k
        return nullptr;
2713
1.53k
    }
2714
2715
156
    return modules.at(moduleID);
2716
1.68k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.03k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.03k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.03k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.03k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.03k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.81k
        return nullptr;
2713
1.81k
    }
2714
2715
214
    return modules.at(moduleID);
2716
2.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.59k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.59k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.59k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.59k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.59k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.41k
        return nullptr;
2713
2.41k
    }
2714
2715
174
    return modules.at(moduleID);
2716
2.59k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.64k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.64k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.64k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.64k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.64k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.49k
        return nullptr;
2713
1.49k
    }
2714
2715
155
    return modules.at(moduleID);
2716
1.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.80k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.80k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.80k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.80k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.80k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.64k
        return nullptr;
2713
1.64k
    }
2714
2715
163
    return modules.at(moduleID);
2716
1.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.72k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.72k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.72k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.72k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.72k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.59k
        return nullptr;
2713
1.59k
    }
2714
2715
137
    return modules.at(moduleID);
2716
1.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.93k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.93k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.93k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.93k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.93k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.77k
        return nullptr;
2713
1.77k
    }
2714
2715
157
    return modules.at(moduleID);
2716
1.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.98k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.98k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.98k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.98k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.98k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.75k
        return nullptr;
2713
1.75k
    }
2714
2715
235
    return modules.at(moduleID);
2716
1.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.24k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.24k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.24k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.24k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.24k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.06k
        return nullptr;
2713
2.06k
    }
2714
2715
178
    return modules.at(moduleID);
2716
2.24k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.87k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.87k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.87k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.87k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.87k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.65k
        return nullptr;
2713
1.65k
    }
2714
2715
218
    return modules.at(moduleID);
2716
1.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.76k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.76k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.76k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.76k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.76k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.59k
        return nullptr;
2713
1.59k
    }
2714
2715
167
    return modules.at(moduleID);
2716
1.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.37k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.37k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.37k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.37k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.37k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.07k
        return nullptr;
2713
2.07k
    }
2714
2715
292
    return modules.at(moduleID);
2716
2.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.34k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.34k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.34k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.34k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.34k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.16k
        return nullptr;
2713
2.16k
    }
2714
2715
178
    return modules.at(moduleID);
2716
2.34k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.26k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.26k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.26k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.26k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.26k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.04k
        return nullptr;
2713
2.04k
    }
2714
2715
219
    return modules.at(moduleID);
2716
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.14k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.14k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.14k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.14k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.14k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.93k
        return nullptr;
2713
1.93k
    }
2714
2715
217
    return modules.at(moduleID);
2716
2.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.27k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.27k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.27k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.27k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.27k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.98k
        return nullptr;
2713
1.98k
    }
2714
2715
289
    return modules.at(moduleID);
2716
2.27k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.63k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.63k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.63k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.63k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.63k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.47k
        return nullptr;
2713
1.47k
    }
2714
2715
151
    return modules.at(moduleID);
2716
1.63k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.87k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.87k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.87k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.87k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.87k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.65k
        return nullptr;
2713
1.65k
    }
2714
2715
221
    return modules.at(moduleID);
2716
1.87k
}
2717
2718
template <class ResultType, class OperationType>
2719
37.8k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
37.8k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
37.8k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
255k
    do {
2725
255k
        auto op = getOp(&parentDs, data, size);
2726
255k
        auto module = getModule(parentDs);
2727
255k
        if ( module == nullptr ) {
2728
176k
            continue;
2729
176k
        }
2730
2731
79.1k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
79.1k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
734
            break;
2736
734
        }
2737
255k
    } while ( parentDs.Get<bool>() == true );
2738
2739
37.8k
    if ( operations.empty() == true ) {
2740
717
        return;
2741
717
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
37.1k
#if 1
2745
37.1k
    {
2746
37.1k
        std::set<uint64_t> moduleIDs;
2747
57.8k
        for (const auto& m : modules ) {
2748
57.8k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
57.8k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
57.8k
            moduleIDs.insert(moduleID);
2756
57.8k
        }
2757
2758
37.1k
        std::set<uint64_t> operationModuleIDs;
2759
68.1k
        for (const auto& op : operations) {
2760
68.1k
            operationModuleIDs.insert(op.first->ID);
2761
68.1k
        }
2762
2763
37.1k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
37.1k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
37.1k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
37.1k
        for (const auto& id : addModuleIDs) {
2768
27.7k
            operations.push_back({ modules.at(id), operations[0].second});
2769
27.7k
        }
2770
37.1k
    }
2771
37.1k
#endif
2772
2773
37.1k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
37.1k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
133k
    for (size_t i = 0; i < operations.size(); i++) {
2781
95.8k
        auto& operation = operations[i];
2782
2783
95.8k
        auto& module = operation.first;
2784
95.8k
        auto& op = operation.second;
2785
2786
95.8k
        if ( i > 0 ) {
2787
66.9k
            auto& prevModule = operations[i-1].first;
2788
66.9k
            auto& prevOp = operations[i].second;
2789
2790
66.9k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
37.0k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
37.0k
                if ( curModifier.size() == 0 ) {
2793
14.6M
                    for (size_t j = 0; j < 512; j++) {
2794
14.5M
                        curModifier.push_back(1);
2795
14.5M
                    }
2796
28.4k
                } else {
2797
209k
                    for (auto& c : curModifier) {
2798
209k
                        c++;
2799
209k
                    }
2800
8.52k
                }
2801
37.0k
            }
2802
66.9k
        }
2803
2804
95.8k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
95.8k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
95.8k
        const auto& result = results.back();
2811
2812
95.8k
        if ( result.second != std::nullopt ) {
2813
28.0k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
28.0k
        }
2820
2821
95.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
95.8k
        if ( options.disableTests == false ) {
2830
95.8k
            tests::test(op, result.second);
2831
95.8k
        }
2832
2833
95.8k
        postprocess(module, op, result);
2834
95.8k
    }
2835
2836
37.1k
    if ( options.noCompare == false ) {
2837
28.9k
        compare(operations, results, data, size);
2838
28.9k
    }
2839
37.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.88k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.88k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.88k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.77k
    do {
2725
5.77k
        auto op = getOp(&parentDs, data, size);
2726
5.77k
        auto module = getModule(parentDs);
2727
5.77k
        if ( module == nullptr ) {
2728
1.67k
            continue;
2729
1.67k
        }
2730
2731
4.10k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.10k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
5.77k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.88k
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.88k
#if 1
2745
1.88k
    {
2746
1.88k
        std::set<uint64_t> moduleIDs;
2747
3.56k
        for (const auto& m : modules ) {
2748
3.56k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.56k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.56k
            moduleIDs.insert(moduleID);
2756
3.56k
        }
2757
2758
1.88k
        std::set<uint64_t> operationModuleIDs;
2759
3.87k
        for (const auto& op : operations) {
2760
3.87k
            operationModuleIDs.insert(op.first->ID);
2761
3.87k
        }
2762
2763
1.88k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.88k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.88k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.88k
        for (const auto& id : addModuleIDs) {
2768
1.75k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.75k
        }
2770
1.88k
    }
2771
1.88k
#endif
2772
2773
1.88k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.88k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
7.51k
    for (size_t i = 0; i < operations.size(); i++) {
2781
5.62k
        auto& operation = operations[i];
2782
2783
5.62k
        auto& module = operation.first;
2784
5.62k
        auto& op = operation.second;
2785
2786
5.62k
        if ( i > 0 ) {
2787
3.84k
            auto& prevModule = operations[i-1].first;
2788
3.84k
            auto& prevOp = operations[i].second;
2789
2790
3.84k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2.03k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2.03k
                if ( curModifier.size() == 0 ) {
2793
834k
                    for (size_t j = 0; j < 512; j++) {
2794
833k
                        curModifier.push_back(1);
2795
833k
                    }
2796
1.62k
                } else {
2797
2.61k
                    for (auto& c : curModifier) {
2798
2.61k
                        c++;
2799
2.61k
                    }
2800
411
                }
2801
2.03k
            }
2802
3.84k
        }
2803
2804
5.62k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5.62k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5.62k
        const auto& result = results.back();
2811
2812
5.62k
        if ( result.second != std::nullopt ) {
2813
3.10k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
3.10k
        }
2820
2821
5.62k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.62k
        if ( options.disableTests == false ) {
2830
5.62k
            tests::test(op, result.second);
2831
5.62k
        }
2832
2833
5.62k
        postprocess(module, op, result);
2834
5.62k
    }
2835
2836
1.88k
    if ( options.noCompare == false ) {
2837
1.78k
        compare(operations, results, data, size);
2838
1.78k
    }
2839
1.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
881
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
881
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
881
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.06k
    do {
2725
4.06k
        auto op = getOp(&parentDs, data, size);
2726
4.06k
        auto module = getModule(parentDs);
2727
4.06k
        if ( module == nullptr ) {
2728
1.94k
            continue;
2729
1.94k
        }
2730
2731
2.11k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.11k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
4.06k
    } while ( parentDs.Get<bool>() == true );
2738
2739
881
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
877
#if 1
2745
877
    {
2746
877
        std::set<uint64_t> moduleIDs;
2747
1.62k
        for (const auto& m : modules ) {
2748
1.62k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.62k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.62k
            moduleIDs.insert(moduleID);
2756
1.62k
        }
2757
2758
877
        std::set<uint64_t> operationModuleIDs;
2759
1.91k
        for (const auto& op : operations) {
2760
1.91k
            operationModuleIDs.insert(op.first->ID);
2761
1.91k
        }
2762
2763
877
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
877
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
877
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
877
        for (const auto& id : addModuleIDs) {
2768
793
            operations.push_back({ modules.at(id), operations[0].second});
2769
793
        }
2770
877
    }
2771
877
#endif
2772
2773
877
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
877
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.58k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.71k
        auto& operation = operations[i];
2782
2783
2.71k
        auto& module = operation.first;
2784
2.71k
        auto& op = operation.second;
2785
2786
2.71k
        if ( i > 0 ) {
2787
1.90k
            auto& prevModule = operations[i-1].first;
2788
1.90k
            auto& prevOp = operations[i].second;
2789
2790
1.90k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.07k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.07k
                if ( curModifier.size() == 0 ) {
2793
427k
                    for (size_t j = 0; j < 512; j++) {
2794
427k
                        curModifier.push_back(1);
2795
427k
                    }
2796
834
                } else {
2797
941
                    for (auto& c : curModifier) {
2798
941
                        c++;
2799
941
                    }
2800
241
                }
2801
1.07k
            }
2802
1.90k
        }
2803
2804
2.71k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.71k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.71k
        const auto& result = results.back();
2811
2812
2.71k
        if ( result.second != std::nullopt ) {
2813
1.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
1.12k
        }
2820
2821
2.71k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2.71k
        if ( options.disableTests == false ) {
2830
2.71k
            tests::test(op, result.second);
2831
2.71k
        }
2832
2833
2.71k
        postprocess(module, op, result);
2834
2.71k
    }
2835
2836
877
    if ( options.noCompare == false ) {
2837
811
        compare(operations, results, data, size);
2838
811
    }
2839
877
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
687
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
687
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
687
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.17k
    do {
2725
5.17k
        auto op = getOp(&parentDs, data, size);
2726
5.17k
        auto module = getModule(parentDs);
2727
5.17k
        if ( module == nullptr ) {
2728
2.19k
            continue;
2729
2.19k
        }
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
3
            break;
2736
3
        }
2737
5.16k
    } while ( parentDs.Get<bool>() == true );
2738
2739
687
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
677
#if 1
2745
677
    {
2746
677
        std::set<uint64_t> moduleIDs;
2747
1.17k
        for (const auto& m : modules ) {
2748
1.17k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.17k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.17k
            moduleIDs.insert(moduleID);
2756
1.17k
        }
2757
2758
677
        std::set<uint64_t> operationModuleIDs;
2759
2.71k
        for (const auto& op : operations) {
2760
2.71k
            operationModuleIDs.insert(op.first->ID);
2761
2.71k
        }
2762
2763
677
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
677
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
677
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
677
        for (const auto& id : addModuleIDs) {
2768
558
            operations.push_back({ modules.at(id), operations[0].second});
2769
558
        }
2770
677
    }
2771
677
#endif
2772
2773
677
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
677
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.94k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.27k
        auto& operation = operations[i];
2782
2783
3.27k
        auto& module = operation.first;
2784
3.27k
        auto& op = operation.second;
2785
2786
3.27k
        if ( i > 0 ) {
2787
2.68k
            auto& prevModule = operations[i-1].first;
2788
2.68k
            auto& prevOp = operations[i].second;
2789
2790
2.68k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2.06k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2.06k
                if ( curModifier.size() == 0 ) {
2793
968k
                    for (size_t j = 0; j < 512; j++) {
2794
966k
                        curModifier.push_back(1);
2795
966k
                    }
2796
1.88k
                } else {
2797
2.10k
                    for (auto& c : curModifier) {
2798
2.10k
                        c++;
2799
2.10k
                    }
2800
176
                }
2801
2.06k
            }
2802
2.68k
        }
2803
2804
3.27k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.27k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.27k
        const auto& result = results.back();
2811
2812
3.27k
        if ( result.second != std::nullopt ) {
2813
1.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
1.61k
        }
2820
2821
3.27k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.27k
        if ( options.disableTests == false ) {
2830
3.27k
            tests::test(op, result.second);
2831
3.27k
        }
2832
2833
3.27k
        postprocess(module, op, result);
2834
3.27k
    }
2835
2836
677
    if ( options.noCompare == false ) {
2837
588
        compare(operations, results, data, size);
2838
588
    }
2839
677
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
790
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
790
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
790
    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
1.98k
            continue;
2729
1.98k
        }
2730
2731
3.01k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.01k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
4.98k
    } while ( parentDs.Get<bool>() == true );
2738
2739
790
    if ( operations.empty() == true ) {
2740
3
        return;
2741
3
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
787
#if 1
2745
787
    {
2746
787
        std::set<uint64_t> moduleIDs;
2747
1.43k
        for (const auto& m : modules ) {
2748
1.43k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.43k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.43k
            moduleIDs.insert(moduleID);
2756
1.43k
        }
2757
2758
787
        std::set<uint64_t> operationModuleIDs;
2759
2.79k
        for (const auto& op : operations) {
2760
2.79k
            operationModuleIDs.insert(op.first->ID);
2761
2.79k
        }
2762
2763
787
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
787
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
787
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
787
        for (const auto& id : addModuleIDs) {
2768
691
            operations.push_back({ modules.at(id), operations[0].second});
2769
691
        }
2770
787
    }
2771
787
#endif
2772
2773
787
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
787
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
4.27k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.48k
        auto& operation = operations[i];
2782
2783
3.48k
        auto& module = operation.first;
2784
3.48k
        auto& op = operation.second;
2785
2786
3.48k
        if ( i > 0 ) {
2787
2.77k
            auto& prevModule = operations[i-1].first;
2788
2.77k
            auto& prevOp = operations[i].second;
2789
2790
2.77k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2.01k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2.01k
                if ( curModifier.size() == 0 ) {
2793
827k
                    for (size_t j = 0; j < 512; j++) {
2794
825k
                        curModifier.push_back(1);
2795
825k
                    }
2796
1.61k
                } else {
2797
849
                    for (auto& c : curModifier) {
2798
849
                        c++;
2799
849
                    }
2800
398
                }
2801
2.01k
            }
2802
2.77k
        }
2803
2804
3.48k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.48k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.48k
        const auto& result = results.back();
2811
2812
3.48k
        if ( result.second != std::nullopt ) {
2813
1.76k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.76k
        }
2820
2821
3.48k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.48k
        if ( options.disableTests == false ) {
2830
3.48k
            tests::test(op, result.second);
2831
3.48k
        }
2832
2833
3.48k
        postprocess(module, op, result);
2834
3.48k
    }
2835
2836
787
    if ( options.noCompare == false ) {
2837
716
        compare(operations, results, data, size);
2838
716
    }
2839
787
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.82k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.82k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.82k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
16.7k
    do {
2725
16.7k
        auto op = getOp(&parentDs, data, size);
2726
16.7k
        auto module = getModule(parentDs);
2727
16.7k
        if ( module == nullptr ) {
2728
3.80k
            continue;
2729
3.80k
        }
2730
2731
12.9k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
12.9k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
16.7k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.82k
    if ( operations.empty() == true ) {
2740
3
        return;
2741
3
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.81k
#if 1
2745
3.81k
    {
2746
3.81k
        std::set<uint64_t> moduleIDs;
2747
7.47k
        for (const auto& m : modules ) {
2748
7.47k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
7.47k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
7.47k
            moduleIDs.insert(moduleID);
2756
7.47k
        }
2757
2758
3.81k
        std::set<uint64_t> operationModuleIDs;
2759
12.7k
        for (const auto& op : operations) {
2760
12.7k
            operationModuleIDs.insert(op.first->ID);
2761
12.7k
        }
2762
2763
3.81k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.81k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.81k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.81k
        for (const auto& id : addModuleIDs) {
2768
3.69k
            operations.push_back({ modules.at(id), operations[0].second});
2769
3.69k
        }
2770
3.81k
    }
2771
3.81k
#endif
2772
2773
3.81k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.81k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
20.2k
    for (size_t i = 0; i < operations.size(); i++) {
2781
16.4k
        auto& operation = operations[i];
2782
2783
16.4k
        auto& module = operation.first;
2784
16.4k
        auto& op = operation.second;
2785
2786
16.4k
        if ( i > 0 ) {
2787
12.6k
            auto& prevModule = operations[i-1].first;
2788
12.6k
            auto& prevOp = operations[i].second;
2789
2790
12.6k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
8.86k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
8.86k
                if ( curModifier.size() == 0 ) {
2793
3.72M
                    for (size_t j = 0; j < 512; j++) {
2794
3.71M
                        curModifier.push_back(1);
2795
3.71M
                    }
2796
7.25k
                } else {
2797
20.6k
                    for (auto& c : curModifier) {
2798
20.6k
                        c++;
2799
20.6k
                    }
2800
1.61k
                }
2801
8.86k
            }
2802
12.6k
        }
2803
2804
16.4k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
16.4k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
16.4k
        const auto& result = results.back();
2811
2812
16.4k
        if ( result.second != std::nullopt ) {
2813
6.18k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
6.18k
        }
2820
2821
16.4k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
16.4k
        if ( options.disableTests == false ) {
2830
16.4k
            tests::test(op, result.second);
2831
16.4k
        }
2832
2833
16.4k
        postprocess(module, op, result);
2834
16.4k
    }
2835
2836
3.81k
    if ( options.noCompare == false ) {
2837
3.73k
        compare(operations, results, data, size);
2838
3.73k
    }
2839
3.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.43k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.43k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.43k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
12.4k
    do {
2725
12.4k
        auto op = getOp(&parentDs, data, size);
2726
12.4k
        auto module = getModule(parentDs);
2727
12.4k
        if ( module == nullptr ) {
2728
2.96k
            continue;
2729
2.96k
        }
2730
2731
9.52k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
9.52k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
12.4k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.43k
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.43k
#if 1
2745
3.43k
    {
2746
3.43k
        std::set<uint64_t> moduleIDs;
2747
6.66k
        for (const auto& m : modules ) {
2748
6.66k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
6.66k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
6.66k
            moduleIDs.insert(moduleID);
2756
6.66k
        }
2757
2758
3.43k
        std::set<uint64_t> operationModuleIDs;
2759
9.20k
        for (const auto& op : operations) {
2760
9.20k
            operationModuleIDs.insert(op.first->ID);
2761
9.20k
        }
2762
2763
3.43k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.43k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.43k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.43k
        for (const auto& id : addModuleIDs) {
2768
3.29k
            operations.push_back({ modules.at(id), operations[0].second});
2769
3.29k
        }
2770
3.43k
    }
2771
3.43k
#endif
2772
2773
3.43k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.43k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
15.9k
    for (size_t i = 0; i < operations.size(); i++) {
2781
12.5k
        auto& operation = operations[i];
2782
2783
12.5k
        auto& module = operation.first;
2784
12.5k
        auto& op = operation.second;
2785
2786
12.5k
        if ( i > 0 ) {
2787
9.17k
            auto& prevModule = operations[i-1].first;
2788
9.17k
            auto& prevOp = operations[i].second;
2789
2790
9.17k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
5.76k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
5.76k
                if ( curModifier.size() == 0 ) {
2793
2.48M
                    for (size_t j = 0; j < 512; j++) {
2794
2.47M
                        curModifier.push_back(1);
2795
2.47M
                    }
2796
4.83k
                } else {
2797
4.81k
                    for (auto& c : curModifier) {
2798
4.81k
                        c++;
2799
4.81k
                    }
2800
930
                }
2801
5.76k
            }
2802
9.17k
        }
2803
2804
12.5k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
12.5k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
12.5k
        const auto& result = results.back();
2811
2812
12.5k
        if ( result.second != std::nullopt ) {
2813
922
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
922
        }
2820
2821
12.5k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
12.5k
        if ( options.disableTests == false ) {
2830
12.5k
            tests::test(op, result.second);
2831
12.5k
        }
2832
2833
12.5k
        postprocess(module, op, result);
2834
12.5k
    }
2835
2836
3.43k
    if ( options.noCompare == false ) {
2837
3.33k
        compare(operations, results, data, size);
2838
3.33k
    }
2839
3.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
209
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
209
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
209
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.98k
    do {
2725
2.98k
        auto op = getOp(&parentDs, data, size);
2726
2.98k
        auto module = getModule(parentDs);
2727
2.98k
        if ( module == nullptr ) {
2728
2.11k
            continue;
2729
2.11k
        }
2730
2731
870
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
870
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
2.98k
    } while ( parentDs.Get<bool>() == true );
2738
2739
209
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
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
244
        for (const auto& m : modules ) {
2748
244
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
244
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
244
            moduleIDs.insert(moduleID);
2756
244
        }
2757
2758
198
        std::set<uint64_t> operationModuleIDs;
2759
717
        for (const auto& op : operations) {
2760
717
            operationModuleIDs.insert(op.first->ID);
2761
717
        }
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
103
            operations.push_back({ modules.at(id), operations[0].second});
2769
103
        }
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
1.01k
    for (size_t i = 0; i < operations.size(); i++) {
2781
820
        auto& operation = operations[i];
2782
2783
820
        auto& module = operation.first;
2784
820
        auto& op = operation.second;
2785
2786
820
        if ( i > 0 ) {
2787
698
            auto& prevModule = operations[i-1].first;
2788
698
            auto& prevOp = operations[i].second;
2789
2790
698
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
562
                auto& curModifier = op.modifier.GetVectorPtr();
2792
562
                if ( curModifier.size() == 0 ) {
2793
220k
                    for (size_t j = 0; j < 512; j++) {
2794
220k
                        curModifier.push_back(1);
2795
220k
                    }
2796
430
                } else {
2797
675
                    for (auto& c : curModifier) {
2798
675
                        c++;
2799
675
                    }
2800
132
                }
2801
562
            }
2802
698
        }
2803
2804
820
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
820
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
820
        const auto& result = results.back();
2811
2812
820
        if ( result.second != std::nullopt ) {
2813
210
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
210
        }
2820
2821
820
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
820
        if ( options.disableTests == false ) {
2830
820
            tests::test(op, result.second);
2831
820
        }
2832
2833
820
        postprocess(module, op, result);
2834
820
    }
2835
2836
198
    if ( options.noCompare == false ) {
2837
122
        compare(operations, results, data, size);
2838
122
    }
2839
198
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.30k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.30k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.30k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
6.92k
    do {
2725
6.92k
        auto op = getOp(&parentDs, data, size);
2726
6.92k
        auto module = getModule(parentDs);
2727
6.92k
        if ( module == nullptr ) {
2728
2.26k
            continue;
2729
2.26k
        }
2730
2731
4.66k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.66k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
6.92k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.30k
    if ( operations.empty() == true ) {
2740
25
        return;
2741
25
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.28k
#if 1
2745
2.28k
    {
2746
2.28k
        std::set<uint64_t> moduleIDs;
2747
4.26k
        for (const auto& m : modules ) {
2748
4.26k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4.26k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4.26k
            moduleIDs.insert(moduleID);
2756
4.26k
        }
2757
2758
2.28k
        std::set<uint64_t> operationModuleIDs;
2759
4.37k
        for (const auto& op : operations) {
2760
4.37k
            operationModuleIDs.insert(op.first->ID);
2761
4.37k
        }
2762
2763
2.28k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.28k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.28k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.28k
        for (const auto& id : addModuleIDs) {
2768
2.10k
            operations.push_back({ modules.at(id), operations[0].second});
2769
2.10k
        }
2770
2.28k
    }
2771
2.28k
#endif
2772
2773
2.28k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.28k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
8.76k
    for (size_t i = 0; i < operations.size(); i++) {
2781
6.48k
        auto& operation = operations[i];
2782
2783
6.48k
        auto& module = operation.first;
2784
6.48k
        auto& op = operation.second;
2785
2786
6.48k
        if ( i > 0 ) {
2787
4.35k
            auto& prevModule = operations[i-1].first;
2788
4.35k
            auto& prevOp = operations[i].second;
2789
2790
4.35k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2.18k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2.18k
                if ( curModifier.size() == 0 ) {
2793
983k
                    for (size_t j = 0; j < 512; j++) {
2794
982k
                        curModifier.push_back(1);
2795
982k
                    }
2796
1.91k
                } else {
2797
2.93k
                    for (auto& c : curModifier) {
2798
2.93k
                        c++;
2799
2.93k
                    }
2800
263
                }
2801
2.18k
            }
2802
4.35k
        }
2803
2804
6.48k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
6.48k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
6.48k
        const auto& result = results.back();
2811
2812
6.48k
        if ( result.second != std::nullopt ) {
2813
2.84k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.84k
        }
2820
2821
6.48k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
6.48k
        if ( options.disableTests == false ) {
2830
6.48k
            tests::test(op, result.second);
2831
6.48k
        }
2832
2833
6.48k
        postprocess(module, op, result);
2834
6.48k
    }
2835
2836
2.28k
    if ( options.noCompare == false ) {
2837
2.13k
        compare(operations, results, data, size);
2838
2.13k
    }
2839
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
209
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
209
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
209
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.71k
    do {
2725
2.71k
        auto op = getOp(&parentDs, data, size);
2726
2.71k
        auto module = getModule(parentDs);
2727
2.71k
        if ( module == nullptr ) {
2728
1.86k
            continue;
2729
1.86k
        }
2730
2731
853
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
853
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
2.71k
    } while ( parentDs.Get<bool>() == true );
2738
2739
209
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
199
#if 1
2745
199
    {
2746
199
        std::set<uint64_t> moduleIDs;
2747
246
        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
199
        std::set<uint64_t> operationModuleIDs;
2759
605
        for (const auto& op : operations) {
2760
605
            operationModuleIDs.insert(op.first->ID);
2761
605
        }
2762
2763
199
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
199
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
199
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
199
        for (const auto& id : addModuleIDs) {
2768
96
            operations.push_back({ modules.at(id), operations[0].second});
2769
96
        }
2770
199
    }
2771
199
#endif
2772
2773
199
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
199
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
900
    for (size_t i = 0; i < operations.size(); i++) {
2781
701
        auto& operation = operations[i];
2782
2783
701
        auto& module = operation.first;
2784
701
        auto& op = operation.second;
2785
2786
701
        if ( i > 0 ) {
2787
578
            auto& prevModule = operations[i-1].first;
2788
578
            auto& prevOp = operations[i].second;
2789
2790
578
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
406
                auto& curModifier = op.modifier.GetVectorPtr();
2792
406
                if ( curModifier.size() == 0 ) {
2793
144k
                    for (size_t j = 0; j < 512; j++) {
2794
143k
                        curModifier.push_back(1);
2795
143k
                    }
2796
281
                } else {
2797
414
                    for (auto& c : curModifier) {
2798
414
                        c++;
2799
414
                    }
2800
125
                }
2801
406
            }
2802
578
        }
2803
2804
701
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
701
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
701
        const auto& result = results.back();
2811
2812
701
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
701
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
701
        if ( options.disableTests == false ) {
2830
701
            tests::test(op, result.second);
2831
701
        }
2832
2833
701
        postprocess(module, op, result);
2834
701
    }
2835
2836
199
    if ( options.noCompare == false ) {
2837
123
        compare(operations, results, data, size);
2838
123
    }
2839
199
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
140
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
140
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
140
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.25k
    do {
2725
2.25k
        auto op = getOp(&parentDs, data, size);
2726
2.25k
        auto module = getModule(parentDs);
2727
2.25k
        if ( module == nullptr ) {
2728
1.63k
            continue;
2729
1.63k
        }
2730
2731
626
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
626
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
2.25k
    } while ( parentDs.Get<bool>() == true );
2738
2739
140
    if ( operations.empty() == true ) {
2740
3
        return;
2741
3
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
137
#if 1
2745
137
    {
2746
137
        std::set<uint64_t> moduleIDs;
2747
137
        for (const auto& m : modules ) {
2748
118
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
118
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
118
            moduleIDs.insert(moduleID);
2756
118
        }
2757
2758
137
        std::set<uint64_t> operationModuleIDs;
2759
426
        for (const auto& op : operations) {
2760
426
            operationModuleIDs.insert(op.first->ID);
2761
426
        }
2762
2763
137
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
137
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
137
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
137
        for (const auto& id : addModuleIDs) {
2768
37
            operations.push_back({ modules.at(id), operations[0].second});
2769
37
        }
2770
137
    }
2771
137
#endif
2772
2773
137
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
137
    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
463
        auto& operation = operations[i];
2782
2783
463
        auto& module = operation.first;
2784
463
        auto& op = operation.second;
2785
2786
463
        if ( i > 0 ) {
2787
404
            auto& prevModule = operations[i-1].first;
2788
404
            auto& prevOp = operations[i].second;
2789
2790
404
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
332
                auto& curModifier = op.modifier.GetVectorPtr();
2792
332
                if ( curModifier.size() == 0 ) {
2793
123k
                    for (size_t j = 0; j < 512; j++) {
2794
122k
                        curModifier.push_back(1);
2795
122k
                    }
2796
240
                } else {
2797
346
                    for (auto& c : curModifier) {
2798
346
                        c++;
2799
346
                    }
2800
92
                }
2801
332
            }
2802
404
        }
2803
2804
463
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
463
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
463
        const auto& result = results.back();
2811
2812
463
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
463
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
463
        if ( options.disableTests == false ) {
2830
463
            tests::test(op, result.second);
2831
463
        }
2832
2833
463
        postprocess(module, op, result);
2834
463
    }
2835
2836
137
    if ( options.noCompare == false ) {
2837
59
        compare(operations, results, data, size);
2838
59
    }
2839
137
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
150
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
150
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
150
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.36k
    do {
2725
2.36k
        auto op = getOp(&parentDs, data, size);
2726
2.36k
        auto module = getModule(parentDs);
2727
2.36k
        if ( module == nullptr ) {
2728
1.76k
            continue;
2729
1.76k
        }
2730
2731
600
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
600
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
2.36k
    } while ( parentDs.Get<bool>() == true );
2738
2739
150
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
139
#if 1
2745
139
    {
2746
139
        std::set<uint64_t> moduleIDs;
2747
139
        for (const auto& m : modules ) {
2748
116
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
116
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
116
            moduleIDs.insert(moduleID);
2756
116
        }
2757
2758
139
        std::set<uint64_t> operationModuleIDs;
2759
359
        for (const auto& op : operations) {
2760
359
            operationModuleIDs.insert(op.first->ID);
2761
359
        }
2762
2763
139
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
139
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
139
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
139
        for (const auto& id : addModuleIDs) {
2768
40
            operations.push_back({ modules.at(id), operations[0].second});
2769
40
        }
2770
139
    }
2771
139
#endif
2772
2773
139
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
139
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
538
    for (size_t i = 0; i < operations.size(); i++) {
2781
399
        auto& operation = operations[i];
2782
2783
399
        auto& module = operation.first;
2784
399
        auto& op = operation.second;
2785
2786
399
        if ( i > 0 ) {
2787
341
            auto& prevModule = operations[i-1].first;
2788
341
            auto& prevOp = operations[i].second;
2789
2790
341
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
246
                auto& curModifier = op.modifier.GetVectorPtr();
2792
246
                if ( curModifier.size() == 0 ) {
2793
54.8k
                    for (size_t j = 0; j < 512; j++) {
2794
54.7k
                        curModifier.push_back(1);
2795
54.7k
                    }
2796
139
                } else {
2797
677
                    for (auto& c : curModifier) {
2798
677
                        c++;
2799
677
                    }
2800
139
                }
2801
246
            }
2802
341
        }
2803
2804
399
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
399
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
399
        const auto& result = results.back();
2811
2812
399
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
399
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
399
        if ( options.disableTests == false ) {
2830
399
            tests::test(op, result.second);
2831
399
        }
2832
2833
399
        postprocess(module, op, result);
2834
399
    }
2835
2836
139
    if ( options.noCompare == false ) {
2837
58
        compare(operations, results, data, size);
2838
58
    }
2839
139
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
749
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
749
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
749
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.86k
    do {
2725
3.86k
        auto op = getOp(&parentDs, data, size);
2726
3.86k
        auto module = getModule(parentDs);
2727
3.86k
        if ( module == nullptr ) {
2728
2.04k
            continue;
2729
2.04k
        }
2730
2731
1.82k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.82k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
3.86k
    } while ( parentDs.Get<bool>() == true );
2738
2739
749
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
745
#if 1
2745
745
    {
2746
745
        std::set<uint64_t> moduleIDs;
2747
1.33k
        for (const auto& m : modules ) {
2748
1.33k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.33k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.33k
            moduleIDs.insert(moduleID);
2756
1.33k
        }
2757
2758
745
        std::set<uint64_t> operationModuleIDs;
2759
1.62k
        for (const auto& op : operations) {
2760
1.62k
            operationModuleIDs.insert(op.first->ID);
2761
1.62k
        }
2762
2763
745
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
745
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
745
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
745
        for (const auto& id : addModuleIDs) {
2768
646
            operations.push_back({ modules.at(id), operations[0].second});
2769
646
        }
2770
745
    }
2771
745
#endif
2772
2773
745
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
745
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.01k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.26k
        auto& operation = operations[i];
2782
2783
2.26k
        auto& module = operation.first;
2784
2.26k
        auto& op = operation.second;
2785
2786
2.26k
        if ( i > 0 ) {
2787
1.59k
            auto& prevModule = operations[i-1].first;
2788
1.59k
            auto& prevOp = operations[i].second;
2789
2790
1.59k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
874
                auto& curModifier = op.modifier.GetVectorPtr();
2792
874
                if ( curModifier.size() == 0 ) {
2793
366k
                    for (size_t j = 0; j < 512; j++) {
2794
365k
                        curModifier.push_back(1);
2795
365k
                    }
2796
714
                } else {
2797
15.0k
                    for (auto& c : curModifier) {
2798
15.0k
                        c++;
2799
15.0k
                    }
2800
160
                }
2801
874
            }
2802
1.59k
        }
2803
2804
2.26k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.26k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.26k
        const auto& result = results.back();
2811
2812
2.26k
        if ( result.second != std::nullopt ) {
2813
778
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
778
        }
2820
2821
2.26k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.26k
        if ( options.disableTests == false ) {
2830
2.26k
            tests::test(op, result.second);
2831
2.26k
        }
2832
2833
2.26k
        postprocess(module, op, result);
2834
2.26k
    }
2835
2836
745
    if ( options.noCompare == false ) {
2837
668
        compare(operations, results, data, size);
2838
668
    }
2839
745
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
306
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
306
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
306
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.52k
    do {
2725
2.52k
        auto op = getOp(&parentDs, data, size);
2726
2.52k
        auto module = getModule(parentDs);
2727
2.52k
        if ( module == nullptr ) {
2728
2.13k
            continue;
2729
2.13k
        }
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
40
            break;
2736
40
        }
2737
2.48k
    } while ( parentDs.Get<bool>() == true );
2738
2739
306
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
292
#if 1
2745
292
    {
2746
292
        std::set<uint64_t> moduleIDs;
2747
394
        for (const auto& m : modules ) {
2748
394
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
394
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
394
            moduleIDs.insert(moduleID);
2756
394
        }
2757
2758
292
        std::set<uint64_t> operationModuleIDs;
2759
302
        for (const auto& op : operations) {
2760
302
            operationModuleIDs.insert(op.first->ID);
2761
302
        }
2762
2763
292
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
292
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
292
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
292
        for (const auto& id : addModuleIDs) {
2768
192
            operations.push_back({ modules.at(id), operations[0].second});
2769
192
        }
2770
292
    }
2771
292
#endif
2772
2773
292
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
292
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
786
    for (size_t i = 0; i < operations.size(); i++) {
2781
494
        auto& operation = operations[i];
2782
2783
494
        auto& module = operation.first;
2784
494
        auto& op = operation.second;
2785
2786
494
        if ( i > 0 ) {
2787
297
            auto& prevModule = operations[i-1].first;
2788
297
            auto& prevOp = operations[i].second;
2789
2790
297
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
99
                auto& curModifier = op.modifier.GetVectorPtr();
2792
99
                if ( curModifier.size() == 0 ) {
2793
43.0k
                    for (size_t j = 0; j < 512; j++) {
2794
43.0k
                        curModifier.push_back(1);
2795
43.0k
                    }
2796
84
                } else {
2797
328
                    for (auto& c : curModifier) {
2798
328
                        c++;
2799
328
                    }
2800
15
                }
2801
99
            }
2802
297
        }
2803
2804
494
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
494
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
494
        const auto& result = results.back();
2811
2812
494
        if ( result.second != std::nullopt ) {
2813
216
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
216
        }
2820
2821
494
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
494
        if ( options.disableTests == false ) {
2830
494
            tests::test(op, result.second);
2831
494
        }
2832
2833
494
        postprocess(module, op, result);
2834
494
    }
2835
2836
292
    if ( options.noCompare == false ) {
2837
197
        compare(operations, results, data, size);
2838
197
    }
2839
292
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
141
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
141
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
141
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.14k
    do {
2725
3.14k
        auto op = getOp(&parentDs, data, size);
2726
3.14k
        auto module = getModule(parentDs);
2727
3.14k
        if ( module == nullptr ) {
2728
2.48k
            continue;
2729
2.48k
        }
2730
2731
658
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
658
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
3.14k
    } while ( parentDs.Get<bool>() == true );
2738
2739
141
    if ( operations.empty() == true ) {
2740
1
        return;
2741
1
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
140
#if 1
2745
140
    {
2746
140
        std::set<uint64_t> moduleIDs;
2747
140
        for (const auto& m : modules ) {
2748
122
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
122
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
122
            moduleIDs.insert(moduleID);
2756
122
        }
2757
2758
140
        std::set<uint64_t> operationModuleIDs;
2759
387
        for (const auto& op : operations) {
2760
387
            operationModuleIDs.insert(op.first->ID);
2761
387
        }
2762
2763
140
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
140
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
140
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
140
        for (const auto& id : addModuleIDs) {
2768
39
            operations.push_back({ modules.at(id), operations[0].second});
2769
39
        }
2770
140
    }
2771
140
#endif
2772
2773
140
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
140
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
566
    for (size_t i = 0; i < operations.size(); i++) {
2781
426
        auto& operation = operations[i];
2782
2783
426
        auto& module = operation.first;
2784
426
        auto& op = operation.second;
2785
2786
426
        if ( i > 0 ) {
2787
365
            auto& prevModule = operations[i-1].first;
2788
365
            auto& prevOp = operations[i].second;
2789
2790
365
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
268
                auto& curModifier = op.modifier.GetVectorPtr();
2792
268
                if ( curModifier.size() == 0 ) {
2793
107k
                    for (size_t j = 0; j < 512; j++) {
2794
107k
                        curModifier.push_back(1);
2795
107k
                    }
2796
209
                } else {
2797
309
                    for (auto& c : curModifier) {
2798
309
                        c++;
2799
309
                    }
2800
59
                }
2801
268
            }
2802
365
        }
2803
2804
426
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
426
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
426
        const auto& result = results.back();
2811
2812
426
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
426
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
426
        if ( options.disableTests == false ) {
2830
426
            tests::test(op, result.second);
2831
426
        }
2832
2833
426
        postprocess(module, op, result);
2834
426
    }
2835
2836
140
    if ( options.noCompare == false ) {
2837
61
        compare(operations, results, data, size);
2838
61
    }
2839
140
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
135
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
135
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
135
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.14k
    do {
2725
2.14k
        auto op = getOp(&parentDs, data, size);
2726
2.14k
        auto module = getModule(parentDs);
2727
2.14k
        if ( module == nullptr ) {
2728
1.49k
            continue;
2729
1.49k
        }
2730
2731
652
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
652
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
2.14k
    } while ( parentDs.Get<bool>() == true );
2738
2739
135
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
130
#if 1
2745
130
    {
2746
130
        std::set<uint64_t> moduleIDs;
2747
130
        for (const auto& m : modules ) {
2748
110
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
110
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
110
            moduleIDs.insert(moduleID);
2756
110
        }
2757
2758
130
        std::set<uint64_t> operationModuleIDs;
2759
383
        for (const auto& op : operations) {
2760
383
            operationModuleIDs.insert(op.first->ID);
2761
383
        }
2762
2763
130
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
130
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
130
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
130
        for (const auto& id : addModuleIDs) {
2768
37
            operations.push_back({ modules.at(id), operations[0].second});
2769
37
        }
2770
130
    }
2771
130
#endif
2772
2773
130
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
130
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
550
    for (size_t i = 0; i < operations.size(); i++) {
2781
420
        auto& operation = operations[i];
2782
2783
420
        auto& module = operation.first;
2784
420
        auto& op = operation.second;
2785
2786
420
        if ( i > 0 ) {
2787
365
            auto& prevModule = operations[i-1].first;
2788
365
            auto& prevOp = operations[i].second;
2789
2790
365
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
297
                auto& curModifier = op.modifier.GetVectorPtr();
2792
297
                if ( curModifier.size() == 0 ) {
2793
110k
                    for (size_t j = 0; j < 512; j++) {
2794
110k
                        curModifier.push_back(1);
2795
110k
                    }
2796
215
                } else {
2797
376
                    for (auto& c : curModifier) {
2798
376
                        c++;
2799
376
                    }
2800
82
                }
2801
297
            }
2802
365
        }
2803
2804
420
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
420
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
420
        const auto& result = results.back();
2811
2812
420
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
420
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
420
        if ( options.disableTests == false ) {
2830
420
            tests::test(op, result.second);
2831
420
        }
2832
2833
420
        postprocess(module, op, result);
2834
420
    }
2835
2836
130
    if ( options.noCompare == false ) {
2837
55
        compare(operations, results, data, size);
2838
55
    }
2839
130
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
162
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
162
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
162
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.10k
    do {
2725
2.10k
        auto op = getOp(&parentDs, data, size);
2726
2.10k
        auto module = getModule(parentDs);
2727
2.10k
        if ( module == nullptr ) {
2728
1.94k
            continue;
2729
1.94k
        }
2730
2731
156
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
156
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
20
            break;
2736
20
        }
2737
2.08k
    } while ( parentDs.Get<bool>() == true );
2738
2739
162
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
147
#if 1
2745
147
    {
2746
147
        std::set<uint64_t> moduleIDs;
2747
176
        for (const auto& m : modules ) {
2748
176
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
176
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
176
            moduleIDs.insert(moduleID);
2756
176
        }
2757
2758
147
        std::set<uint64_t> operationModuleIDs;
2759
147
        for (const auto& op : operations) {
2760
108
            operationModuleIDs.insert(op.first->ID);
2761
108
        }
2762
2763
147
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
147
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
147
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
147
        for (const auto& id : addModuleIDs) {
2768
86
            operations.push_back({ modules.at(id), operations[0].second});
2769
86
        }
2770
147
    }
2771
147
#endif
2772
2773
147
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
147
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
341
    for (size_t i = 0; i < operations.size(); i++) {
2781
194
        auto& operation = operations[i];
2782
2783
194
        auto& module = operation.first;
2784
194
        auto& op = operation.second;
2785
2786
194
        if ( i > 0 ) {
2787
106
            auto& prevModule = operations[i-1].first;
2788
106
            auto& prevOp = operations[i].second;
2789
2790
106
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
18
                auto& curModifier = op.modifier.GetVectorPtr();
2792
18
                if ( curModifier.size() == 0 ) {
2793
2.05k
                    for (size_t j = 0; j < 512; j++) {
2794
2.04k
                        curModifier.push_back(1);
2795
2.04k
                    }
2796
14
                } else {
2797
382
                    for (auto& c : curModifier) {
2798
382
                        c++;
2799
382
                    }
2800
14
                }
2801
18
            }
2802
106
        }
2803
2804
194
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
194
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
194
        const auto& result = results.back();
2811
2812
194
        if ( result.second != std::nullopt ) {
2813
31
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
31
        }
2820
2821
194
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
194
        if ( options.disableTests == false ) {
2830
194
            tests::test(op, result.second);
2831
194
        }
2832
2833
194
        postprocess(module, op, result);
2834
194
    }
2835
2836
147
    if ( options.noCompare == false ) {
2837
88
        compare(operations, results, data, size);
2838
88
    }
2839
147
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
488
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
488
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
488
    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
2.12k
            continue;
2729
2.12k
        }
2730
2731
1.76k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.76k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
3.88k
    } while ( parentDs.Get<bool>() == true );
2738
2739
488
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
480
#if 1
2745
480
    {
2746
480
        std::set<uint64_t> moduleIDs;
2747
792
        for (const auto& m : modules ) {
2748
792
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
792
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
792
            moduleIDs.insert(moduleID);
2756
792
        }
2757
2758
480
        std::set<uint64_t> operationModuleIDs;
2759
1.45k
        for (const auto& op : operations) {
2760
1.45k
            operationModuleIDs.insert(op.first->ID);
2761
1.45k
        }
2762
2763
480
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
480
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
480
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
480
        for (const auto& id : addModuleIDs) {
2768
376
            operations.push_back({ modules.at(id), operations[0].second});
2769
376
        }
2770
480
    }
2771
480
#endif
2772
2773
480
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
480
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.30k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.82k
        auto& operation = operations[i];
2782
2783
1.82k
        auto& module = operation.first;
2784
1.82k
        auto& op = operation.second;
2785
2786
1.82k
        if ( i > 0 ) {
2787
1.43k
            auto& prevModule = operations[i-1].first;
2788
1.43k
            auto& prevOp = operations[i].second;
2789
2790
1.43k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.00k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.00k
                if ( curModifier.size() == 0 ) {
2793
416k
                    for (size_t j = 0; j < 512; j++) {
2794
415k
                        curModifier.push_back(1);
2795
415k
                    }
2796
811
                } else {
2797
3.98k
                    for (auto& c : curModifier) {
2798
3.98k
                        c++;
2799
3.98k
                    }
2800
195
                }
2801
1.00k
            }
2802
1.43k
        }
2803
2804
1.82k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.82k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.82k
        const auto& result = results.back();
2811
2812
1.82k
        if ( result.second != std::nullopt ) {
2813
893
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
893
        }
2820
2821
1.82k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.82k
        if ( options.disableTests == false ) {
2830
1.82k
            tests::test(op, result.second);
2831
1.82k
        }
2832
2833
1.82k
        postprocess(module, op, result);
2834
1.82k
    }
2835
2836
480
    if ( options.noCompare == false ) {
2837
396
        compare(operations, results, data, size);
2838
396
    }
2839
480
}
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
145
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
145
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
145
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.75k
    do {
2725
2.75k
        auto op = getOp(&parentDs, data, size);
2726
2.75k
        auto module = getModule(parentDs);
2727
2.75k
        if ( module == nullptr ) {
2728
2.23k
            continue;
2729
2.23k
        }
2730
2731
517
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
517
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
2.75k
    } while ( parentDs.Get<bool>() == true );
2738
2739
145
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
138
#if 1
2745
138
    {
2746
138
        std::set<uint64_t> moduleIDs;
2747
138
        for (const auto& m : modules ) {
2748
114
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
114
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
114
            moduleIDs.insert(moduleID);
2756
114
        }
2757
2758
138
        std::set<uint64_t> operationModuleIDs;
2759
333
        for (const auto& op : operations) {
2760
333
            operationModuleIDs.insert(op.first->ID);
2761
333
        }
2762
2763
138
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
138
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
138
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
138
        for (const auto& id : addModuleIDs) {
2768
38
            operations.push_back({ modules.at(id), operations[0].second});
2769
38
        }
2770
138
    }
2771
138
#endif
2772
2773
138
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
138
    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
371
        auto& operation = operations[i];
2782
2783
371
        auto& module = operation.first;
2784
371
        auto& op = operation.second;
2785
2786
371
        if ( i > 0 ) {
2787
314
            auto& prevModule = operations[i-1].first;
2788
314
            auto& prevOp = operations[i].second;
2789
2790
314
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
239
                auto& curModifier = op.modifier.GetVectorPtr();
2792
239
                if ( curModifier.size() == 0 ) {
2793
92.8k
                    for (size_t j = 0; j < 512; j++) {
2794
92.6k
                        curModifier.push_back(1);
2795
92.6k
                    }
2796
181
                } else {
2797
383
                    for (auto& c : curModifier) {
2798
383
                        c++;
2799
383
                    }
2800
58
                }
2801
239
            }
2802
314
        }
2803
2804
371
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
371
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
371
        const auto& result = results.back();
2811
2812
371
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
371
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
371
        if ( options.disableTests == false ) {
2830
371
            tests::test(op, result.second);
2831
371
        }
2832
2833
371
        postprocess(module, op, result);
2834
371
    }
2835
2836
138
    if ( options.noCompare == false ) {
2837
57
        compare(operations, results, data, size);
2838
57
    }
2839
138
}
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
155
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
155
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
155
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.69k
    do {
2725
2.69k
        auto op = getOp(&parentDs, data, size);
2726
2.69k
        auto module = getModule(parentDs);
2727
2.69k
        if ( module == nullptr ) {
2728
1.97k
            continue;
2729
1.97k
        }
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
1
            break;
2736
1
        }
2737
2.69k
    } while ( parentDs.Get<bool>() == true );
2738
2739
155
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
146
#if 1
2745
146
    {
2746
146
        std::set<uint64_t> moduleIDs;
2747
146
        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
146
        std::set<uint64_t> operationModuleIDs;
2759
469
        for (const auto& op : operations) {
2760
469
            operationModuleIDs.insert(op.first->ID);
2761
469
        }
2762
2763
146
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
146
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
146
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
146
        for (const auto& id : addModuleIDs) {
2768
47
            operations.push_back({ modules.at(id), operations[0].second});
2769
47
        }
2770
146
    }
2771
146
#endif
2772
2773
146
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
146
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
662
    for (size_t i = 0; i < operations.size(); i++) {
2781
516
        auto& operation = operations[i];
2782
2783
516
        auto& module = operation.first;
2784
516
        auto& op = operation.second;
2785
2786
516
        if ( i > 0 ) {
2787
450
            auto& prevModule = operations[i-1].first;
2788
450
            auto& prevOp = operations[i].second;
2789
2790
450
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
355
                auto& curModifier = op.modifier.GetVectorPtr();
2792
355
                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
332
                    for (auto& c : curModifier) {
2798
332
                        c++;
2799
332
                    }
2800
89
                }
2801
355
            }
2802
450
        }
2803
2804
516
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
516
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
516
        const auto& result = results.back();
2811
2812
516
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
516
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
516
        if ( options.disableTests == false ) {
2830
516
            tests::test(op, result.second);
2831
516
        }
2832
2833
516
        postprocess(module, op, result);
2834
516
    }
2835
2836
146
    if ( options.noCompare == false ) {
2837
66
        compare(operations, results, data, size);
2838
66
    }
2839
146
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
899
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
899
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
899
    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
1.61k
            continue;
2729
1.61k
        }
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
16
            break;
2736
16
        }
2737
2.74k
    } while ( parentDs.Get<bool>() == true );
2738
2739
899
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
891
#if 1
2745
891
    {
2746
891
        std::set<uint64_t> moduleIDs;
2747
1.62k
        for (const auto& m : modules ) {
2748
1.62k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.62k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.62k
            moduleIDs.insert(moduleID);
2756
1.62k
        }
2757
2758
891
        std::set<uint64_t> operationModuleIDs;
2759
1.07k
        for (const auto& op : operations) {
2760
1.07k
            operationModuleIDs.insert(op.first->ID);
2761
1.07k
        }
2762
2763
891
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
891
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
891
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
891
        for (const auto& id : addModuleIDs) {
2768
798
            operations.push_back({ modules.at(id), operations[0].second});
2769
798
        }
2770
891
    }
2771
891
#endif
2772
2773
891
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
891
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.76k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.87k
        auto& operation = operations[i];
2782
2783
1.87k
        auto& module = operation.first;
2784
1.87k
        auto& op = operation.second;
2785
2786
1.87k
        if ( i > 0 ) {
2787
1.06k
            auto& prevModule = operations[i-1].first;
2788
1.06k
            auto& prevOp = operations[i].second;
2789
2790
1.06k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
242
                auto& curModifier = op.modifier.GetVectorPtr();
2792
242
                if ( curModifier.size() == 0 ) {
2793
87.7k
                    for (size_t j = 0; j < 512; j++) {
2794
87.5k
                        curModifier.push_back(1);
2795
87.5k
                    }
2796
171
                } else {
2797
6.13k
                    for (auto& c : curModifier) {
2798
6.13k
                        c++;
2799
6.13k
                    }
2800
71
                }
2801
242
            }
2802
1.06k
        }
2803
2804
1.87k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.87k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.87k
        const auto& result = results.back();
2811
2812
1.87k
        if ( result.second != std::nullopt ) {
2813
716
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
716
        }
2820
2821
1.87k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.87k
        if ( options.disableTests == false ) {
2830
1.87k
            tests::test(op, result.second);
2831
1.87k
        }
2832
2833
1.87k
        postprocess(module, op, result);
2834
1.87k
    }
2835
2836
891
    if ( options.noCompare == false ) {
2837
811
        compare(operations, results, data, size);
2838
811
    }
2839
891
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
706
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
706
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
706
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.48k
    do {
2725
2.48k
        auto op = getOp(&parentDs, data, size);
2726
2.48k
        auto module = getModule(parentDs);
2727
2.48k
        if ( module == nullptr ) {
2728
1.56k
            continue;
2729
1.56k
        }
2730
2731
919
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
919
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
18
            break;
2736
18
        }
2737
2.46k
    } while ( parentDs.Get<bool>() == true );
2738
2739
706
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
699
#if 1
2745
699
    {
2746
699
        std::set<uint64_t> moduleIDs;
2747
1.22k
        for (const auto& m : modules ) {
2748
1.22k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.22k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.22k
            moduleIDs.insert(moduleID);
2756
1.22k
        }
2757
2758
699
        std::set<uint64_t> operationModuleIDs;
2759
828
        for (const auto& op : operations) {
2760
828
            operationModuleIDs.insert(op.first->ID);
2761
828
        }
2762
2763
699
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
699
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
699
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
699
        for (const auto& id : addModuleIDs) {
2768
599
            operations.push_back({ modules.at(id), operations[0].second});
2769
599
        }
2770
699
    }
2771
699
#endif
2772
2773
699
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
699
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.12k
    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
816
            auto& prevModule = operations[i-1].first;
2788
816
            auto& prevOp = operations[i].second;
2789
2790
816
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
199
                auto& curModifier = op.modifier.GetVectorPtr();
2792
199
                if ( curModifier.size() == 0 ) {
2793
74.8k
                    for (size_t j = 0; j < 512; j++) {
2794
74.7k
                        curModifier.push_back(1);
2795
74.7k
                    }
2796
146
                } else {
2797
270
                    for (auto& c : curModifier) {
2798
270
                        c++;
2799
270
                    }
2800
53
                }
2801
199
            }
2802
816
        }
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
1.15k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.15k
        }
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
699
    if ( options.noCompare == false ) {
2837
611
        compare(operations, results, data, size);
2838
611
    }
2839
699
}
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.13k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.13k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.13k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.27k
    do {
2725
2.27k
        auto op = getOp(&parentDs, data, size);
2726
2.27k
        auto module = getModule(parentDs);
2727
2.27k
        if ( module == nullptr ) {
2728
1.02k
            continue;
2729
1.02k
        }
2730
2731
1.25k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.25k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
2.26k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.13k
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.12k
#if 1
2745
1.12k
    {
2746
1.12k
        std::set<uint64_t> moduleIDs;
2747
1.98k
        for (const auto& m : modules ) {
2748
1.98k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.98k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.98k
            moduleIDs.insert(moduleID);
2756
1.98k
        }
2757
2758
1.12k
        std::set<uint64_t> operationModuleIDs;
2759
1.18k
        for (const auto& op : operations) {
2760
1.18k
            operationModuleIDs.insert(op.first->ID);
2761
1.18k
        }
2762
2763
1.12k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.12k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.12k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.12k
        for (const auto& id : addModuleIDs) {
2768
978
            operations.push_back({ modules.at(id), operations[0].second});
2769
978
        }
2770
1.12k
    }
2771
1.12k
#endif
2772
2773
1.12k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.12k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.28k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.16k
        auto& operation = operations[i];
2782
2783
2.16k
        auto& module = operation.first;
2784
2.16k
        auto& op = operation.second;
2785
2786
2.16k
        if ( i > 0 ) {
2787
1.17k
            auto& prevModule = operations[i-1].first;
2788
1.17k
            auto& prevOp = operations[i].second;
2789
2790
1.17k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
171
                auto& curModifier = op.modifier.GetVectorPtr();
2792
171
                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
19.2k
                    for (auto& c : curModifier) {
2798
19.2k
                        c++;
2799
19.2k
                    }
2800
42
                }
2801
171
            }
2802
1.17k
        }
2803
2804
2.16k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.16k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.16k
        const auto& result = results.back();
2811
2812
2.16k
        if ( result.second != std::nullopt ) {
2813
503
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
503
        }
2820
2821
2.16k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.16k
        if ( options.disableTests == false ) {
2830
2.16k
            tests::test(op, result.second);
2831
2.16k
        }
2832
2833
2.16k
        postprocess(module, op, result);
2834
2.16k
    }
2835
2836
1.12k
    if ( options.noCompare == false ) {
2837
990
        compare(operations, results, data, size);
2838
990
    }
2839
1.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
110
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
110
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
110
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.39k
    do {
2725
2.39k
        auto op = getOp(&parentDs, data, size);
2726
2.39k
        auto module = getModule(parentDs);
2727
2.39k
        if ( module == nullptr ) {
2728
2.18k
            continue;
2729
2.18k
        }
2730
2731
213
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
213
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.39k
    } while ( parentDs.Get<bool>() == true );
2738
2739
110
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
105
#if 1
2745
105
    {
2746
105
        std::set<uint64_t> moduleIDs;
2747
105
        for (const auto& m : modules ) {
2748
82
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
82
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
82
            moduleIDs.insert(moduleID);
2756
82
        }
2757
2758
105
        std::set<uint64_t> operationModuleIDs;
2759
125
        for (const auto& op : operations) {
2760
125
            operationModuleIDs.insert(op.first->ID);
2761
125
        }
2762
2763
105
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
105
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
105
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
105
        for (const auto& id : addModuleIDs) {
2768
29
            operations.push_back({ modules.at(id), operations[0].second});
2769
29
        }
2770
105
    }
2771
105
#endif
2772
2773
105
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
105
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
259
    for (size_t i = 0; i < operations.size(); i++) {
2781
154
        auto& operation = operations[i];
2782
2783
154
        auto& module = operation.first;
2784
154
        auto& op = operation.second;
2785
2786
154
        if ( i > 0 ) {
2787
113
            auto& prevModule = operations[i-1].first;
2788
113
            auto& prevOp = operations[i].second;
2789
2790
113
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
66
                auto& curModifier = op.modifier.GetVectorPtr();
2792
66
                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
38
                } else {
2797
270
                    for (auto& c : curModifier) {
2798
270
                        c++;
2799
270
                    }
2800
28
                }
2801
66
            }
2802
113
        }
2803
2804
154
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
154
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
154
        const auto& result = results.back();
2811
2812
154
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
154
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
154
        if ( options.disableTests == false ) {
2830
154
            tests::test(op, result.second);
2831
154
        }
2832
2833
154
        postprocess(module, op, result);
2834
154
    }
2835
2836
105
    if ( options.noCompare == false ) {
2837
41
        compare(operations, results, data, size);
2838
41
    }
2839
105
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
522
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
522
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
522
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.42k
    do {
2725
3.42k
        auto op = getOp(&parentDs, data, size);
2726
3.42k
        auto module = getModule(parentDs);
2727
3.42k
        if ( module == nullptr ) {
2728
2.38k
            continue;
2729
2.38k
        }
2730
2731
1.03k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.03k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
40
            break;
2736
40
        }
2737
3.38k
    } while ( parentDs.Get<bool>() == true );
2738
2739
522
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
514
#if 1
2745
514
    {
2746
514
        std::set<uint64_t> moduleIDs;
2747
890
        for (const auto& m : modules ) {
2748
890
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
890
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
890
            moduleIDs.insert(moduleID);
2756
890
        }
2757
2758
514
        std::set<uint64_t> operationModuleIDs;
2759
924
        for (const auto& op : operations) {
2760
924
            operationModuleIDs.insert(op.first->ID);
2761
924
        }
2762
2763
514
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
514
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
514
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
514
        for (const auto& id : addModuleIDs) {
2768
432
            operations.push_back({ modules.at(id), operations[0].second});
2769
432
        }
2770
514
    }
2771
514
#endif
2772
2773
514
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
514
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.87k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.35k
        auto& operation = operations[i];
2782
2783
1.35k
        auto& module = operation.first;
2784
1.35k
        auto& op = operation.second;
2785
2786
1.35k
        if ( i > 0 ) {
2787
911
            auto& prevModule = operations[i-1].first;
2788
911
            auto& prevOp = operations[i].second;
2789
2790
911
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
458
                auto& curModifier = op.modifier.GetVectorPtr();
2792
458
                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
15.6k
                    for (auto& c : curModifier) {
2798
15.6k
                        c++;
2799
15.6k
                    }
2800
158
                }
2801
458
            }
2802
911
        }
2803
2804
1.35k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.35k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.35k
        const auto& result = results.back();
2811
2812
1.35k
        if ( result.second != std::nullopt ) {
2813
679
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
679
        }
2820
2821
1.35k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.35k
        if ( options.disableTests == false ) {
2830
1.35k
            tests::test(op, result.second);
2831
1.35k
        }
2832
2833
1.35k
        postprocess(module, op, result);
2834
1.35k
    }
2835
2836
514
    if ( options.noCompare == false ) {
2837
445
        compare(operations, results, data, size);
2838
445
    }
2839
514
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::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
2.39k
    do {
2725
2.39k
        auto op = getOp(&parentDs, data, size);
2726
2.39k
        auto module = getModule(parentDs);
2727
2.39k
        if ( module == nullptr ) {
2728
1.98k
            continue;
2729
1.98k
        }
2730
2731
405
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
405
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
2.38k
    } while ( parentDs.Get<bool>() == true );
2738
2739
235
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
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
320
        for (const auto& m : modules ) {
2748
320
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
320
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
320
            moduleIDs.insert(moduleID);
2756
320
        }
2757
2758
228
        std::set<uint64_t> operationModuleIDs;
2759
322
        for (const auto& op : operations) {
2760
322
            operationModuleIDs.insert(op.first->ID);
2761
322
        }
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
149
            operations.push_back({ modules.at(id), operations[0].second});
2769
149
        }
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
699
    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
311
            auto& prevModule = operations[i-1].first;
2788
311
            auto& prevOp = operations[i].second;
2789
2790
311
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
144
                auto& curModifier = op.modifier.GetVectorPtr();
2792
144
                if ( curModifier.size() == 0 ) {
2793
33.8k
                    for (size_t j = 0; j < 512; j++) {
2794
33.7k
                        curModifier.push_back(1);
2795
33.7k
                    }
2796
78
                } else {
2797
8.39k
                    for (auto& c : curModifier) {
2798
8.39k
                        c++;
2799
8.39k
                    }
2800
78
                }
2801
144
            }
2802
311
        }
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
71
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
71
        }
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
228
    if ( options.noCompare == false ) {
2837
160
        compare(operations, results, data, size);
2838
160
    }
2839
228
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
114
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
114
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
114
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.22k
    do {
2725
2.22k
        auto op = getOp(&parentDs, data, size);
2726
2.22k
        auto module = getModule(parentDs);
2727
2.22k
        if ( module == nullptr ) {
2728
2.03k
            continue;
2729
2.03k
        }
2730
2731
194
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
194
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.22k
    } while ( parentDs.Get<bool>() == true );
2738
2739
114
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
110
#if 1
2745
110
    {
2746
110
        std::set<uint64_t> moduleIDs;
2747
110
        for (const auto& m : modules ) {
2748
74
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
74
            moduleIDs.insert(moduleID);
2756
74
        }
2757
2758
110
        std::set<uint64_t> operationModuleIDs;
2759
110
        for (const auto& op : operations) {
2760
106
            operationModuleIDs.insert(op.first->ID);
2761
106
        }
2762
2763
110
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
110
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
110
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
110
        for (const auto& id : addModuleIDs) {
2768
27
            operations.push_back({ modules.at(id), operations[0].second});
2769
27
        }
2770
110
    }
2771
110
#endif
2772
2773
110
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
110
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
243
    for (size_t i = 0; i < operations.size(); i++) {
2781
133
        auto& operation = operations[i];
2782
2783
133
        auto& module = operation.first;
2784
133
        auto& op = operation.second;
2785
2786
133
        if ( i > 0 ) {
2787
96
            auto& prevModule = operations[i-1].first;
2788
96
            auto& prevOp = operations[i].second;
2789
2790
96
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
51
                auto& curModifier = op.modifier.GetVectorPtr();
2792
51
                if ( curModifier.size() == 0 ) {
2793
11.7k
                    for (size_t j = 0; j < 512; j++) {
2794
11.7k
                        curModifier.push_back(1);
2795
11.7k
                    }
2796
28
                } else {
2797
289
                    for (auto& c : curModifier) {
2798
289
                        c++;
2799
289
                    }
2800
28
                }
2801
51
            }
2802
96
        }
2803
2804
133
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
133
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
133
        const auto& result = results.back();
2811
2812
133
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
133
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
133
        if ( options.disableTests == false ) {
2830
133
            tests::test(op, result.second);
2831
133
        }
2832
2833
133
        postprocess(module, op, result);
2834
133
    }
2835
2836
110
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
110
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
118
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
118
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
118
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.58k
    do {
2725
2.58k
        auto op = getOp(&parentDs, data, size);
2726
2.58k
        auto module = getModule(parentDs);
2727
2.58k
        if ( module == nullptr ) {
2728
2.40k
            continue;
2729
2.40k
        }
2730
2731
180
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
180
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
2.57k
    } while ( parentDs.Get<bool>() == true );
2738
2739
118
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
109
#if 1
2745
109
    {
2746
109
        std::set<uint64_t> moduleIDs;
2747
109
        for (const auto& m : modules ) {
2748
76
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
76
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
76
            moduleIDs.insert(moduleID);
2756
76
        }
2757
2758
109
        std::set<uint64_t> operationModuleIDs;
2759
109
        for (const auto& op : operations) {
2760
102
            operationModuleIDs.insert(op.first->ID);
2761
102
        }
2762
2763
109
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
109
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
109
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
109
        for (const auto& id : addModuleIDs) {
2768
28
            operations.push_back({ modules.at(id), operations[0].second});
2769
28
        }
2770
109
    }
2771
109
#endif
2772
2773
109
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
109
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
239
    for (size_t i = 0; i < operations.size(); i++) {
2781
130
        auto& operation = operations[i];
2782
2783
130
        auto& module = operation.first;
2784
130
        auto& op = operation.second;
2785
2786
130
        if ( i > 0 ) {
2787
92
            auto& prevModule = operations[i-1].first;
2788
92
            auto& prevOp = operations[i].second;
2789
2790
92
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
48
                auto& curModifier = op.modifier.GetVectorPtr();
2792
48
                if ( curModifier.size() == 0 ) {
2793
11.7k
                    for (size_t j = 0; j < 512; j++) {
2794
11.7k
                        curModifier.push_back(1);
2795
11.7k
                    }
2796
25
                } else {
2797
261
                    for (auto& c : curModifier) {
2798
261
                        c++;
2799
261
                    }
2800
25
                }
2801
48
            }
2802
92
        }
2803
2804
130
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
130
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
130
        const auto& result = results.back();
2811
2812
130
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
130
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
130
        if ( options.disableTests == false ) {
2830
130
            tests::test(op, result.second);
2831
130
        }
2832
2833
130
        postprocess(module, op, result);
2834
130
    }
2835
2836
109
    if ( options.noCompare == false ) {
2837
38
        compare(operations, results, data, size);
2838
38
    }
2839
109
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
105
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
105
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
105
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.95k
    do {
2725
2.95k
        auto op = getOp(&parentDs, data, size);
2726
2.95k
        auto module = getModule(parentDs);
2727
2.95k
        if ( module == nullptr ) {
2728
2.75k
            continue;
2729
2.75k
        }
2730
2731
196
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
196
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.94k
    } while ( parentDs.Get<bool>() == true );
2738
2739
105
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
99
#if 1
2745
99
    {
2746
99
        std::set<uint64_t> moduleIDs;
2747
99
        for (const auto& m : modules ) {
2748
80
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
80
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
80
            moduleIDs.insert(moduleID);
2756
80
        }
2757
2758
99
        std::set<uint64_t> operationModuleIDs;
2759
116
        for (const auto& op : operations) {
2760
116
            operationModuleIDs.insert(op.first->ID);
2761
116
        }
2762
2763
99
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
99
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
99
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
99
        for (const auto& id : addModuleIDs) {
2768
31
            operations.push_back({ modules.at(id), operations[0].second});
2769
31
        }
2770
99
    }
2771
99
#endif
2772
2773
99
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
99
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
246
    for (size_t i = 0; i < operations.size(); i++) {
2781
147
        auto& operation = operations[i];
2782
2783
147
        auto& module = operation.first;
2784
147
        auto& op = operation.second;
2785
2786
147
        if ( i > 0 ) {
2787
107
            auto& prevModule = operations[i-1].first;
2788
107
            auto& prevOp = operations[i].second;
2789
2790
107
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
61
                auto& curModifier = op.modifier.GetVectorPtr();
2792
61
                if ( curModifier.size() == 0 ) {
2793
13.8k
                    for (size_t j = 0; j < 512; j++) {
2794
13.8k
                        curModifier.push_back(1);
2795
13.8k
                    }
2796
34
                } else {
2797
830
                    for (auto& c : curModifier) {
2798
830
                        c++;
2799
830
                    }
2800
34
                }
2801
61
            }
2802
107
        }
2803
2804
147
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
147
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
147
        const auto& result = results.back();
2811
2812
147
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
147
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
147
        if ( options.disableTests == false ) {
2830
147
            tests::test(op, result.second);
2831
147
        }
2832
2833
147
        postprocess(module, op, result);
2834
147
    }
2835
2836
99
    if ( options.noCompare == false ) {
2837
40
        compare(operations, results, data, size);
2838
40
    }
2839
99
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
324
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
324
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
324
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.34k
    do {
2725
2.34k
        auto op = getOp(&parentDs, data, size);
2726
2.34k
        auto module = getModule(parentDs);
2727
2.34k
        if ( module == nullptr ) {
2728
1.72k
            continue;
2729
1.72k
        }
2730
2731
618
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
618
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
2.33k
    } while ( parentDs.Get<bool>() == true );
2738
2739
324
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
319
#if 1
2745
319
    {
2746
319
        std::set<uint64_t> moduleIDs;
2747
514
        for (const auto& m : modules ) {
2748
514
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
514
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
514
            moduleIDs.insert(moduleID);
2756
514
        }
2757
2758
319
        std::set<uint64_t> operationModuleIDs;
2759
555
        for (const auto& op : operations) {
2760
555
            operationModuleIDs.insert(op.first->ID);
2761
555
        }
2762
2763
319
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
319
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
319
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
319
        for (const auto& id : addModuleIDs) {
2768
245
            operations.push_back({ modules.at(id), operations[0].second});
2769
245
        }
2770
319
    }
2771
319
#endif
2772
2773
319
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
319
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.11k
    for (size_t i = 0; i < operations.size(); i++) {
2781
800
        auto& operation = operations[i];
2782
2783
800
        auto& module = operation.first;
2784
800
        auto& op = operation.second;
2785
2786
800
        if ( i > 0 ) {
2787
543
            auto& prevModule = operations[i-1].first;
2788
543
            auto& prevOp = operations[i].second;
2789
2790
543
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
280
                auto& curModifier = op.modifier.GetVectorPtr();
2792
280
                if ( curModifier.size() == 0 ) {
2793
104k
                    for (size_t j = 0; j < 512; j++) {
2794
103k
                        curModifier.push_back(1);
2795
103k
                    }
2796
203
                } else {
2797
296
                    for (auto& c : curModifier) {
2798
296
                        c++;
2799
296
                    }
2800
77
                }
2801
280
            }
2802
543
        }
2803
2804
800
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
800
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
800
        const auto& result = results.back();
2811
2812
800
        if ( result.second != std::nullopt ) {
2813
408
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
408
        }
2820
2821
800
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
800
        if ( options.disableTests == false ) {
2830
800
            tests::test(op, result.second);
2831
800
        }
2832
2833
800
        postprocess(module, op, result);
2834
800
    }
2835
2836
319
    if ( options.noCompare == false ) {
2837
257
        compare(operations, results, data, size);
2838
257
    }
2839
319
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::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
2.70k
    do {
2725
2.70k
        auto op = getOp(&parentDs, data, size);
2726
2.70k
        auto module = getModule(parentDs);
2727
2.70k
        if ( module == nullptr ) {
2728
2.33k
            continue;
2729
2.33k
        }
2730
2731
370
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
370
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.69k
    } while ( parentDs.Get<bool>() == true );
2738
2739
235
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
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
336
        for (const auto& m : modules ) {
2748
336
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
336
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
336
            moduleIDs.insert(moduleID);
2756
336
        }
2757
2758
228
        std::set<uint64_t> operationModuleIDs;
2759
310
        for (const auto& op : operations) {
2760
310
            operationModuleIDs.insert(op.first->ID);
2761
310
        }
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
157
            operations.push_back({ modules.at(id), operations[0].second});
2769
157
        }
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
695
    for (size_t i = 0; i < operations.size(); i++) {
2781
467
        auto& operation = operations[i];
2782
2783
467
        auto& module = operation.first;
2784
467
        auto& op = operation.second;
2785
2786
467
        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
125
                auto& curModifier = op.modifier.GetVectorPtr();
2792
125
                if ( curModifier.size() == 0 ) {
2793
45.6k
                    for (size_t j = 0; j < 512; j++) {
2794
45.5k
                        curModifier.push_back(1);
2795
45.5k
                    }
2796
89
                } else {
2797
306
                    for (auto& c : curModifier) {
2798
306
                        c++;
2799
306
                    }
2800
36
                }
2801
125
            }
2802
299
        }
2803
2804
467
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
467
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
467
        const auto& result = results.back();
2811
2812
467
        if ( result.second != std::nullopt ) {
2813
133
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
133
        }
2820
2821
467
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
467
        if ( options.disableTests == false ) {
2830
467
            tests::test(op, result.second);
2831
467
        }
2832
2833
467
        postprocess(module, op, result);
2834
467
    }
2835
2836
228
    if ( options.noCompare == false ) {
2837
168
        compare(operations, results, data, size);
2838
168
    }
2839
228
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
106
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
106
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
106
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.33k
    do {
2725
2.33k
        auto op = getOp(&parentDs, data, size);
2726
2.33k
        auto module = getModule(parentDs);
2727
2.33k
        if ( module == nullptr ) {
2728
2.13k
            continue;
2729
2.13k
        }
2730
2731
208
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
208
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.33k
    } while ( parentDs.Get<bool>() == true );
2738
2739
106
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
102
#if 1
2745
102
    {
2746
102
        std::set<uint64_t> moduleIDs;
2747
102
        for (const auto& m : modules ) {
2748
76
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
76
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
76
            moduleIDs.insert(moduleID);
2756
76
        }
2757
2758
102
        std::set<uint64_t> operationModuleIDs;
2759
109
        for (const auto& op : operations) {
2760
109
            operationModuleIDs.insert(op.first->ID);
2761
109
        }
2762
2763
102
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
102
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
102
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
102
        for (const auto& id : addModuleIDs) {
2768
26
            operations.push_back({ modules.at(id), operations[0].second});
2769
26
        }
2770
102
    }
2771
102
#endif
2772
2773
102
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
102
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
237
    for (size_t i = 0; i < operations.size(); i++) {
2781
135
        auto& operation = operations[i];
2782
2783
135
        auto& module = operation.first;
2784
135
        auto& op = operation.second;
2785
2786
135
        if ( i > 0 ) {
2787
97
            auto& prevModule = operations[i-1].first;
2788
97
            auto& prevOp = operations[i].second;
2789
2790
97
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
49
                auto& curModifier = op.modifier.GetVectorPtr();
2792
49
                if ( curModifier.size() == 0 ) {
2793
11.2k
                    for (size_t j = 0; j < 512; j++) {
2794
11.2k
                        curModifier.push_back(1);
2795
11.2k
                    }
2796
27
                } else {
2797
244
                    for (auto& c : curModifier) {
2798
244
                        c++;
2799
244
                    }
2800
27
                }
2801
49
            }
2802
97
        }
2803
2804
135
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
135
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
135
        const auto& result = results.back();
2811
2812
135
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
135
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
135
        if ( options.disableTests == false ) {
2830
135
            tests::test(op, result.second);
2831
135
        }
2832
2833
135
        postprocess(module, op, result);
2834
135
    }
2835
2836
102
    if ( options.noCompare == false ) {
2837
38
        compare(operations, results, data, size);
2838
38
    }
2839
102
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
94
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
94
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
94
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.45k
    do {
2725
2.45k
        auto op = getOp(&parentDs, data, size);
2726
2.45k
        auto module = getModule(parentDs);
2727
2.45k
        if ( module == nullptr ) {
2728
2.29k
            continue;
2729
2.29k
        }
2730
2731
160
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
160
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
2.44k
    } while ( parentDs.Get<bool>() == true );
2738
2739
94
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
87
#if 1
2745
87
    {
2746
87
        std::set<uint64_t> moduleIDs;
2747
87
        for (const auto& m : modules ) {
2748
54
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
54
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
54
            moduleIDs.insert(moduleID);
2756
54
        }
2757
2758
87
        std::set<uint64_t> operationModuleIDs;
2759
87
        for (const auto& op : operations) {
2760
82
            operationModuleIDs.insert(op.first->ID);
2761
82
        }
2762
2763
87
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
87
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
87
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
87
        for (const auto& id : addModuleIDs) {
2768
17
            operations.push_back({ modules.at(id), operations[0].second});
2769
17
        }
2770
87
    }
2771
87
#endif
2772
2773
87
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
87
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
186
    for (size_t i = 0; i < operations.size(); i++) {
2781
99
        auto& operation = operations[i];
2782
2783
99
        auto& module = operation.first;
2784
99
        auto& op = operation.second;
2785
2786
99
        if ( i > 0 ) {
2787
72
            auto& prevModule = operations[i-1].first;
2788
72
            auto& prevOp = operations[i].second;
2789
2790
72
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
39
                auto& curModifier = op.modifier.GetVectorPtr();
2792
39
                if ( curModifier.size() == 0 ) {
2793
11.2k
                    for (size_t j = 0; j < 512; j++) {
2794
11.2k
                        curModifier.push_back(1);
2795
11.2k
                    }
2796
22
                } else {
2797
286
                    for (auto& c : curModifier) {
2798
286
                        c++;
2799
286
                    }
2800
17
                }
2801
39
            }
2802
72
        }
2803
2804
99
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
99
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
99
        const auto& result = results.back();
2811
2812
99
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
99
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
99
        if ( options.disableTests == false ) {
2830
99
            tests::test(op, result.second);
2831
99
        }
2832
2833
99
        postprocess(module, op, result);
2834
99
    }
2835
2836
87
    if ( options.noCompare == false ) {
2837
27
        compare(operations, results, data, size);
2838
27
    }
2839
87
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
595
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
595
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
595
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.19k
    do {
2725
3.19k
        auto op = getOp(&parentDs, data, size);
2726
3.19k
        auto module = getModule(parentDs);
2727
3.19k
        if ( module == nullptr ) {
2728
2.28k
            continue;
2729
2.28k
        }
2730
2731
909
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
909
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
18
            break;
2736
18
        }
2737
3.17k
    } while ( parentDs.Get<bool>() == true );
2738
2739
595
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
590
#if 1
2745
590
    {
2746
590
        std::set<uint64_t> moduleIDs;
2747
1.04k
        for (const auto& m : modules ) {
2748
1.04k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.04k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.04k
            moduleIDs.insert(moduleID);
2756
1.04k
        }
2757
2758
590
        std::set<uint64_t> operationModuleIDs;
2759
828
        for (const auto& op : operations) {
2760
828
            operationModuleIDs.insert(op.first->ID);
2761
828
        }
2762
2763
590
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
590
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
590
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
590
        for (const auto& id : addModuleIDs) {
2768
512
            operations.push_back({ modules.at(id), operations[0].second});
2769
512
        }
2770
590
    }
2771
590
#endif
2772
2773
590
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
590
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.93k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.34k
        auto& operation = operations[i];
2782
2783
1.34k
        auto& module = operation.first;
2784
1.34k
        auto& op = operation.second;
2785
2786
1.34k
        if ( i > 0 ) {
2787
818
            auto& prevModule = operations[i-1].first;
2788
818
            auto& prevOp = operations[i].second;
2789
2790
818
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
290
                auto& curModifier = op.modifier.GetVectorPtr();
2792
290
                if ( curModifier.size() == 0 ) {
2793
114k
                    for (size_t j = 0; j < 512; j++) {
2794
114k
                        curModifier.push_back(1);
2795
114k
                    }
2796
224
                } else {
2797
421
                    for (auto& c : curModifier) {
2798
421
                        c++;
2799
421
                    }
2800
66
                }
2801
290
            }
2802
818
        }
2803
2804
1.34k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.34k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.34k
        const auto& result = results.back();
2811
2812
1.34k
        if ( result.second != std::nullopt ) {
2813
516
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
516
        }
2820
2821
1.34k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.34k
        if ( options.disableTests == false ) {
2830
1.34k
            tests::test(op, result.second);
2831
1.34k
        }
2832
2833
1.34k
        postprocess(module, op, result);
2834
1.34k
    }
2835
2836
590
    if ( options.noCompare == false ) {
2837
522
        compare(operations, results, data, size);
2838
522
    }
2839
590
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
263
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
263
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
263
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.81k
    do {
2725
2.81k
        auto op = getOp(&parentDs, data, size);
2726
2.81k
        auto module = getModule(parentDs);
2727
2.81k
        if ( module == nullptr ) {
2728
2.26k
            continue;
2729
2.26k
        }
2730
2731
551
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
551
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
2.79k
    } while ( parentDs.Get<bool>() == true );
2738
2739
263
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
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
366
        for (const auto& m : modules ) {
2748
366
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
366
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
366
            moduleIDs.insert(moduleID);
2756
366
        }
2757
2758
258
        std::set<uint64_t> operationModuleIDs;
2759
454
        for (const auto& op : operations) {
2760
454
            operationModuleIDs.insert(op.first->ID);
2761
454
        }
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
169
            operations.push_back({ modules.at(id), operations[0].second});
2769
169
        }
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
881
    for (size_t i = 0; i < operations.size(); i++) {
2781
623
        auto& operation = operations[i];
2782
2783
623
        auto& module = operation.first;
2784
623
        auto& op = operation.second;
2785
2786
623
        if ( i > 0 ) {
2787
440
            auto& prevModule = operations[i-1].first;
2788
440
            auto& prevOp = operations[i].second;
2789
2790
440
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
251
                auto& curModifier = op.modifier.GetVectorPtr();
2792
251
                if ( curModifier.size() == 0 ) {
2793
86.1k
                    for (size_t j = 0; j < 512; j++) {
2794
86.0k
                        curModifier.push_back(1);
2795
86.0k
                    }
2796
168
                } else {
2797
3.58k
                    for (auto& c : curModifier) {
2798
3.58k
                        c++;
2799
3.58k
                    }
2800
83
                }
2801
251
            }
2802
440
        }
2803
2804
623
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
623
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
623
        const auto& result = results.back();
2811
2812
623
        if ( result.second != std::nullopt ) {
2813
88
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
88
        }
2820
2821
623
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
623
        if ( options.disableTests == false ) {
2830
623
            tests::test(op, result.second);
2831
623
        }
2832
2833
623
        postprocess(module, op, result);
2834
623
    }
2835
2836
258
    if ( options.noCompare == false ) {
2837
183
        compare(operations, results, data, size);
2838
183
    }
2839
258
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
173
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
173
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
173
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.62k
    do {
2725
2.62k
        auto op = getOp(&parentDs, data, size);
2726
2.62k
        auto module = getModule(parentDs);
2727
2.62k
        if ( module == nullptr ) {
2728
2.37k
            continue;
2729
2.37k
        }
2730
2731
250
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
250
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.62k
    } while ( parentDs.Get<bool>() == true );
2738
2739
173
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
168
#if 1
2745
168
    {
2746
168
        std::set<uint64_t> moduleIDs;
2747
168
        for (const auto& m : modules ) {
2748
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
168
        std::set<uint64_t> operationModuleIDs;
2759
168
        for (const auto& op : operations) {
2760
148
            operationModuleIDs.insert(op.first->ID);
2761
148
        }
2762
2763
168
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
168
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
168
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
168
        for (const auto& id : addModuleIDs) {
2768
43
            operations.push_back({ modules.at(id), operations[0].second});
2769
43
        }
2770
168
    }
2771
168
#endif
2772
2773
168
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
168
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
359
    for (size_t i = 0; i < operations.size(); i++) {
2781
191
        auto& operation = operations[i];
2782
2783
191
        auto& module = operation.first;
2784
191
        auto& op = operation.second;
2785
2786
191
        if ( i > 0 ) {
2787
135
            auto& prevModule = operations[i-1].first;
2788
135
            auto& prevOp = operations[i].second;
2789
2790
135
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
73
                auto& curModifier = op.modifier.GetVectorPtr();
2792
73
                if ( curModifier.size() == 0 ) {
2793
16.4k
                    for (size_t j = 0; j < 512; j++) {
2794
16.3k
                        curModifier.push_back(1);
2795
16.3k
                    }
2796
41
                } else {
2797
307
                    for (auto& c : curModifier) {
2798
307
                        c++;
2799
307
                    }
2800
41
                }
2801
73
            }
2802
135
        }
2803
2804
191
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
191
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
191
        const auto& result = results.back();
2811
2812
191
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
191
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
191
        if ( options.disableTests == false ) {
2830
191
            tests::test(op, result.second);
2831
191
        }
2832
2833
191
        postprocess(module, op, result);
2834
191
    }
2835
2836
168
    if ( options.noCompare == false ) {
2837
56
        compare(operations, results, data, size);
2838
56
    }
2839
168
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::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
1.46k
    do {
2725
1.46k
        auto op = getOp(&parentDs, data, size);
2726
1.46k
        auto module = getModule(parentDs);
2727
1.46k
        if ( module == nullptr ) {
2728
1.29k
            continue;
2729
1.29k
        }
2730
2731
169
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
169
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.45k
    } while ( parentDs.Get<bool>() == true );
2738
2739
192
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
182
#if 1
2745
182
    {
2746
182
        std::set<uint64_t> moduleIDs;
2747
182
        for (const auto& m : modules ) {
2748
70
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
70
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
70
            moduleIDs.insert(moduleID);
2756
70
        }
2757
2758
182
        std::set<uint64_t> operationModuleIDs;
2759
182
        for (const auto& op : operations) {
2760
103
            operationModuleIDs.insert(op.first->ID);
2761
103
        }
2762
2763
182
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
182
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
182
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
182
        for (const auto& id : addModuleIDs) {
2768
23
            operations.push_back({ modules.at(id), operations[0].second});
2769
23
        }
2770
182
    }
2771
182
#endif
2772
2773
182
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
182
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
308
    for (size_t i = 0; i < operations.size(); i++) {
2781
126
        auto& operation = operations[i];
2782
2783
126
        auto& module = operation.first;
2784
126
        auto& op = operation.second;
2785
2786
126
        if ( i > 0 ) {
2787
91
            auto& prevModule = operations[i-1].first;
2788
91
            auto& prevOp = operations[i].second;
2789
2790
91
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
50
                auto& curModifier = op.modifier.GetVectorPtr();
2792
50
                if ( curModifier.size() == 0 ) {
2793
14.3k
                    for (size_t j = 0; j < 512; j++) {
2794
14.3k
                        curModifier.push_back(1);
2795
14.3k
                    }
2796
28
                } else {
2797
247
                    for (auto& c : curModifier) {
2798
247
                        c++;
2799
247
                    }
2800
22
                }
2801
50
            }
2802
91
        }
2803
2804
126
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
126
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
126
        const auto& result = results.back();
2811
2812
126
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
126
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
126
        if ( options.disableTests == false ) {
2830
126
            tests::test(op, result.second);
2831
126
        }
2832
2833
126
        postprocess(module, op, result);
2834
126
    }
2835
2836
182
    if ( options.noCompare == false ) {
2837
35
        compare(operations, results, data, size);
2838
35
    }
2839
182
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
224
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
224
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
224
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.45k
    do {
2725
2.45k
        auto op = getOp(&parentDs, data, size);
2726
2.45k
        auto module = getModule(parentDs);
2727
2.45k
        if ( module == nullptr ) {
2728
2.22k
            continue;
2729
2.22k
        }
2730
2731
227
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
227
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
2.44k
    } while ( parentDs.Get<bool>() == true );
2738
2739
224
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
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
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
218
        std::set<uint64_t> operationModuleIDs;
2759
218
        for (const auto& op : operations) {
2760
114
            operationModuleIDs.insert(op.first->ID);
2761
114
        }
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
26
            operations.push_back({ modules.at(id), operations[0].second});
2769
26
        }
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
358
    for (size_t i = 0; i < operations.size(); i++) {
2781
140
        auto& operation = operations[i];
2782
2783
140
        auto& module = operation.first;
2784
140
        auto& op = operation.second;
2785
2786
140
        if ( i > 0 ) {
2787
104
            auto& prevModule = operations[i-1].first;
2788
104
            auto& prevOp = operations[i].second;
2789
2790
104
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
62
                auto& curModifier = op.modifier.GetVectorPtr();
2792
62
                if ( curModifier.size() == 0 ) {
2793
15.9k
                    for (size_t j = 0; j < 512; j++) {
2794
15.8k
                        curModifier.push_back(1);
2795
15.8k
                    }
2796
31
                } else {
2797
258
                    for (auto& c : curModifier) {
2798
258
                        c++;
2799
258
                    }
2800
31
                }
2801
62
            }
2802
104
        }
2803
2804
140
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
140
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
140
        const auto& result = results.back();
2811
2812
140
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
140
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
140
        if ( options.disableTests == false ) {
2830
140
            tests::test(op, result.second);
2831
140
        }
2832
2833
140
        postprocess(module, op, result);
2834
140
    }
2835
2836
218
    if ( options.noCompare == false ) {
2837
36
        compare(operations, results, data, size);
2838
36
    }
2839
218
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
153
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
153
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
153
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.70k
    do {
2725
2.70k
        auto op = getOp(&parentDs, data, size);
2726
2.70k
        auto module = getModule(parentDs);
2727
2.70k
        if ( module == nullptr ) {
2728
2.45k
            continue;
2729
2.45k
        }
2730
2731
245
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
245
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.69k
    } while ( parentDs.Get<bool>() == true );
2738
2739
153
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
146
#if 1
2745
146
    {
2746
146
        std::set<uint64_t> moduleIDs;
2747
146
        for (const auto& m : modules ) {
2748
106
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
106
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
106
            moduleIDs.insert(moduleID);
2756
106
        }
2757
2758
146
        std::set<uint64_t> operationModuleIDs;
2759
146
        for (const auto& op : operations) {
2760
129
            operationModuleIDs.insert(op.first->ID);
2761
129
        }
2762
2763
146
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
146
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
146
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
146
        for (const auto& id : addModuleIDs) {
2768
41
            operations.push_back({ modules.at(id), operations[0].second});
2769
41
        }
2770
146
    }
2771
146
#endif
2772
2773
146
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
146
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
316
    for (size_t i = 0; i < operations.size(); i++) {
2781
170
        auto& operation = operations[i];
2782
2783
170
        auto& module = operation.first;
2784
170
        auto& op = operation.second;
2785
2786
170
        if ( i > 0 ) {
2787
117
            auto& prevModule = operations[i-1].first;
2788
117
            auto& prevOp = operations[i].second;
2789
2790
117
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
58
                auto& curModifier = op.modifier.GetVectorPtr();
2792
58
                if ( curModifier.size() == 0 ) {
2793
14.8k
                    for (size_t j = 0; j < 512; j++) {
2794
14.8k
                        curModifier.push_back(1);
2795
14.8k
                    }
2796
29
                } else {
2797
336
                    for (auto& c : curModifier) {
2798
336
                        c++;
2799
336
                    }
2800
29
                }
2801
58
            }
2802
117
        }
2803
2804
170
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
170
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
170
        const auto& result = results.back();
2811
2812
170
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
170
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
170
        if ( options.disableTests == false ) {
2830
170
            tests::test(op, result.second);
2831
170
        }
2832
2833
170
        postprocess(module, op, result);
2834
170
    }
2835
2836
146
    if ( options.noCompare == false ) {
2837
53
        compare(operations, results, data, size);
2838
53
    }
2839
146
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
143
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
143
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
143
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.03k
    do {
2725
2.03k
        auto op = getOp(&parentDs, data, size);
2726
2.03k
        auto module = getModule(parentDs);
2727
2.03k
        if ( module == nullptr ) {
2728
1.85k
            continue;
2729
1.85k
        }
2730
2731
174
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
174
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.02k
    } while ( parentDs.Get<bool>() == true );
2738
2739
143
    if ( operations.empty() == true ) {
2740
20
        return;
2741
20
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
123
#if 1
2745
123
    {
2746
123
        std::set<uint64_t> moduleIDs;
2747
123
        for (const auto& m : modules ) {
2748
68
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
68
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
68
            moduleIDs.insert(moduleID);
2756
68
        }
2757
2758
123
        std::set<uint64_t> operationModuleIDs;
2759
123
        for (const auto& op : operations) {
2760
97
            operationModuleIDs.insert(op.first->ID);
2761
97
        }
2762
2763
123
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
123
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
123
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
123
        for (const auto& id : addModuleIDs) {
2768
23
            operations.push_back({ modules.at(id), operations[0].second});
2769
23
        }
2770
123
    }
2771
123
#endif
2772
2773
123
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
123
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
243
    for (size_t i = 0; i < operations.size(); i++) {
2781
120
        auto& operation = operations[i];
2782
2783
120
        auto& module = operation.first;
2784
120
        auto& op = operation.second;
2785
2786
120
        if ( i > 0 ) {
2787
86
            auto& prevModule = operations[i-1].first;
2788
86
            auto& prevOp = operations[i].second;
2789
2790
86
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
46
                auto& curModifier = op.modifier.GetVectorPtr();
2792
46
                if ( curModifier.size() == 0 ) {
2793
13.8k
                    for (size_t j = 0; j < 512; j++) {
2794
13.8k
                        curModifier.push_back(1);
2795
13.8k
                    }
2796
27
                } else {
2797
254
                    for (auto& c : curModifier) {
2798
254
                        c++;
2799
254
                    }
2800
19
                }
2801
46
            }
2802
86
        }
2803
2804
120
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
120
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
120
        const auto& result = results.back();
2811
2812
120
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
120
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
120
        if ( options.disableTests == false ) {
2830
120
            tests::test(op, result.second);
2831
120
        }
2832
2833
120
        postprocess(module, op, result);
2834
120
    }
2835
2836
123
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
123
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
130
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
130
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
130
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.15k
    do {
2725
3.15k
        auto op = getOp(&parentDs, data, size);
2726
3.15k
        auto module = getModule(parentDs);
2727
3.15k
        if ( module == nullptr ) {
2728
2.90k
            continue;
2729
2.90k
        }
2730
2731
253
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
253
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
3.14k
    } while ( parentDs.Get<bool>() == true );
2738
2739
130
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
126
#if 1
2745
126
    {
2746
126
        std::set<uint64_t> moduleIDs;
2747
126
        for (const auto& m : modules ) {
2748
94
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
94
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
94
            moduleIDs.insert(moduleID);
2756
94
        }
2757
2758
126
        std::set<uint64_t> operationModuleIDs;
2759
127
        for (const auto& op : operations) {
2760
127
            operationModuleIDs.insert(op.first->ID);
2761
127
        }
2762
2763
126
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
126
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
126
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
126
        for (const auto& id : addModuleIDs) {
2768
36
            operations.push_back({ modules.at(id), operations[0].second});
2769
36
        }
2770
126
    }
2771
126
#endif
2772
2773
126
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
126
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
289
    for (size_t i = 0; i < operations.size(); i++) {
2781
163
        auto& operation = operations[i];
2782
2783
163
        auto& module = operation.first;
2784
163
        auto& op = operation.second;
2785
2786
163
        if ( i > 0 ) {
2787
116
            auto& prevModule = operations[i-1].first;
2788
116
            auto& prevOp = operations[i].second;
2789
2790
116
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
63
                auto& curModifier = op.modifier.GetVectorPtr();
2792
63
                if ( curModifier.size() == 0 ) {
2793
13.8k
                    for (size_t j = 0; j < 512; j++) {
2794
13.8k
                        curModifier.push_back(1);
2795
13.8k
                    }
2796
36
                } else {
2797
269
                    for (auto& c : curModifier) {
2798
269
                        c++;
2799
269
                    }
2800
36
                }
2801
63
            }
2802
116
        }
2803
2804
163
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
163
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
163
        const auto& result = results.back();
2811
2812
163
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
163
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
163
        if ( options.disableTests == false ) {
2830
163
            tests::test(op, result.second);
2831
163
        }
2832
2833
163
        postprocess(module, op, result);
2834
163
    }
2835
2836
126
    if ( options.noCompare == false ) {
2837
47
        compare(operations, results, data, size);
2838
47
    }
2839
126
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
134
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
134
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
134
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.85k
    do {
2725
2.85k
        auto op = getOp(&parentDs, data, size);
2726
2.85k
        auto module = getModule(parentDs);
2727
2.85k
        if ( module == nullptr ) {
2728
2.61k
            continue;
2729
2.61k
        }
2730
2731
239
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
239
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.85k
    } while ( parentDs.Get<bool>() == true );
2738
2739
134
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
125
#if 1
2745
125
    {
2746
125
        std::set<uint64_t> moduleIDs;
2747
125
        for (const auto& m : modules ) {
2748
92
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
92
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
92
            moduleIDs.insert(moduleID);
2756
92
        }
2757
2758
125
        std::set<uint64_t> operationModuleIDs;
2759
136
        for (const auto& op : operations) {
2760
136
            operationModuleIDs.insert(op.first->ID);
2761
136
        }
2762
2763
125
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
125
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
125
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
125
        for (const auto& id : addModuleIDs) {
2768
33
            operations.push_back({ modules.at(id), operations[0].second});
2769
33
        }
2770
125
    }
2771
125
#endif
2772
2773
125
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
125
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
294
    for (size_t i = 0; i < operations.size(); i++) {
2781
169
        auto& operation = operations[i];
2782
2783
169
        auto& module = operation.first;
2784
169
        auto& op = operation.second;
2785
2786
169
        if ( i > 0 ) {
2787
123
            auto& prevModule = operations[i-1].first;
2788
123
            auto& prevOp = operations[i].second;
2789
2790
123
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
67
                auto& curModifier = op.modifier.GetVectorPtr();
2792
67
                if ( curModifier.size() == 0 ) {
2793
14.3k
                    for (size_t j = 0; j < 512; j++) {
2794
14.3k
                        curModifier.push_back(1);
2795
14.3k
                    }
2796
39
                } else {
2797
320
                    for (auto& c : curModifier) {
2798
320
                        c++;
2799
320
                    }
2800
39
                }
2801
67
            }
2802
123
        }
2803
2804
169
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
169
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
169
        const auto& result = results.back();
2811
2812
169
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
169
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
169
        if ( options.disableTests == false ) {
2830
169
            tests::test(op, result.second);
2831
169
        }
2832
2833
169
        postprocess(module, op, result);
2834
169
    }
2835
2836
125
    if ( options.noCompare == false ) {
2837
46
        compare(operations, results, data, size);
2838
46
    }
2839
125
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
161
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
161
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
161
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.24k
    do {
2725
2.24k
        auto op = getOp(&parentDs, data, size);
2726
2.24k
        auto module = getModule(parentDs);
2727
2.24k
        if ( module == nullptr ) {
2728
1.95k
            continue;
2729
1.95k
        }
2730
2731
287
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
287
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.23k
    } while ( parentDs.Get<bool>() == true );
2738
2739
161
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
155
#if 1
2745
155
    {
2746
155
        std::set<uint64_t> moduleIDs;
2747
155
        for (const auto& m : modules ) {
2748
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
155
        std::set<uint64_t> operationModuleIDs;
2759
184
        for (const auto& op : operations) {
2760
184
            operationModuleIDs.insert(op.first->ID);
2761
184
        }
2762
2763
155
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
155
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
155
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
155
        for (const auto& id : addModuleIDs) {
2768
57
            operations.push_back({ modules.at(id), operations[0].second});
2769
57
        }
2770
155
    }
2771
155
#endif
2772
2773
155
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
155
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
396
    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
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
96
                auto& curModifier = op.modifier.GetVectorPtr();
2792
96
                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
56
                } else {
2797
630
                    for (auto& c : curModifier) {
2798
630
                        c++;
2799
630
                    }
2800
56
                }
2801
96
            }
2802
172
        }
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
24
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
24
        }
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
155
    if ( options.noCompare == false ) {
2837
69
        compare(operations, results, data, size);
2838
69
    }
2839
155
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
180
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
180
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
180
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.30k
    do {
2725
2.30k
        auto op = getOp(&parentDs, data, size);
2726
2.30k
        auto module = getModule(parentDs);
2727
2.30k
        if ( module == nullptr ) {
2728
1.98k
            continue;
2729
1.98k
        }
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
6
            break;
2736
6
        }
2737
2.30k
    } while ( parentDs.Get<bool>() == true );
2738
2739
180
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
174
#if 1
2745
174
    {
2746
174
        std::set<uint64_t> moduleIDs;
2747
174
        for (const auto& m : modules ) {
2748
170
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
170
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
170
            moduleIDs.insert(moduleID);
2756
170
        }
2757
2758
174
        std::set<uint64_t> operationModuleIDs;
2759
218
        for (const auto& op : operations) {
2760
218
            operationModuleIDs.insert(op.first->ID);
2761
218
        }
2762
2763
174
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
174
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
174
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
174
        for (const auto& id : addModuleIDs) {
2768
73
            operations.push_back({ modules.at(id), operations[0].second});
2769
73
        }
2770
174
    }
2771
174
#endif
2772
2773
174
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
174
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
465
    for (size_t i = 0; i < operations.size(); i++) {
2781
291
        auto& operation = operations[i];
2782
2783
291
        auto& module = operation.first;
2784
291
        auto& op = operation.second;
2785
2786
291
        if ( i > 0 ) {
2787
206
            auto& prevModule = operations[i-1].first;
2788
206
            auto& prevOp = operations[i].second;
2789
2790
206
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
115
                auto& curModifier = op.modifier.GetVectorPtr();
2792
115
                if ( curModifier.size() == 0 ) {
2793
42.0k
                    for (size_t j = 0; j < 512; j++) {
2794
41.9k
                        curModifier.push_back(1);
2795
41.9k
                    }
2796
82
                } else {
2797
1.18k
                    for (auto& c : curModifier) {
2798
1.18k
                        c++;
2799
1.18k
                    }
2800
33
                }
2801
115
            }
2802
206
        }
2803
2804
291
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
291
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
291
        const auto& result = results.back();
2811
2812
291
        if ( result.second != std::nullopt ) {
2813
50
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
50
        }
2820
2821
291
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
291
        if ( options.disableTests == false ) {
2830
291
            tests::test(op, result.second);
2831
291
        }
2832
2833
291
        postprocess(module, op, result);
2834
291
    }
2835
2836
174
    if ( options.noCompare == false ) {
2837
85
        compare(operations, results, data, size);
2838
85
    }
2839
174
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::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
2.71k
    do {
2725
2.71k
        auto op = getOp(&parentDs, data, size);
2726
2.71k
        auto module = getModule(parentDs);
2727
2.71k
        if ( module == nullptr ) {
2728
2.27k
            continue;
2729
2.27k
        }
2730
2731
438
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
438
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
2.70k
    } while ( parentDs.Get<bool>() == true );
2738
2739
236
    if ( operations.empty() == true ) {
2740
3
        return;
2741
3
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
233
#if 1
2745
233
    {
2746
233
        std::set<uint64_t> moduleIDs;
2747
320
        for (const auto& m : modules ) {
2748
320
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
320
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
320
            moduleIDs.insert(moduleID);
2756
320
        }
2757
2758
233
        std::set<uint64_t> operationModuleIDs;
2759
361
        for (const auto& op : operations) {
2760
361
            operationModuleIDs.insert(op.first->ID);
2761
361
        }
2762
2763
233
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
233
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
233
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
233
        for (const auto& id : addModuleIDs) {
2768
145
            operations.push_back({ modules.at(id), operations[0].second});
2769
145
        }
2770
233
    }
2771
233
#endif
2772
2773
233
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
233
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
739
    for (size_t i = 0; i < operations.size(); i++) {
2781
506
        auto& operation = operations[i];
2782
2783
506
        auto& module = operation.first;
2784
506
        auto& op = operation.second;
2785
2786
506
        if ( i > 0 ) {
2787
346
            auto& prevModule = operations[i-1].first;
2788
346
            auto& prevOp = operations[i].second;
2789
2790
346
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
176
                auto& curModifier = op.modifier.GetVectorPtr();
2792
176
                if ( curModifier.size() == 0 ) {
2793
67.7k
                    for (size_t j = 0; j < 512; j++) {
2794
67.5k
                        curModifier.push_back(1);
2795
67.5k
                    }
2796
132
                } else {
2797
308
                    for (auto& c : curModifier) {
2798
308
                        c++;
2799
308
                    }
2800
44
                }
2801
176
            }
2802
346
        }
2803
2804
506
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
506
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
506
        const auto& result = results.back();
2811
2812
506
        if ( result.second != std::nullopt ) {
2813
148
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
148
        }
2820
2821
506
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
506
        if ( options.disableTests == false ) {
2830
506
            tests::test(op, result.second);
2831
506
        }
2832
2833
506
        postprocess(module, op, result);
2834
506
    }
2835
2836
233
    if ( options.noCompare == false ) {
2837
160
        compare(operations, results, data, size);
2838
160
    }
2839
233
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::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
1.92k
    do {
2725
1.92k
        auto op = getOp(&parentDs, data, size);
2726
1.92k
        auto module = getModule(parentDs);
2727
1.92k
        if ( module == nullptr ) {
2728
1.67k
            continue;
2729
1.67k
        }
2730
2731
252
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
252
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.92k
    } while ( parentDs.Get<bool>() == true );
2738
2739
191
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
182
#if 1
2745
182
    {
2746
182
        std::set<uint64_t> moduleIDs;
2747
182
        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
182
        std::set<uint64_t> operationModuleIDs;
2759
182
        for (const auto& op : operations) {
2760
164
            operationModuleIDs.insert(op.first->ID);
2761
164
        }
2762
2763
182
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
182
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
182
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
182
        for (const auto& id : addModuleIDs) {
2768
54
            operations.push_back({ modules.at(id), operations[0].second});
2769
54
        }
2770
182
    }
2771
182
#endif
2772
2773
182
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
182
    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
218
        auto& operation = operations[i];
2782
2783
218
        auto& module = operation.first;
2784
218
        auto& op = operation.second;
2785
2786
218
        if ( i > 0 ) {
2787
154
            auto& prevModule = operations[i-1].first;
2788
154
            auto& prevOp = operations[i].second;
2789
2790
154
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
84
                auto& curModifier = op.modifier.GetVectorPtr();
2792
84
                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
290
                    for (auto& c : curModifier) {
2798
290
                        c++;
2799
290
                    }
2800
21
                }
2801
84
            }
2802
154
        }
2803
2804
218
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
218
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
218
        const auto& result = results.back();
2811
2812
218
        if ( result.second != std::nullopt ) {
2813
37
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
37
        }
2820
2821
218
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
218
        if ( options.disableTests == false ) {
2830
218
            tests::test(op, result.second);
2831
218
        }
2832
2833
218
        postprocess(module, op, result);
2834
218
    }
2835
2836
182
    if ( options.noCompare == false ) {
2837
64
        compare(operations, results, data, size);
2838
64
    }
2839
182
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::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
1.82k
    do {
2725
1.82k
        auto op = getOp(&parentDs, data, size);
2726
1.82k
        auto module = getModule(parentDs);
2727
1.82k
        if ( module == nullptr ) {
2728
1.55k
            continue;
2729
1.55k
        }
2730
2731
269
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
269
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
1.81k
    } while ( parentDs.Get<bool>() == true );
2738
2739
218
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
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
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
207
        std::set<uint64_t> operationModuleIDs;
2759
207
        for (const auto& op : operations) {
2760
178
            operationModuleIDs.insert(op.first->ID);
2761
178
        }
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
59
            operations.push_back({ modules.at(id), operations[0].second});
2769
59
        }
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
444
    for (size_t i = 0; i < operations.size(); i++) {
2781
237
        auto& operation = operations[i];
2782
2783
237
        auto& module = operation.first;
2784
237
        auto& op = operation.second;
2785
2786
237
        if ( i > 0 ) {
2787
165
            auto& prevModule = operations[i-1].first;
2788
165
            auto& prevOp = operations[i].second;
2789
2790
165
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
83
                auto& curModifier = op.modifier.GetVectorPtr();
2792
83
                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
264
                    for (auto& c : curModifier) {
2798
264
                        c++;
2799
264
                    }
2800
25
                }
2801
83
            }
2802
165
        }
2803
2804
237
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
237
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
237
        const auto& result = results.back();
2811
2812
237
        if ( result.second != std::nullopt ) {
2813
33
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
33
        }
2820
2821
237
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
237
        if ( options.disableTests == false ) {
2830
237
            tests::test(op, result.second);
2831
237
        }
2832
2833
237
        postprocess(module, op, result);
2834
237
    }
2835
2836
207
    if ( options.noCompare == false ) {
2837
72
        compare(operations, results, data, size);
2838
72
    }
2839
207
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
139
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
139
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
139
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.90k
    do {
2725
1.90k
        auto op = getOp(&parentDs, data, size);
2726
1.90k
        auto module = getModule(parentDs);
2727
1.90k
        if ( module == nullptr ) {
2728
1.63k
            continue;
2729
1.63k
        }
2730
2731
274
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
274
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.89k
    } while ( parentDs.Get<bool>() == true );
2738
2739
139
    if ( operations.empty() == true ) {
2740
3
        return;
2741
3
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
136
#if 1
2745
136
    {
2746
136
        std::set<uint64_t> moduleIDs;
2747
136
        for (const auto& m : modules ) {
2748
116
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
116
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
116
            moduleIDs.insert(moduleID);
2756
116
        }
2757
2758
136
        std::set<uint64_t> operationModuleIDs;
2759
166
        for (const auto& op : operations) {
2760
166
            operationModuleIDs.insert(op.first->ID);
2761
166
        }
2762
2763
136
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
136
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
136
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
136
        for (const auto& id : addModuleIDs) {
2768
47
            operations.push_back({ modules.at(id), operations[0].second});
2769
47
        }
2770
136
    }
2771
136
#endif
2772
2773
136
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
136
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
349
    for (size_t i = 0; i < operations.size(); i++) {
2781
213
        auto& operation = operations[i];
2782
2783
213
        auto& module = operation.first;
2784
213
        auto& op = operation.second;
2785
2786
213
        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
89
                auto& curModifier = op.modifier.GetVectorPtr();
2792
89
                if ( curModifier.size() == 0 ) {
2793
27.7k
                    for (size_t j = 0; j < 512; j++) {
2794
27.6k
                        curModifier.push_back(1);
2795
27.6k
                    }
2796
54
                } else {
2797
262
                    for (auto& c : curModifier) {
2798
262
                        c++;
2799
262
                    }
2800
35
                }
2801
89
            }
2802
155
        }
2803
2804
213
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
213
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
213
        const auto& result = results.back();
2811
2812
213
        if ( result.second != std::nullopt ) {
2813
21
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
21
        }
2820
2821
213
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
213
        if ( options.disableTests == false ) {
2830
213
            tests::test(op, result.second);
2831
213
        }
2832
2833
213
        postprocess(module, op, result);
2834
213
    }
2835
2836
136
    if ( options.noCompare == false ) {
2837
58
        compare(operations, results, data, size);
2838
58
    }
2839
136
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
143
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
143
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
143
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.45k
    do {
2725
2.45k
        auto op = getOp(&parentDs, data, size);
2726
2.45k
        auto module = getModule(parentDs);
2727
2.45k
        if ( module == nullptr ) {
2728
2.22k
            continue;
2729
2.22k
        }
2730
2731
237
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
237
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.45k
    } while ( parentDs.Get<bool>() == true );
2738
2739
143
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
133
#if 1
2745
133
    {
2746
133
        std::set<uint64_t> moduleIDs;
2747
133
        for (const auto& m : modules ) {
2748
98
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
98
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
98
            moduleIDs.insert(moduleID);
2756
98
        }
2757
2758
133
        std::set<uint64_t> operationModuleIDs;
2759
133
        for (const auto& op : operations) {
2760
131
            operationModuleIDs.insert(op.first->ID);
2761
131
        }
2762
2763
133
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
133
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
133
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
133
        for (const auto& id : addModuleIDs) {
2768
37
            operations.push_back({ modules.at(id), operations[0].second});
2769
37
        }
2770
133
    }
2771
133
#endif
2772
2773
133
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
133
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
301
    for (size_t i = 0; i < operations.size(); i++) {
2781
168
        auto& operation = operations[i];
2782
2783
168
        auto& module = operation.first;
2784
168
        auto& op = operation.second;
2785
2786
168
        if ( i > 0 ) {
2787
119
            auto& prevModule = operations[i-1].first;
2788
119
            auto& prevOp = operations[i].second;
2789
2790
119
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
64
                auto& curModifier = op.modifier.GetVectorPtr();
2792
64
                if ( curModifier.size() == 0 ) {
2793
18.4k
                    for (size_t j = 0; j < 512; j++) {
2794
18.4k
                        curModifier.push_back(1);
2795
18.4k
                    }
2796
36
                } else {
2797
259
                    for (auto& c : curModifier) {
2798
259
                        c++;
2799
259
                    }
2800
28
                }
2801
64
            }
2802
119
        }
2803
2804
168
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
168
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
168
        const auto& result = results.back();
2811
2812
168
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
168
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
168
        if ( options.disableTests == false ) {
2830
168
            tests::test(op, result.second);
2831
168
        }
2832
2833
168
        postprocess(module, op, result);
2834
168
    }
2835
2836
133
    if ( options.noCompare == false ) {
2837
49
        compare(operations, results, data, size);
2838
49
    }
2839
133
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::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.30k
    do {
2725
3.30k
        auto op = getOp(&parentDs, data, size);
2726
3.30k
        auto module = getModule(parentDs);
2727
3.30k
        if ( module == nullptr ) {
2728
2.73k
            continue;
2729
2.73k
        }
2730
2731
570
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
570
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
3.28k
    } while ( parentDs.Get<bool>() == true );
2738
2739
354
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
339
#if 1
2745
339
    {
2746
339
        std::set<uint64_t> moduleIDs;
2747
386
        for (const auto& m : modules ) {
2748
386
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
386
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
386
            moduleIDs.insert(moduleID);
2756
386
        }
2757
2758
339
        std::set<uint64_t> operationModuleIDs;
2759
438
        for (const auto& op : operations) {
2760
438
            operationModuleIDs.insert(op.first->ID);
2761
438
        }
2762
2763
339
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
339
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
339
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
339
        for (const auto& id : addModuleIDs) {
2768
179
            operations.push_back({ modules.at(id), operations[0].second});
2769
179
        }
2770
339
    }
2771
339
#endif
2772
2773
339
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
339
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
956
    for (size_t i = 0; i < operations.size(); i++) {
2781
617
        auto& operation = operations[i];
2782
2783
617
        auto& module = operation.first;
2784
617
        auto& op = operation.second;
2785
2786
617
        if ( i > 0 ) {
2787
424
            auto& prevModule = operations[i-1].first;
2788
424
            auto& prevOp = operations[i].second;
2789
2790
424
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
223
                auto& curModifier = op.modifier.GetVectorPtr();
2792
223
                if ( curModifier.size() == 0 ) {
2793
61.0k
                    for (size_t j = 0; j < 512; j++) {
2794
60.9k
                        curModifier.push_back(1);
2795
60.9k
                    }
2796
119
                } else {
2797
20.6k
                    for (auto& c : curModifier) {
2798
20.6k
                        c++;
2799
20.6k
                    }
2800
104
                }
2801
223
            }
2802
424
        }
2803
2804
617
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
617
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
617
        const auto& result = results.back();
2811
2812
617
        if ( result.second != std::nullopt ) {
2813
37
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
37
        }
2820
2821
617
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
617
        if ( options.disableTests == false ) {
2830
617
            tests::test(op, result.second);
2831
617
        }
2832
2833
617
        postprocess(module, op, result);
2834
617
    }
2835
2836
339
    if ( options.noCompare == false ) {
2837
193
        compare(operations, results, data, size);
2838
193
    }
2839
339
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
7.09k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
7.09k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
7.09k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
16.7k
    do {
2725
16.7k
        auto op = getOp(&parentDs, data, size);
2726
16.7k
        auto module = getModule(parentDs);
2727
16.7k
        if ( module == nullptr ) {
2728
7.35k
            continue;
2729
7.35k
        }
2730
2731
9.43k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
9.43k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
110
            break;
2736
110
        }
2737
16.6k
    } while ( parentDs.Get<bool>() == true );
2738
2739
7.09k
    if ( operations.empty() == true ) {
2740
39
        return;
2741
39
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
7.05k
#if 1
2745
7.05k
    {
2746
7.05k
        std::set<uint64_t> moduleIDs;
2747
13.4k
        for (const auto& m : modules ) {
2748
13.4k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
13.4k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
13.4k
            moduleIDs.insert(moduleID);
2756
13.4k
        }
2757
2758
7.05k
        std::set<uint64_t> operationModuleIDs;
2759
9.12k
        for (const auto& op : operations) {
2760
9.12k
            operationModuleIDs.insert(op.first->ID);
2761
9.12k
        }
2762
2763
7.05k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
7.05k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
7.05k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
7.05k
        for (const auto& id : addModuleIDs) {
2768
6.70k
            operations.push_back({ modules.at(id), operations[0].second});
2769
6.70k
        }
2770
7.05k
    }
2771
7.05k
#endif
2772
2773
7.05k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
7.05k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
22.8k
    for (size_t i = 0; i < operations.size(); i++) {
2781
15.8k
        auto& operation = operations[i];
2782
2783
15.8k
        auto& module = operation.first;
2784
15.8k
        auto& op = operation.second;
2785
2786
15.8k
        if ( i > 0 ) {
2787
9.10k
            auto& prevModule = operations[i-1].first;
2788
9.10k
            auto& prevOp = operations[i].second;
2789
2790
9.10k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2.37k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2.37k
                if ( curModifier.size() == 0 ) {
2793
686k
                    for (size_t j = 0; j < 512; j++) {
2794
685k
                        curModifier.push_back(1);
2795
685k
                    }
2796
1.33k
                } else {
2797
49.0k
                    for (auto& c : curModifier) {
2798
49.0k
                        c++;
2799
49.0k
                    }
2800
1.03k
                }
2801
2.37k
            }
2802
9.10k
        }
2803
2804
15.8k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
15.8k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
15.8k
        const auto& result = results.back();
2811
2812
15.8k
        if ( result.second != std::nullopt ) {
2813
3.78k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
3.78k
        }
2820
2821
15.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
15.8k
        if ( options.disableTests == false ) {
2830
15.8k
            tests::test(op, result.second);
2831
15.8k
        }
2832
2833
15.8k
        postprocess(module, op, result);
2834
15.8k
    }
2835
2836
7.05k
    if ( options.noCompare == false ) {
2837
6.72k
        compare(operations, results, data, size);
2838
6.72k
    }
2839
7.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
142
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
142
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
142
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.02k
    do {
2725
2.02k
        auto op = getOp(&parentDs, data, size);
2726
2.02k
        auto module = getModule(parentDs);
2727
2.02k
        if ( module == nullptr ) {
2728
1.76k
            continue;
2729
1.76k
        }
2730
2731
254
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
254
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.01k
    } while ( parentDs.Get<bool>() == true );
2738
2739
142
    if ( operations.empty() == true ) {
2740
3
        return;
2741
3
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
139
#if 1
2745
139
    {
2746
139
        std::set<uint64_t> moduleIDs;
2747
158
        for (const auto& m : modules ) {
2748
158
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
158
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
158
            moduleIDs.insert(moduleID);
2756
158
        }
2757
2758
139
        std::set<uint64_t> operationModuleIDs;
2759
166
        for (const auto& op : operations) {
2760
166
            operationModuleIDs.insert(op.first->ID);
2761
166
        }
2762
2763
139
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
139
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
139
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
139
        for (const auto& id : addModuleIDs) {
2768
68
            operations.push_back({ modules.at(id), operations[0].second});
2769
68
        }
2770
139
    }
2771
139
#endif
2772
2773
139
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
139
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
373
    for (size_t i = 0; i < operations.size(); i++) {
2781
234
        auto& operation = operations[i];
2782
2783
234
        auto& module = operation.first;
2784
234
        auto& op = operation.second;
2785
2786
234
        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
70
                auto& curModifier = op.modifier.GetVectorPtr();
2792
70
                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
44
                } else {
2797
329
                    for (auto& c : curModifier) {
2798
329
                        c++;
2799
329
                    }
2800
26
                }
2801
70
            }
2802
155
        }
2803
2804
234
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
234
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
234
        const auto& result = results.back();
2811
2812
234
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
234
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
234
        if ( options.disableTests == false ) {
2830
234
            tests::test(op, result.second);
2831
234
        }
2832
2833
234
        postprocess(module, op, result);
2834
234
    }
2835
2836
139
    if ( options.noCompare == false ) {
2837
79
        compare(operations, results, data, size);
2838
79
    }
2839
139
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
323
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
323
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
323
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.47k
    do {
2725
2.47k
        auto op = getOp(&parentDs, data, size);
2726
2.47k
        auto module = getModule(parentDs);
2727
2.47k
        if ( module == nullptr ) {
2728
1.88k
            continue;
2729
1.88k
        }
2730
2731
590
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
590
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
2.46k
    } while ( parentDs.Get<bool>() == true );
2738
2739
323
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
318
#if 1
2745
318
    {
2746
318
        std::set<uint64_t> moduleIDs;
2747
460
        for (const auto& m : modules ) {
2748
460
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
460
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
460
            moduleIDs.insert(moduleID);
2756
460
        }
2757
2758
318
        std::set<uint64_t> operationModuleIDs;
2759
470
        for (const auto& op : operations) {
2760
470
            operationModuleIDs.insert(op.first->ID);
2761
470
        }
2762
2763
318
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
318
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
318
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
318
        for (const auto& id : addModuleIDs) {
2768
219
            operations.push_back({ modules.at(id), operations[0].second});
2769
219
        }
2770
318
    }
2771
318
#endif
2772
2773
318
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
318
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.00k
    for (size_t i = 0; i < operations.size(); i++) {
2781
689
        auto& operation = operations[i];
2782
2783
689
        auto& module = operation.first;
2784
689
        auto& op = operation.second;
2785
2786
689
        if ( i > 0 ) {
2787
459
            auto& prevModule = operations[i-1].first;
2788
459
            auto& prevOp = operations[i].second;
2789
2790
459
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
223
                auto& curModifier = op.modifier.GetVectorPtr();
2792
223
                if ( curModifier.size() == 0 ) {
2793
98.4k
                    for (size_t j = 0; j < 512; j++) {
2794
98.3k
                        curModifier.push_back(1);
2795
98.3k
                    }
2796
192
                } else {
2797
640
                    for (auto& c : curModifier) {
2798
640
                        c++;
2799
640
                    }
2800
31
                }
2801
223
            }
2802
459
        }
2803
2804
689
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
689
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
689
        const auto& result = results.back();
2811
2812
689
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
689
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
689
        if ( options.disableTests == false ) {
2830
689
            tests::test(op, result.second);
2831
689
        }
2832
2833
689
        postprocess(module, op, result);
2834
689
    }
2835
2836
318
    if ( options.noCompare == false ) {
2837
230
        compare(operations, results, data, size);
2838
230
    }
2839
318
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
114
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
114
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
114
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.29k
    do {
2725
1.29k
        auto op = getOp(&parentDs, data, size);
2726
1.29k
        auto module = getModule(parentDs);
2727
1.29k
        if ( module == nullptr ) {
2728
1.11k
            continue;
2729
1.11k
        }
2730
2731
181
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
181
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
1.28k
    } while ( parentDs.Get<bool>() == true );
2738
2739
114
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
108
#if 1
2745
108
    {
2746
108
        std::set<uint64_t> moduleIDs;
2747
108
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
108
        std::set<uint64_t> operationModuleIDs;
2759
108
        for (const auto& op : operations) {
2760
103
            operationModuleIDs.insert(op.first->ID);
2761
103
        }
2762
2763
108
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
108
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
108
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
108
        for (const auto& id : addModuleIDs) {
2768
25
            operations.push_back({ modules.at(id), operations[0].second});
2769
25
        }
2770
108
    }
2771
108
#endif
2772
2773
108
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
108
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
236
    for (size_t i = 0; i < operations.size(); i++) {
2781
128
        auto& operation = operations[i];
2782
2783
128
        auto& module = operation.first;
2784
128
        auto& op = operation.second;
2785
2786
128
        if ( i > 0 ) {
2787
92
            auto& prevModule = operations[i-1].first;
2788
92
            auto& prevOp = operations[i].second;
2789
2790
92
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
50
                auto& curModifier = op.modifier.GetVectorPtr();
2792
50
                if ( curModifier.size() == 0 ) {
2793
12.8k
                    for (size_t j = 0; j < 512; j++) {
2794
12.8k
                        curModifier.push_back(1);
2795
12.8k
                    }
2796
25
                } else {
2797
271
                    for (auto& c : curModifier) {
2798
271
                        c++;
2799
271
                    }
2800
25
                }
2801
50
            }
2802
92
        }
2803
2804
128
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
128
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
128
        const auto& result = results.back();
2811
2812
128
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
128
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
128
        if ( options.disableTests == false ) {
2830
128
            tests::test(op, result.second);
2831
128
        }
2832
2833
128
        postprocess(module, op, result);
2834
128
    }
2835
2836
108
    if ( options.noCompare == false ) {
2837
36
        compare(operations, results, data, size);
2838
36
    }
2839
108
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
119
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
119
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
119
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.64k
    do {
2725
1.64k
        auto op = getOp(&parentDs, data, size);
2726
1.64k
        auto module = getModule(parentDs);
2727
1.64k
        if ( module == nullptr ) {
2728
1.47k
            continue;
2729
1.47k
        }
2730
2731
172
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
172
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
1.64k
    } while ( parentDs.Get<bool>() == true );
2738
2739
119
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
112
#if 1
2745
112
    {
2746
112
        std::set<uint64_t> moduleIDs;
2747
112
        for (const auto& m : modules ) {
2748
84
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
84
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
84
            moduleIDs.insert(moduleID);
2756
84
        }
2757
2758
112
        std::set<uint64_t> operationModuleIDs;
2759
112
        for (const auto& op : operations) {
2760
107
            operationModuleIDs.insert(op.first->ID);
2761
107
        }
2762
2763
112
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
112
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
112
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
112
        for (const auto& id : addModuleIDs) {
2768
31
            operations.push_back({ modules.at(id), operations[0].second});
2769
31
        }
2770
112
    }
2771
112
#endif
2772
2773
112
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
112
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
250
    for (size_t i = 0; i < operations.size(); i++) {
2781
138
        auto& operation = operations[i];
2782
2783
138
        auto& module = operation.first;
2784
138
        auto& op = operation.second;
2785
2786
138
        if ( i > 0 ) {
2787
96
            auto& prevModule = operations[i-1].first;
2788
96
            auto& prevOp = operations[i].second;
2789
2790
96
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
48
                auto& curModifier = op.modifier.GetVectorPtr();
2792
48
                if ( curModifier.size() == 0 ) {
2793
13.8k
                    for (size_t j = 0; j < 512; j++) {
2794
13.8k
                        curModifier.push_back(1);
2795
13.8k
                    }
2796
27
                } else {
2797
257
                    for (auto& c : curModifier) {
2798
257
                        c++;
2799
257
                    }
2800
21
                }
2801
48
            }
2802
96
        }
2803
2804
138
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
138
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
138
        const auto& result = results.back();
2811
2812
138
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
138
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
138
        if ( options.disableTests == false ) {
2830
138
            tests::test(op, result.second);
2831
138
        }
2832
2833
138
        postprocess(module, op, result);
2834
138
    }
2835
2836
112
    if ( options.noCompare == false ) {
2837
42
        compare(operations, results, data, size);
2838
42
    }
2839
112
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
131
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
131
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
131
    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.52k
            continue;
2729
2.52k
        }
2730
2731
240
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
240
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.76k
    } while ( parentDs.Get<bool>() == true );
2738
2739
131
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
123
#if 1
2745
123
    {
2746
123
        std::set<uint64_t> moduleIDs;
2747
123
        for (const auto& m : modules ) {
2748
86
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
86
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
86
            moduleIDs.insert(moduleID);
2756
86
        }
2757
2758
123
        std::set<uint64_t> operationModuleIDs;
2759
123
        for (const auto& op : operations) {
2760
123
            operationModuleIDs.insert(op.first->ID);
2761
123
        }
2762
2763
123
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
123
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
123
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
123
        for (const auto& id : addModuleIDs) {
2768
31
            operations.push_back({ modules.at(id), operations[0].second});
2769
31
        }
2770
123
    }
2771
123
#endif
2772
2773
123
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
123
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
277
    for (size_t i = 0; i < operations.size(); i++) {
2781
154
        auto& operation = operations[i];
2782
2783
154
        auto& module = operation.first;
2784
154
        auto& op = operation.second;
2785
2786
154
        if ( i > 0 ) {
2787
111
            auto& prevModule = operations[i-1].first;
2788
111
            auto& prevOp = operations[i].second;
2789
2790
111
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
59
                auto& curModifier = op.modifier.GetVectorPtr();
2792
59
                if ( curModifier.size() == 0 ) {
2793
11.7k
                    for (size_t j = 0; j < 512; j++) {
2794
11.7k
                        curModifier.push_back(1);
2795
11.7k
                    }
2796
36
                } else {
2797
330
                    for (auto& c : curModifier) {
2798
330
                        c++;
2799
330
                    }
2800
36
                }
2801
59
            }
2802
111
        }
2803
2804
154
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
154
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
154
        const auto& result = results.back();
2811
2812
154
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
154
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
154
        if ( options.disableTests == false ) {
2830
154
            tests::test(op, result.second);
2831
154
        }
2832
2833
154
        postprocess(module, op, result);
2834
154
    }
2835
2836
123
    if ( options.noCompare == false ) {
2837
43
        compare(operations, results, data, size);
2838
43
    }
2839
123
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
117
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
117
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
117
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.51k
    do {
2725
2.51k
        auto op = getOp(&parentDs, data, size);
2726
2.51k
        auto module = getModule(parentDs);
2727
2.51k
        if ( module == nullptr ) {
2728
2.29k
            continue;
2729
2.29k
        }
2730
2731
219
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
219
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.50k
    } while ( parentDs.Get<bool>() == true );
2738
2739
117
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
104
#if 1
2745
104
    {
2746
104
        std::set<uint64_t> moduleIDs;
2747
104
        for (const auto& m : modules ) {
2748
80
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
80
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
80
            moduleIDs.insert(moduleID);
2756
80
        }
2757
2758
104
        std::set<uint64_t> operationModuleIDs;
2759
129
        for (const auto& op : operations) {
2760
129
            operationModuleIDs.insert(op.first->ID);
2761
129
        }
2762
2763
104
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
104
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
104
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
104
        for (const auto& id : addModuleIDs) {
2768
28
            operations.push_back({ modules.at(id), operations[0].second});
2769
28
        }
2770
104
    }
2771
104
#endif
2772
2773
104
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
104
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
261
    for (size_t i = 0; i < operations.size(); i++) {
2781
157
        auto& operation = operations[i];
2782
2783
157
        auto& module = operation.first;
2784
157
        auto& op = operation.second;
2785
2786
157
        if ( i > 0 ) {
2787
117
            auto& prevModule = operations[i-1].first;
2788
117
            auto& prevOp = operations[i].second;
2789
2790
117
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
71
                auto& curModifier = op.modifier.GetVectorPtr();
2792
71
                if ( curModifier.size() == 0 ) {
2793
12.3k
                    for (size_t j = 0; j < 512; j++) {
2794
12.2k
                        curModifier.push_back(1);
2795
12.2k
                    }
2796
47
                } else {
2797
343
                    for (auto& c : curModifier) {
2798
343
                        c++;
2799
343
                    }
2800
47
                }
2801
71
            }
2802
117
        }
2803
2804
157
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
157
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
157
        const auto& result = results.back();
2811
2812
157
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
157
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
157
        if ( options.disableTests == false ) {
2830
157
            tests::test(op, result.second);
2831
157
        }
2832
2833
157
        postprocess(module, op, result);
2834
157
    }
2835
2836
104
    if ( options.noCompare == false ) {
2837
40
        compare(operations, results, data, size);
2838
40
    }
2839
104
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::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
2.02k
    do {
2725
2.02k
        auto op = getOp(&parentDs, data, size);
2726
2.02k
        auto module = getModule(parentDs);
2727
2.02k
        if ( module == nullptr ) {
2728
1.72k
            continue;
2729
1.72k
        }
2730
2731
303
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
303
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.01k
    } while ( parentDs.Get<bool>() == true );
2738
2739
233
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
225
#if 1
2745
225
    {
2746
225
        std::set<uint64_t> moduleIDs;
2747
225
        for (const auto& m : modules ) {
2748
102
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
102
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
102
            moduleIDs.insert(moduleID);
2756
102
        }
2757
2758
225
        std::set<uint64_t> operationModuleIDs;
2759
225
        for (const auto& op : operations) {
2760
128
            operationModuleIDs.insert(op.first->ID);
2761
128
        }
2762
2763
225
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
225
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
225
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
225
        for (const auto& id : addModuleIDs) {
2768
40
            operations.push_back({ modules.at(id), operations[0].second});
2769
40
        }
2770
225
    }
2771
225
#endif
2772
2773
225
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
225
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
393
    for (size_t i = 0; i < operations.size(); i++) {
2781
168
        auto& operation = operations[i];
2782
2783
168
        auto& module = operation.first;
2784
168
        auto& op = operation.second;
2785
2786
168
        if ( i > 0 ) {
2787
117
            auto& prevModule = operations[i-1].first;
2788
117
            auto& prevOp = operations[i].second;
2789
2790
117
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
58
                auto& curModifier = op.modifier.GetVectorPtr();
2792
58
                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
38
                } else {
2797
498
                    for (auto& c : curModifier) {
2798
498
                        c++;
2799
498
                    }
2800
20
                }
2801
58
            }
2802
117
        }
2803
2804
168
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
168
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
168
        const auto& result = results.back();
2811
2812
168
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
168
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
168
        if ( options.disableTests == false ) {
2830
168
            tests::test(op, result.second);
2831
168
        }
2832
2833
168
        postprocess(module, op, result);
2834
168
    }
2835
2836
225
    if ( options.noCompare == false ) {
2837
51
        compare(operations, results, data, size);
2838
51
    }
2839
225
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
289
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
289
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
289
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.14k
    do {
2725
2.14k
        auto op = getOp(&parentDs, data, size);
2726
2.14k
        auto module = getModule(parentDs);
2727
2.14k
        if ( module == nullptr ) {
2728
1.85k
            continue;
2729
1.85k
        }
2730
2731
289
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
289
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.14k
    } while ( parentDs.Get<bool>() == true );
2738
2739
289
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
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
84
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
84
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
84
            moduleIDs.insert(moduleID);
2756
84
        }
2757
2758
279
        std::set<uint64_t> operationModuleIDs;
2759
279
        for (const auto& op : operations) {
2760
121
            operationModuleIDs.insert(op.first->ID);
2761
121
        }
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
31
            operations.push_back({ modules.at(id), operations[0].second});
2769
31
        }
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
431
    for (size_t i = 0; i < operations.size(); i++) {
2781
152
        auto& operation = operations[i];
2782
2783
152
        auto& module = operation.first;
2784
152
        auto& op = operation.second;
2785
2786
152
        if ( i > 0 ) {
2787
110
            auto& prevModule = operations[i-1].first;
2788
110
            auto& prevOp = operations[i].second;
2789
2790
110
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
62
                auto& curModifier = op.modifier.GetVectorPtr();
2792
62
                if ( curModifier.size() == 0 ) {
2793
18.4k
                    for (size_t j = 0; j < 512; j++) {
2794
18.4k
                        curModifier.push_back(1);
2795
18.4k
                    }
2796
36
                } else {
2797
297
                    for (auto& c : curModifier) {
2798
297
                        c++;
2799
297
                    }
2800
26
                }
2801
62
            }
2802
110
        }
2803
2804
152
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
152
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
152
        const auto& result = results.back();
2811
2812
152
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
152
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
152
        if ( options.disableTests == false ) {
2830
152
            tests::test(op, result.second);
2831
152
        }
2832
2833
152
        postprocess(module, op, result);
2834
152
    }
2835
2836
279
    if ( options.noCompare == false ) {
2837
42
        compare(operations, results, data, size);
2838
42
    }
2839
279
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::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
1.92k
    do {
2725
1.92k
        auto op = getOp(&parentDs, data, size);
2726
1.92k
        auto module = getModule(parentDs);
2727
1.92k
        if ( module == nullptr ) {
2728
1.64k
            continue;
2729
1.64k
        }
2730
2731
282
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
282
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.92k
    } while ( parentDs.Get<bool>() == true );
2738
2739
271
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
253
#if 1
2745
253
    {
2746
253
        std::set<uint64_t> moduleIDs;
2747
253
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
253
        std::set<uint64_t> operationModuleIDs;
2759
253
        for (const auto& op : operations) {
2760
108
            operationModuleIDs.insert(op.first->ID);
2761
108
        }
2762
2763
253
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
253
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
253
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
253
        for (const auto& id : addModuleIDs) {
2768
26
            operations.push_back({ modules.at(id), operations[0].second});
2769
26
        }
2770
253
    }
2771
253
#endif
2772
2773
253
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
253
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
387
    for (size_t i = 0; i < operations.size(); i++) {
2781
134
        auto& operation = operations[i];
2782
2783
134
        auto& module = operation.first;
2784
134
        auto& op = operation.second;
2785
2786
134
        if ( i > 0 ) {
2787
98
            auto& prevModule = operations[i-1].first;
2788
98
            auto& prevOp = operations[i].second;
2789
2790
98
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
56
                auto& curModifier = op.modifier.GetVectorPtr();
2792
56
                if ( curModifier.size() == 0 ) {
2793
17.4k
                    for (size_t j = 0; j < 512; j++) {
2794
17.4k
                        curModifier.push_back(1);
2795
17.4k
                    }
2796
34
                } else {
2797
268
                    for (auto& c : curModifier) {
2798
268
                        c++;
2799
268
                    }
2800
22
                }
2801
56
            }
2802
98
        }
2803
2804
134
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
134
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
134
        const auto& result = results.back();
2811
2812
134
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
134
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
134
        if ( options.disableTests == false ) {
2830
134
            tests::test(op, result.second);
2831
134
        }
2832
2833
134
        postprocess(module, op, result);
2834
134
    }
2835
2836
253
    if ( options.noCompare == false ) {
2837
36
        compare(operations, results, data, size);
2838
36
    }
2839
253
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
157
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
157
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
157
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.99k
    do {
2725
1.99k
        auto op = getOp(&parentDs, data, size);
2726
1.99k
        auto module = getModule(parentDs);
2727
1.99k
        if ( module == nullptr ) {
2728
1.79k
            continue;
2729
1.79k
        }
2730
2731
200
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
200
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.99k
    } while ( parentDs.Get<bool>() == true );
2738
2739
157
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
152
#if 1
2745
152
    {
2746
152
        std::set<uint64_t> moduleIDs;
2747
152
        for (const auto& m : modules ) {
2748
74
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
74
            moduleIDs.insert(moduleID);
2756
74
        }
2757
2758
152
        std::set<uint64_t> operationModuleIDs;
2759
152
        for (const auto& op : operations) {
2760
110
            operationModuleIDs.insert(op.first->ID);
2761
110
        }
2762
2763
152
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
152
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
152
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
152
        for (const auto& id : addModuleIDs) {
2768
25
            operations.push_back({ modules.at(id), operations[0].second});
2769
25
        }
2770
152
    }
2771
152
#endif
2772
2773
152
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
152
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
287
    for (size_t i = 0; i < operations.size(); i++) {
2781
135
        auto& operation = operations[i];
2782
2783
135
        auto& module = operation.first;
2784
135
        auto& op = operation.second;
2785
2786
135
        if ( i > 0 ) {
2787
98
            auto& prevModule = operations[i-1].first;
2788
98
            auto& prevOp = operations[i].second;
2789
2790
98
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
55
                auto& curModifier = op.modifier.GetVectorPtr();
2792
55
                if ( curModifier.size() == 0 ) {
2793
17.4k
                    for (size_t j = 0; j < 512; j++) {
2794
17.4k
                        curModifier.push_back(1);
2795
17.4k
                    }
2796
34
                } else {
2797
377
                    for (auto& c : curModifier) {
2798
377
                        c++;
2799
377
                    }
2800
21
                }
2801
55
            }
2802
98
        }
2803
2804
135
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
135
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
135
        const auto& result = results.back();
2811
2812
135
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
135
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
135
        if ( options.disableTests == false ) {
2830
135
            tests::test(op, result.second);
2831
135
        }
2832
2833
135
        postprocess(module, op, result);
2834
135
    }
2835
2836
152
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
152
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
136
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
136
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
136
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.06k
    do {
2725
2.06k
        auto op = getOp(&parentDs, data, size);
2726
2.06k
        auto module = getModule(parentDs);
2727
2.06k
        if ( module == nullptr ) {
2728
1.87k
            continue;
2729
1.87k
        }
2730
2731
193
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
193
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
2.06k
    } while ( parentDs.Get<bool>() == true );
2738
2739
136
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
131
#if 1
2745
131
    {
2746
131
        std::set<uint64_t> moduleIDs;
2747
131
        for (const auto& m : modules ) {
2748
56
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
56
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
56
            moduleIDs.insert(moduleID);
2756
56
        }
2757
2758
131
        std::set<uint64_t> operationModuleIDs;
2759
131
        for (const auto& op : operations) {
2760
87
            operationModuleIDs.insert(op.first->ID);
2761
87
        }
2762
2763
131
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
131
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
131
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
131
        for (const auto& id : addModuleIDs) {
2768
18
            operations.push_back({ modules.at(id), operations[0].second});
2769
18
        }
2770
131
    }
2771
131
#endif
2772
2773
131
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
131
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
236
    for (size_t i = 0; i < operations.size(); i++) {
2781
105
        auto& operation = operations[i];
2782
2783
105
        auto& module = operation.first;
2784
105
        auto& op = operation.second;
2785
2786
105
        if ( i > 0 ) {
2787
77
            auto& prevModule = operations[i-1].first;
2788
77
            auto& prevOp = operations[i].second;
2789
2790
77
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                if ( curModifier.size() == 0 ) {
2793
9.74k
                    for (size_t j = 0; j < 512; j++) {
2794
9.72k
                        curModifier.push_back(1);
2795
9.72k
                    }
2796
24
                } else {
2797
438
                    for (auto& c : curModifier) {
2798
438
                        c++;
2799
438
                    }
2800
24
                }
2801
43
            }
2802
77
        }
2803
2804
105
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
105
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
105
        const auto& result = results.back();
2811
2812
105
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
105
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
105
        if ( options.disableTests == false ) {
2830
105
            tests::test(op, result.second);
2831
105
        }
2832
2833
105
        postprocess(module, op, result);
2834
105
    }
2835
2836
131
    if ( options.noCompare == false ) {
2837
28
        compare(operations, results, data, size);
2838
28
    }
2839
131
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
130
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
130
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
130
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.21k
    do {
2725
2.21k
        auto op = getOp(&parentDs, data, size);
2726
2.21k
        auto module = getModule(parentDs);
2727
2.21k
        if ( module == nullptr ) {
2728
2.00k
            continue;
2729
2.00k
        }
2730
2731
202
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
202
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.20k
    } while ( parentDs.Get<bool>() == true );
2738
2739
130
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
126
#if 1
2745
126
    {
2746
126
        std::set<uint64_t> moduleIDs;
2747
126
        for (const auto& m : modules ) {
2748
68
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
68
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
68
            moduleIDs.insert(moduleID);
2756
68
        }
2757
2758
126
        std::set<uint64_t> operationModuleIDs;
2759
126
        for (const auto& op : operations) {
2760
104
            operationModuleIDs.insert(op.first->ID);
2761
104
        }
2762
2763
126
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
126
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
126
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
126
        for (const auto& id : addModuleIDs) {
2768
23
            operations.push_back({ modules.at(id), operations[0].second});
2769
23
        }
2770
126
    }
2771
126
#endif
2772
2773
126
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
126
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
253
    for (size_t i = 0; i < operations.size(); i++) {
2781
127
        auto& operation = operations[i];
2782
2783
127
        auto& module = operation.first;
2784
127
        auto& op = operation.second;
2785
2786
127
        if ( i > 0 ) {
2787
93
            auto& prevModule = operations[i-1].first;
2788
93
            auto& prevOp = operations[i].second;
2789
2790
93
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
50
                auto& curModifier = op.modifier.GetVectorPtr();
2792
50
                if ( curModifier.size() == 0 ) {
2793
12.8k
                    for (size_t j = 0; j < 512; j++) {
2794
12.8k
                        curModifier.push_back(1);
2795
12.8k
                    }
2796
25
                } else {
2797
360
                    for (auto& c : curModifier) {
2798
360
                        c++;
2799
360
                    }
2800
25
                }
2801
50
            }
2802
93
        }
2803
2804
127
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
127
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
127
        const auto& result = results.back();
2811
2812
127
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
127
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
127
        if ( options.disableTests == false ) {
2830
127
            tests::test(op, result.second);
2831
127
        }
2832
2833
127
        postprocess(module, op, result);
2834
127
    }
2835
2836
126
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
126
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
146
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
146
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
146
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.15k
    do {
2725
2.15k
        auto op = getOp(&parentDs, data, size);
2726
2.15k
        auto module = getModule(parentDs);
2727
2.15k
        if ( module == nullptr ) {
2728
1.90k
            continue;
2729
1.90k
        }
2730
2731
251
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
251
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
2.15k
    } while ( parentDs.Get<bool>() == true );
2738
2739
146
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
137
#if 1
2745
137
    {
2746
137
        std::set<uint64_t> moduleIDs;
2747
137
        for (const auto& m : modules ) {
2748
94
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
94
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
94
            moduleIDs.insert(moduleID);
2756
94
        }
2757
2758
137
        std::set<uint64_t> operationModuleIDs;
2759
137
        for (const auto& op : operations) {
2760
135
            operationModuleIDs.insert(op.first->ID);
2761
135
        }
2762
2763
137
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
137
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
137
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
137
        for (const auto& id : addModuleIDs) {
2768
35
            operations.push_back({ modules.at(id), operations[0].second});
2769
35
        }
2770
137
    }
2771
137
#endif
2772
2773
137
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
137
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
307
    for (size_t i = 0; i < operations.size(); i++) {
2781
170
        auto& operation = operations[i];
2782
2783
170
        auto& module = operation.first;
2784
170
        auto& op = operation.second;
2785
2786
170
        if ( i > 0 ) {
2787
123
            auto& prevModule = operations[i-1].first;
2788
123
            auto& prevOp = operations[i].second;
2789
2790
123
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
68
                auto& curModifier = op.modifier.GetVectorPtr();
2792
68
                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
41
                } else {
2797
364
                    for (auto& c : curModifier) {
2798
364
                        c++;
2799
364
                    }
2800
27
                }
2801
68
            }
2802
123
        }
2803
2804
170
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
170
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
170
        const auto& result = results.back();
2811
2812
170
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
170
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
170
        if ( options.disableTests == false ) {
2830
170
            tests::test(op, result.second);
2831
170
        }
2832
2833
170
        postprocess(module, op, result);
2834
170
    }
2835
2836
137
    if ( options.noCompare == false ) {
2837
47
        compare(operations, results, data, size);
2838
47
    }
2839
137
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
126
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
126
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
126
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.63k
    do {
2725
2.63k
        auto op = getOp(&parentDs, data, size);
2726
2.63k
        auto module = getModule(parentDs);
2727
2.63k
        if ( module == nullptr ) {
2728
2.41k
            continue;
2729
2.41k
        }
2730
2731
222
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
222
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.62k
    } while ( parentDs.Get<bool>() == true );
2738
2739
126
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
119
#if 1
2745
119
    {
2746
119
        std::set<uint64_t> moduleIDs;
2747
119
        for (const auto& m : modules ) {
2748
80
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
80
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
80
            moduleIDs.insert(moduleID);
2756
80
        }
2757
2758
119
        std::set<uint64_t> operationModuleIDs;
2759
119
        for (const auto& op : operations) {
2760
117
            operationModuleIDs.insert(op.first->ID);
2761
117
        }
2762
2763
119
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
119
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
119
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
119
        for (const auto& id : addModuleIDs) {
2768
29
            operations.push_back({ modules.at(id), operations[0].second});
2769
29
        }
2770
119
    }
2771
119
#endif
2772
2773
119
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
119
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
265
    for (size_t i = 0; i < operations.size(); i++) {
2781
146
        auto& operation = operations[i];
2782
2783
146
        auto& module = operation.first;
2784
146
        auto& op = operation.second;
2785
2786
146
        if ( i > 0 ) {
2787
106
            auto& prevModule = operations[i-1].first;
2788
106
            auto& prevOp = operations[i].second;
2789
2790
106
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
60
                auto& curModifier = op.modifier.GetVectorPtr();
2792
60
                if ( curModifier.size() == 0 ) {
2793
15.3k
                    for (size_t j = 0; j < 512; j++) {
2794
15.3k
                        curModifier.push_back(1);
2795
15.3k
                    }
2796
30
                } else {
2797
390
                    for (auto& c : curModifier) {
2798
390
                        c++;
2799
390
                    }
2800
30
                }
2801
60
            }
2802
106
        }
2803
2804
146
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
146
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
146
        const auto& result = results.back();
2811
2812
146
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
146
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
146
        if ( options.disableTests == false ) {
2830
146
            tests::test(op, result.second);
2831
146
        }
2832
2833
146
        postprocess(module, op, result);
2834
146
    }
2835
2836
119
    if ( options.noCompare == false ) {
2837
40
        compare(operations, results, data, size);
2838
40
    }
2839
119
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
138
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
138
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
138
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.86k
    do {
2725
2.86k
        auto op = getOp(&parentDs, data, size);
2726
2.86k
        auto module = getModule(parentDs);
2727
2.86k
        if ( module == nullptr ) {
2728
2.65k
            continue;
2729
2.65k
        }
2730
2731
211
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
211
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
2.85k
    } while ( parentDs.Get<bool>() == true );
2738
2739
138
    if ( operations.empty() == true ) {
2740
16
        return;
2741
16
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
122
#if 1
2745
122
    {
2746
122
        std::set<uint64_t> moduleIDs;
2747
122
        for (const auto& m : modules ) {
2748
88
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
88
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
88
            moduleIDs.insert(moduleID);
2756
88
        }
2757
2758
122
        std::set<uint64_t> operationModuleIDs;
2759
123
        for (const auto& op : operations) {
2760
123
            operationModuleIDs.insert(op.first->ID);
2761
123
        }
2762
2763
122
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
122
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
122
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
122
        for (const auto& id : addModuleIDs) {
2768
34
            operations.push_back({ modules.at(id), operations[0].second});
2769
34
        }
2770
122
    }
2771
122
#endif
2772
2773
122
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
122
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
279
    for (size_t i = 0; i < operations.size(); i++) {
2781
157
        auto& operation = operations[i];
2782
2783
157
        auto& module = operation.first;
2784
157
        auto& op = operation.second;
2785
2786
157
        if ( i > 0 ) {
2787
113
            auto& prevModule = operations[i-1].first;
2788
113
            auto& prevOp = operations[i].second;
2789
2790
113
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
63
                auto& curModifier = op.modifier.GetVectorPtr();
2792
63
                if ( curModifier.size() == 0 ) {
2793
15.9k
                    for (size_t j = 0; j < 512; j++) {
2794
15.8k
                        curModifier.push_back(1);
2795
15.8k
                    }
2796
32
                } else {
2797
338
                    for (auto& c : curModifier) {
2798
338
                        c++;
2799
338
                    }
2800
32
                }
2801
63
            }
2802
113
        }
2803
2804
157
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
157
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
157
        const auto& result = results.back();
2811
2812
157
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
157
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
157
        if ( options.disableTests == false ) {
2830
157
            tests::test(op, result.second);
2831
157
        }
2832
2833
157
        postprocess(module, op, result);
2834
157
    }
2835
2836
122
    if ( options.noCompare == false ) {
2837
44
        compare(operations, results, data, size);
2838
44
    }
2839
122
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
145
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
145
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
145
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.58k
    do {
2725
2.58k
        auto op = getOp(&parentDs, data, size);
2726
2.58k
        auto module = getModule(parentDs);
2727
2.58k
        if ( module == nullptr ) {
2728
2.39k
            continue;
2729
2.39k
        }
2730
2731
193
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
193
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
2.58k
    } while ( parentDs.Get<bool>() == true );
2738
2739
145
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
134
#if 1
2745
134
    {
2746
134
        std::set<uint64_t> moduleIDs;
2747
134
        for (const auto& m : modules ) {
2748
70
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
70
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
70
            moduleIDs.insert(moduleID);
2756
70
        }
2757
2758
134
        std::set<uint64_t> operationModuleIDs;
2759
134
        for (const auto& op : operations) {
2760
107
            operationModuleIDs.insert(op.first->ID);
2761
107
        }
2762
2763
134
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
134
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
134
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
134
        for (const auto& id : addModuleIDs) {
2768
24
            operations.push_back({ modules.at(id), operations[0].second});
2769
24
        }
2770
134
    }
2771
134
#endif
2772
2773
134
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
134
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
265
    for (size_t i = 0; i < operations.size(); i++) {
2781
131
        auto& operation = operations[i];
2782
2783
131
        auto& module = operation.first;
2784
131
        auto& op = operation.second;
2785
2786
131
        if ( i > 0 ) {
2787
96
            auto& prevModule = operations[i-1].first;
2788
96
            auto& prevOp = operations[i].second;
2789
2790
96
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
55
                auto& curModifier = op.modifier.GetVectorPtr();
2792
55
                if ( curModifier.size() == 0 ) {
2793
11.7k
                    for (size_t j = 0; j < 512; j++) {
2794
11.7k
                        curModifier.push_back(1);
2795
11.7k
                    }
2796
32
                } else {
2797
251
                    for (auto& c : curModifier) {
2798
251
                        c++;
2799
251
                    }
2800
32
                }
2801
55
            }
2802
96
        }
2803
2804
131
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
131
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
131
        const auto& result = results.back();
2811
2812
131
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
131
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
131
        if ( options.disableTests == false ) {
2830
131
            tests::test(op, result.second);
2831
131
        }
2832
2833
131
        postprocess(module, op, result);
2834
131
    }
2835
2836
134
    if ( options.noCompare == false ) {
2837
35
        compare(operations, results, data, size);
2838
35
    }
2839
134
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
122
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
122
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
122
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.14k
    do {
2725
2.14k
        auto op = getOp(&parentDs, data, size);
2726
2.14k
        auto module = getModule(parentDs);
2727
2.14k
        if ( module == nullptr ) {
2728
1.95k
            continue;
2729
1.95k
        }
2730
2731
196
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
196
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
2.14k
    } while ( parentDs.Get<bool>() == true );
2738
2739
122
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
116
#if 1
2745
116
    {
2746
116
        std::set<uint64_t> moduleIDs;
2747
116
        for (const auto& m : modules ) {
2748
68
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
68
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
68
            moduleIDs.insert(moduleID);
2756
68
        }
2757
2758
116
        std::set<uint64_t> operationModuleIDs;
2759
116
        for (const auto& op : operations) {
2760
98
            operationModuleIDs.insert(op.first->ID);
2761
98
        }
2762
2763
116
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
116
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
116
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
116
        for (const auto& id : addModuleIDs) {
2768
22
            operations.push_back({ modules.at(id), operations[0].second});
2769
22
        }
2770
116
    }
2771
116
#endif
2772
2773
116
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
116
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
236
    for (size_t i = 0; i < operations.size(); i++) {
2781
120
        auto& operation = operations[i];
2782
2783
120
        auto& module = operation.first;
2784
120
        auto& op = operation.second;
2785
2786
120
        if ( i > 0 ) {
2787
86
            auto& prevModule = operations[i-1].first;
2788
86
            auto& prevOp = operations[i].second;
2789
2790
86
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
46
                auto& curModifier = op.modifier.GetVectorPtr();
2792
46
                if ( curModifier.size() == 0 ) {
2793
9.23k
                    for (size_t j = 0; j < 512; j++) {
2794
9.21k
                        curModifier.push_back(1);
2795
9.21k
                    }
2796
28
                } else {
2797
250
                    for (auto& c : curModifier) {
2798
250
                        c++;
2799
250
                    }
2800
28
                }
2801
46
            }
2802
86
        }
2803
2804
120
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
120
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
120
        const auto& result = results.back();
2811
2812
120
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
120
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
120
        if ( options.disableTests == false ) {
2830
120
            tests::test(op, result.second);
2831
120
        }
2832
2833
120
        postprocess(module, op, result);
2834
120
    }
2835
2836
116
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
116
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
173
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
173
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
173
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.70k
    do {
2725
1.70k
        auto op = getOp(&parentDs, data, size);
2726
1.70k
        auto module = getModule(parentDs);
2727
1.70k
        if ( module == nullptr ) {
2728
1.53k
            continue;
2729
1.53k
        }
2730
2731
173
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
173
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
1.70k
    } while ( parentDs.Get<bool>() == true );
2738
2739
173
    if ( operations.empty() == true ) {
2740
25
        return;
2741
25
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
148
#if 1
2745
148
    {
2746
148
        std::set<uint64_t> moduleIDs;
2747
148
        for (const auto& m : modules ) {
2748
74
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
74
            moduleIDs.insert(moduleID);
2756
74
        }
2757
2758
148
        std::set<uint64_t> operationModuleIDs;
2759
148
        for (const auto& op : operations) {
2760
96
            operationModuleIDs.insert(op.first->ID);
2761
96
        }
2762
2763
148
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
148
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
148
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
148
        for (const auto& id : addModuleIDs) {
2768
26
            operations.push_back({ modules.at(id), operations[0].second});
2769
26
        }
2770
148
    }
2771
148
#endif
2772
2773
148
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
148
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
270
    for (size_t i = 0; i < operations.size(); i++) {
2781
122
        auto& operation = operations[i];
2782
2783
122
        auto& module = operation.first;
2784
122
        auto& op = operation.second;
2785
2786
122
        if ( i > 0 ) {
2787
85
            auto& prevModule = operations[i-1].first;
2788
85
            auto& prevOp = operations[i].second;
2789
2790
85
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
42
                auto& curModifier = op.modifier.GetVectorPtr();
2792
42
                if ( curModifier.size() == 0 ) {
2793
10.7k
                    for (size_t j = 0; j < 512; j++) {
2794
10.7k
                        curModifier.push_back(1);
2795
10.7k
                    }
2796
21
                } else {
2797
256
                    for (auto& c : curModifier) {
2798
256
                        c++;
2799
256
                    }
2800
21
                }
2801
42
            }
2802
85
        }
2803
2804
122
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
122
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
122
        const auto& result = results.back();
2811
2812
122
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
122
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
122
        if ( options.disableTests == false ) {
2830
122
            tests::test(op, result.second);
2831
122
        }
2832
2833
122
        postprocess(module, op, result);
2834
122
    }
2835
2836
148
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
148
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::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
2.05k
    do {
2725
2.05k
        auto op = getOp(&parentDs, data, size);
2726
2.05k
        auto module = getModule(parentDs);
2727
2.05k
        if ( module == nullptr ) {
2728
1.81k
            continue;
2729
1.81k
        }
2730
2731
235
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
235
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
2.04k
    } 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
92
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
92
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
92
            moduleIDs.insert(moduleID);
2756
92
        }
2757
2758
179
        std::set<uint64_t> operationModuleIDs;
2759
179
        for (const auto& op : operations) {
2760
122
            operationModuleIDs.insert(op.first->ID);
2761
122
        }
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
35
            operations.push_back({ modules.at(id), operations[0].second});
2769
35
        }
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
336
    for (size_t i = 0; i < operations.size(); i++) {
2781
157
        auto& operation = operations[i];
2782
2783
157
        auto& module = operation.first;
2784
157
        auto& op = operation.second;
2785
2786
157
        if ( i > 0 ) {
2787
111
            auto& prevModule = operations[i-1].first;
2788
111
            auto& prevOp = operations[i].second;
2789
2790
111
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
59
                auto& curModifier = op.modifier.GetVectorPtr();
2792
59
                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
38
                } else {
2797
370
                    for (auto& c : curModifier) {
2798
370
                        c++;
2799
370
                    }
2800
21
                }
2801
59
            }
2802
111
        }
2803
2804
157
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
157
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
157
        const auto& result = results.back();
2811
2812
157
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
157
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
157
        if ( options.disableTests == false ) {
2830
157
            tests::test(op, result.second);
2831
157
        }
2832
2833
157
        postprocess(module, op, result);
2834
157
    }
2835
2836
179
    if ( options.noCompare == false ) {
2837
46
        compare(operations, results, data, size);
2838
46
    }
2839
179
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
154
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
154
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
154
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.61k
    do {
2725
2.61k
        auto op = getOp(&parentDs, data, size);
2726
2.61k
        auto module = getModule(parentDs);
2727
2.61k
        if ( module == nullptr ) {
2728
2.41k
            continue;
2729
2.41k
        }
2730
2731
200
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
200
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
2.61k
    } while ( parentDs.Get<bool>() == true );
2738
2739
154
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
133
#if 1
2745
133
    {
2746
133
        std::set<uint64_t> moduleIDs;
2747
133
        for (const auto& m : modules ) {
2748
76
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
76
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
76
            moduleIDs.insert(moduleID);
2756
76
        }
2757
2758
133
        std::set<uint64_t> operationModuleIDs;
2759
133
        for (const auto& op : operations) {
2760
112
            operationModuleIDs.insert(op.first->ID);
2761
112
        }
2762
2763
133
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
133
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
133
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
133
        for (const auto& id : addModuleIDs) {
2768
27
            operations.push_back({ modules.at(id), operations[0].second});
2769
27
        }
2770
133
    }
2771
133
#endif
2772
2773
133
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
133
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
272
    for (size_t i = 0; i < operations.size(); i++) {
2781
139
        auto& operation = operations[i];
2782
2783
139
        auto& module = operation.first;
2784
139
        auto& op = operation.second;
2785
2786
139
        if ( i > 0 ) {
2787
101
            auto& prevModule = operations[i-1].first;
2788
101
            auto& prevOp = operations[i].second;
2789
2790
101
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
57
                auto& curModifier = op.modifier.GetVectorPtr();
2792
57
                if ( curModifier.size() == 0 ) {
2793
12.8k
                    for (size_t j = 0; j < 512; j++) {
2794
12.8k
                        curModifier.push_back(1);
2795
12.8k
                    }
2796
32
                } else {
2797
302
                    for (auto& c : curModifier) {
2798
302
                        c++;
2799
302
                    }
2800
32
                }
2801
57
            }
2802
101
        }
2803
2804
139
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
139
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
139
        const auto& result = results.back();
2811
2812
139
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
139
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
139
        if ( options.disableTests == false ) {
2830
139
            tests::test(op, result.second);
2831
139
        }
2832
2833
139
        postprocess(module, op, result);
2834
139
    }
2835
2836
133
    if ( options.noCompare == false ) {
2837
38
        compare(operations, results, data, size);
2838
38
    }
2839
133
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
166
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
166
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
166
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.66k
    do {
2725
1.66k
        auto op = getOp(&parentDs, data, size);
2726
1.66k
        auto module = getModule(parentDs);
2727
1.66k
        if ( module == nullptr ) {
2728
1.49k
            continue;
2729
1.49k
        }
2730
2731
173
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
173
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
1.65k
    } while ( parentDs.Get<bool>() == true );
2738
2739
166
    if ( operations.empty() == true ) {
2740
20
        return;
2741
20
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
146
#if 1
2745
146
    {
2746
146
        std::set<uint64_t> moduleIDs;
2747
146
        for (const auto& m : modules ) {
2748
68
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
68
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
68
            moduleIDs.insert(moduleID);
2756
68
        }
2757
2758
146
        std::set<uint64_t> operationModuleIDs;
2759
146
        for (const auto& op : operations) {
2760
95
            operationModuleIDs.insert(op.first->ID);
2761
95
        }
2762
2763
146
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
146
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
146
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
146
        for (const auto& id : addModuleIDs) {
2768
22
            operations.push_back({ modules.at(id), operations[0].second});
2769
22
        }
2770
146
    }
2771
146
#endif
2772
2773
146
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
146
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
263
    for (size_t i = 0; i < operations.size(); i++) {
2781
117
        auto& operation = operations[i];
2782
2783
117
        auto& module = operation.first;
2784
117
        auto& op = operation.second;
2785
2786
117
        if ( i > 0 ) {
2787
83
            auto& prevModule = operations[i-1].first;
2788
83
            auto& prevOp = operations[i].second;
2789
2790
83
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                if ( curModifier.size() == 0 ) {
2793
13.8k
                    for (size_t j = 0; j < 512; j++) {
2794
13.8k
                        curModifier.push_back(1);
2795
13.8k
                    }
2796
27
                } else {
2797
242
                    for (auto& c : curModifier) {
2798
242
                        c++;
2799
242
                    }
2800
16
                }
2801
43
            }
2802
83
        }
2803
2804
117
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
117
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
117
        const auto& result = results.back();
2811
2812
117
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
117
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
117
        if ( options.disableTests == false ) {
2830
117
            tests::test(op, result.second);
2831
117
        }
2832
2833
117
        postprocess(module, op, result);
2834
117
    }
2835
2836
146
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
146
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
120
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
120
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
120
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.81k
    do {
2725
1.81k
        auto op = getOp(&parentDs, data, size);
2726
1.81k
        auto module = getModule(parentDs);
2727
1.81k
        if ( module == nullptr ) {
2728
1.64k
            continue;
2729
1.64k
        }
2730
2731
178
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
178
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.81k
    } while ( parentDs.Get<bool>() == true );
2738
2739
120
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
110
#if 1
2745
110
    {
2746
110
        std::set<uint64_t> moduleIDs;
2747
110
        for (const auto& m : modules ) {
2748
70
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
70
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
70
            moduleIDs.insert(moduleID);
2756
70
        }
2757
2758
110
        std::set<uint64_t> operationModuleIDs;
2759
110
        for (const auto& op : operations) {
2760
100
            operationModuleIDs.insert(op.first->ID);
2761
100
        }
2762
2763
110
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
110
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
110
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
110
        for (const auto& id : addModuleIDs) {
2768
24
            operations.push_back({ modules.at(id), operations[0].second});
2769
24
        }
2770
110
    }
2771
110
#endif
2772
2773
110
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
110
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
234
    for (size_t i = 0; i < operations.size(); i++) {
2781
124
        auto& operation = operations[i];
2782
2783
124
        auto& module = operation.first;
2784
124
        auto& op = operation.second;
2785
2786
124
        if ( i > 0 ) {
2787
89
            auto& prevModule = operations[i-1].first;
2788
89
            auto& prevOp = operations[i].second;
2789
2790
89
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
48
                auto& curModifier = op.modifier.GetVectorPtr();
2792
48
                if ( curModifier.size() == 0 ) {
2793
12.8k
                    for (size_t j = 0; j < 512; j++) {
2794
12.8k
                        curModifier.push_back(1);
2795
12.8k
                    }
2796
25
                } else {
2797
262
                    for (auto& c : curModifier) {
2798
262
                        c++;
2799
262
                    }
2800
23
                }
2801
48
            }
2802
89
        }
2803
2804
124
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
124
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
124
        const auto& result = results.back();
2811
2812
124
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
124
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
124
        if ( options.disableTests == false ) {
2830
124
            tests::test(op, result.second);
2831
124
        }
2832
2833
124
        postprocess(module, op, result);
2834
124
    }
2835
2836
110
    if ( options.noCompare == false ) {
2837
35
        compare(operations, results, data, size);
2838
35
    }
2839
110
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
110
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
110
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
110
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.74k
    do {
2725
1.74k
        auto op = getOp(&parentDs, data, size);
2726
1.74k
        auto module = getModule(parentDs);
2727
1.74k
        if ( module == nullptr ) {
2728
1.59k
            continue;
2729
1.59k
        }
2730
2731
155
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
155
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
1.74k
    } while ( parentDs.Get<bool>() == true );
2738
2739
110
    if ( operations.empty() == true ) {
2740
3
        return;
2741
3
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
107
#if 1
2745
107
    {
2746
107
        std::set<uint64_t> moduleIDs;
2747
107
        for (const auto& m : modules ) {
2748
56
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
56
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
56
            moduleIDs.insert(moduleID);
2756
56
        }
2757
2758
107
        std::set<uint64_t> operationModuleIDs;
2759
107
        for (const auto& op : operations) {
2760
82
            operationModuleIDs.insert(op.first->ID);
2761
82
        }
2762
2763
107
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
107
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
107
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
107
        for (const auto& id : addModuleIDs) {
2768
17
            operations.push_back({ modules.at(id), operations[0].second});
2769
17
        }
2770
107
    }
2771
107
#endif
2772
2773
107
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
107
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
206
    for (size_t i = 0; i < operations.size(); i++) {
2781
99
        auto& operation = operations[i];
2782
2783
99
        auto& module = operation.first;
2784
99
        auto& op = operation.second;
2785
2786
99
        if ( i > 0 ) {
2787
71
            auto& prevModule = operations[i-1].first;
2788
71
            auto& prevOp = operations[i].second;
2789
2790
71
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
37
                auto& curModifier = op.modifier.GetVectorPtr();
2792
37
                if ( curModifier.size() == 0 ) {
2793
9.23k
                    for (size_t j = 0; j < 512; j++) {
2794
9.21k
                        curModifier.push_back(1);
2795
9.21k
                    }
2796
19
                } else {
2797
263
                    for (auto& c : curModifier) {
2798
263
                        c++;
2799
263
                    }
2800
19
                }
2801
37
            }
2802
71
        }
2803
2804
99
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
99
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
99
        const auto& result = results.back();
2811
2812
99
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
99
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
99
        if ( options.disableTests == false ) {
2830
99
            tests::test(op, result.second);
2831
99
        }
2832
2833
99
        postprocess(module, op, result);
2834
99
    }
2835
2836
107
    if ( options.noCompare == false ) {
2837
28
        compare(operations, results, data, size);
2838
28
    }
2839
107
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
135
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
135
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
135
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.95k
    do {
2725
1.95k
        auto op = getOp(&parentDs, data, size);
2726
1.95k
        auto module = getModule(parentDs);
2727
1.95k
        if ( module == nullptr ) {
2728
1.77k
            continue;
2729
1.77k
        }
2730
2731
177
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
177
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.94k
    } while ( parentDs.Get<bool>() == true );
2738
2739
135
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
127
#if 1
2745
127
    {
2746
127
        std::set<uint64_t> moduleIDs;
2747
127
        for (const auto& m : modules ) {
2748
60
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
60
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
60
            moduleIDs.insert(moduleID);
2756
60
        }
2757
2758
127
        std::set<uint64_t> operationModuleIDs;
2759
127
        for (const auto& op : operations) {
2760
90
            operationModuleIDs.insert(op.first->ID);
2761
90
        }
2762
2763
127
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
127
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
127
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
127
        for (const auto& id : addModuleIDs) {
2768
19
            operations.push_back({ modules.at(id), operations[0].second});
2769
19
        }
2770
127
    }
2771
127
#endif
2772
2773
127
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
127
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
236
    for (size_t i = 0; i < operations.size(); i++) {
2781
109
        auto& operation = operations[i];
2782
2783
109
        auto& module = operation.first;
2784
109
        auto& op = operation.second;
2785
2786
109
        if ( i > 0 ) {
2787
79
            auto& prevModule = operations[i-1].first;
2788
79
            auto& prevOp = operations[i].second;
2789
2790
79
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                if ( curModifier.size() == 0 ) {
2793
7.69k
                    for (size_t j = 0; j < 512; j++) {
2794
7.68k
                        curModifier.push_back(1);
2795
7.68k
                    }
2796
28
                } else {
2797
317
                    for (auto& c : curModifier) {
2798
317
                        c++;
2799
317
                    }
2800
28
                }
2801
43
            }
2802
79
        }
2803
2804
109
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
109
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
109
        const auto& result = results.back();
2811
2812
109
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
109
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
109
        if ( options.disableTests == false ) {
2830
109
            tests::test(op, result.second);
2831
109
        }
2832
2833
109
        postprocess(module, op, result);
2834
109
    }
2835
2836
127
    if ( options.noCompare == false ) {
2837
30
        compare(operations, results, data, size);
2838
30
    }
2839
127
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
165
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
165
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
165
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.01k
    do {
2725
2.01k
        auto op = getOp(&parentDs, data, size);
2726
2.01k
        auto module = getModule(parentDs);
2727
2.01k
        if ( module == nullptr ) {
2728
1.75k
            continue;
2729
1.75k
        }
2730
2731
259
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
259
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
2.00k
    } while ( parentDs.Get<bool>() == true );
2738
2739
165
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
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
106
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
106
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
106
            moduleIDs.insert(moduleID);
2756
106
        }
2757
2758
157
        std::set<uint64_t> operationModuleIDs;
2759
157
        for (const auto& op : operations) {
2760
126
            operationModuleIDs.insert(op.first->ID);
2761
126
        }
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
324
    for (size_t i = 0; i < operations.size(); i++) {
2781
167
        auto& operation = operations[i];
2782
2783
167
        auto& module = operation.first;
2784
167
        auto& op = operation.second;
2785
2786
167
        if ( i > 0 ) {
2787
114
            auto& prevModule = operations[i-1].first;
2788
114
            auto& prevOp = operations[i].second;
2789
2790
114
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
55
                auto& curModifier = op.modifier.GetVectorPtr();
2792
55
                if ( curModifier.size() == 0 ) {
2793
16.4k
                    for (size_t j = 0; j < 512; j++) {
2794
16.3k
                        curModifier.push_back(1);
2795
16.3k
                    }
2796
32
                } else {
2797
311
                    for (auto& c : curModifier) {
2798
311
                        c++;
2799
311
                    }
2800
23
                }
2801
55
            }
2802
114
        }
2803
2804
167
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
167
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
167
        const auto& result = results.back();
2811
2812
167
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
167
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
167
        if ( options.disableTests == false ) {
2830
167
            tests::test(op, result.second);
2831
167
        }
2832
2833
167
        postprocess(module, op, result);
2834
167
    }
2835
2836
157
    if ( options.noCompare == false ) {
2837
53
        compare(operations, results, data, size);
2838
53
    }
2839
157
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
124
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
124
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
124
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.26k
    do {
2725
2.26k
        auto op = getOp(&parentDs, data, size);
2726
2.26k
        auto module = getModule(parentDs);
2727
2.26k
        if ( module == nullptr ) {
2728
2.06k
            continue;
2729
2.06k
        }
2730
2731
193
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
193
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.25k
    } while ( parentDs.Get<bool>() == true );
2738
2739
124
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
114
#if 1
2745
114
    {
2746
114
        std::set<uint64_t> moduleIDs;
2747
114
        for (const auto& m : modules ) {
2748
76
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
76
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
76
            moduleIDs.insert(moduleID);
2756
76
        }
2757
2758
114
        std::set<uint64_t> operationModuleIDs;
2759
114
        for (const auto& op : operations) {
2760
104
            operationModuleIDs.insert(op.first->ID);
2761
104
        }
2762
2763
114
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
114
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
114
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
114
        for (const auto& id : addModuleIDs) {
2768
26
            operations.push_back({ modules.at(id), operations[0].second});
2769
26
        }
2770
114
    }
2771
114
#endif
2772
2773
114
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
114
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
244
    for (size_t i = 0; i < operations.size(); i++) {
2781
130
        auto& operation = operations[i];
2782
2783
130
        auto& module = operation.first;
2784
130
        auto& op = operation.second;
2785
2786
130
        if ( i > 0 ) {
2787
92
            auto& prevModule = operations[i-1].first;
2788
92
            auto& prevOp = operations[i].second;
2789
2790
92
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
48
                auto& curModifier = op.modifier.GetVectorPtr();
2792
48
                if ( curModifier.size() == 0 ) {
2793
13.3k
                    for (size_t j = 0; j < 512; j++) {
2794
13.3k
                        curModifier.push_back(1);
2795
13.3k
                    }
2796
26
                } else {
2797
287
                    for (auto& c : curModifier) {
2798
287
                        c++;
2799
287
                    }
2800
22
                }
2801
48
            }
2802
92
        }
2803
2804
130
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
130
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
130
        const auto& result = results.back();
2811
2812
130
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
130
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
130
        if ( options.disableTests == false ) {
2830
130
            tests::test(op, result.second);
2831
130
        }
2832
2833
130
        postprocess(module, op, result);
2834
130
    }
2835
2836
114
    if ( options.noCompare == false ) {
2837
38
        compare(operations, results, data, size);
2838
38
    }
2839
114
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
152
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
152
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
152
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.89k
    do {
2725
1.89k
        auto op = getOp(&parentDs, data, size);
2726
1.89k
        auto module = getModule(parentDs);
2727
1.89k
        if ( module == nullptr ) {
2728
1.65k
            continue;
2729
1.65k
        }
2730
2731
235
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
235
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.88k
    } while ( parentDs.Get<bool>() == true );
2738
2739
152
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
144
#if 1
2745
144
    {
2746
144
        std::set<uint64_t> moduleIDs;
2747
144
        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
144
        std::set<uint64_t> operationModuleIDs;
2759
144
        for (const auto& op : operations) {
2760
138
            operationModuleIDs.insert(op.first->ID);
2761
138
        }
2762
2763
144
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
144
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
144
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
144
        for (const auto& id : addModuleIDs) {
2768
49
            operations.push_back({ modules.at(id), operations[0].second});
2769
49
        }
2770
144
    }
2771
144
#endif
2772
2773
144
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
144
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
331
    for (size_t i = 0; i < operations.size(); i++) {
2781
187
        auto& operation = operations[i];
2782
2783
187
        auto& module = operation.first;
2784
187
        auto& op = operation.second;
2785
2786
187
        if ( i > 0 ) {
2787
127
            auto& prevModule = operations[i-1].first;
2788
127
            auto& prevOp = operations[i].second;
2789
2790
127
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
61
                auto& curModifier = op.modifier.GetVectorPtr();
2792
61
                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
41
                } else {
2797
303
                    for (auto& c : curModifier) {
2798
303
                        c++;
2799
303
                    }
2800
20
                }
2801
61
            }
2802
127
        }
2803
2804
187
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
187
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
187
        const auto& result = results.back();
2811
2812
187
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
187
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
187
        if ( options.disableTests == false ) {
2830
187
            tests::test(op, result.second);
2831
187
        }
2832
2833
187
        postprocess(module, op, result);
2834
187
    }
2835
2836
144
    if ( options.noCompare == false ) {
2837
60
        compare(operations, results, data, size);
2838
60
    }
2839
144
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
121
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
121
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
121
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.77k
    do {
2725
1.77k
        auto op = getOp(&parentDs, data, size);
2726
1.77k
        auto module = getModule(parentDs);
2727
1.77k
        if ( module == nullptr ) {
2728
1.59k
            continue;
2729
1.59k
        }
2730
2731
184
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
184
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
1.77k
    } while ( parentDs.Get<bool>() == true );
2738
2739
121
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
114
#if 1
2745
114
    {
2746
114
        std::set<uint64_t> moduleIDs;
2747
114
        for (const auto& m : modules ) {
2748
78
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
78
            moduleIDs.insert(moduleID);
2756
78
        }
2757
2758
114
        std::set<uint64_t> operationModuleIDs;
2759
114
        for (const auto& op : operations) {
2760
100
            operationModuleIDs.insert(op.first->ID);
2761
100
        }
2762
2763
114
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
114
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
114
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
114
        for (const auto& id : addModuleIDs) {
2768
28
            operations.push_back({ modules.at(id), operations[0].second});
2769
28
        }
2770
114
    }
2771
114
#endif
2772
2773
114
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
114
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
242
    for (size_t i = 0; i < operations.size(); i++) {
2781
128
        auto& operation = operations[i];
2782
2783
128
        auto& module = operation.first;
2784
128
        auto& op = operation.second;
2785
2786
128
        if ( i > 0 ) {
2787
89
            auto& prevModule = operations[i-1].first;
2788
89
            auto& prevOp = operations[i].second;
2789
2790
89
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
44
                auto& curModifier = op.modifier.GetVectorPtr();
2792
44
                if ( curModifier.size() == 0 ) {
2793
11.7k
                    for (size_t j = 0; j < 512; j++) {
2794
11.7k
                        curModifier.push_back(1);
2795
11.7k
                    }
2796
23
                } else {
2797
290
                    for (auto& c : curModifier) {
2798
290
                        c++;
2799
290
                    }
2800
21
                }
2801
44
            }
2802
89
        }
2803
2804
128
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
128
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
128
        const auto& result = results.back();
2811
2812
128
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
128
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
128
        if ( options.disableTests == false ) {
2830
128
            tests::test(op, result.second);
2831
128
        }
2832
2833
128
        postprocess(module, op, result);
2834
128
    }
2835
2836
114
    if ( options.noCompare == false ) {
2837
39
        compare(operations, results, data, size);
2838
39
    }
2839
114
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
185
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
185
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
185
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.39k
    do {
2725
2.39k
        auto op = getOp(&parentDs, data, size);
2726
2.39k
        auto module = getModule(parentDs);
2727
2.39k
        if ( module == nullptr ) {
2728
2.07k
            continue;
2729
2.07k
        }
2730
2731
315
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
315
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.38k
    } while ( parentDs.Get<bool>() == true );
2738
2739
185
    if ( operations.empty() == true ) {
2740
3
        return;
2741
3
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
182
#if 1
2745
182
    {
2746
182
        std::set<uint64_t> moduleIDs;
2747
182
        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
182
        std::set<uint64_t> operationModuleIDs;
2759
182
        for (const auto& op : operations) {
2760
179
            operationModuleIDs.insert(op.first->ID);
2761
179
        }
2762
2763
182
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
182
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
182
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
182
        for (const auto& id : addModuleIDs) {
2768
68
            operations.push_back({ modules.at(id), operations[0].second});
2769
68
        }
2770
182
    }
2771
182
#endif
2772
2773
182
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
182
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
429
    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
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
73
                auto& curModifier = op.modifier.GetVectorPtr();
2792
73
                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
44
                } else {
2797
300
                    for (auto& c : curModifier) {
2798
300
                        c++;
2799
300
                    }
2800
29
                }
2801
73
            }
2802
164
        }
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
182
    if ( options.noCompare == false ) {
2837
83
        compare(operations, results, data, size);
2838
83
    }
2839
182
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
121
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
121
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
121
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.36k
    do {
2725
2.36k
        auto op = getOp(&parentDs, data, size);
2726
2.36k
        auto module = getModule(parentDs);
2727
2.36k
        if ( module == nullptr ) {
2728
2.16k
            continue;
2729
2.16k
        }
2730
2731
194
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
194
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.35k
    } while ( parentDs.Get<bool>() == true );
2738
2739
121
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
112
#if 1
2745
112
    {
2746
112
        std::set<uint64_t> moduleIDs;
2747
112
        for (const auto& m : modules ) {
2748
94
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
94
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
94
            moduleIDs.insert(moduleID);
2756
94
        }
2757
2758
112
        std::set<uint64_t> operationModuleIDs;
2759
120
        for (const auto& op : operations) {
2760
120
            operationModuleIDs.insert(op.first->ID);
2761
120
        }
2762
2763
112
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
112
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
112
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
112
        for (const auto& id : addModuleIDs) {
2768
35
            operations.push_back({ modules.at(id), operations[0].second});
2769
35
        }
2770
112
    }
2771
112
#endif
2772
2773
112
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
112
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
267
    for (size_t i = 0; i < operations.size(); i++) {
2781
155
        auto& operation = operations[i];
2782
2783
155
        auto& module = operation.first;
2784
155
        auto& op = operation.second;
2785
2786
155
        if ( i > 0 ) {
2787
108
            auto& prevModule = operations[i-1].first;
2788
108
            auto& prevOp = operations[i].second;
2789
2790
108
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
53
                auto& curModifier = op.modifier.GetVectorPtr();
2792
53
                if ( curModifier.size() == 0 ) {
2793
10.2k
                    for (size_t j = 0; j < 512; j++) {
2794
10.2k
                        curModifier.push_back(1);
2795
10.2k
                    }
2796
33
                } else {
2797
279
                    for (auto& c : curModifier) {
2798
279
                        c++;
2799
279
                    }
2800
33
                }
2801
53
            }
2802
108
        }
2803
2804
155
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
155
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
155
        const auto& result = results.back();
2811
2812
155
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
155
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
155
        if ( options.disableTests == false ) {
2830
155
            tests::test(op, result.second);
2831
155
        }
2832
2833
155
        postprocess(module, op, result);
2834
155
    }
2835
2836
112
    if ( options.noCompare == false ) {
2837
47
        compare(operations, results, data, size);
2838
47
    }
2839
112
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
166
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
166
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
166
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.29k
    do {
2725
2.29k
        auto op = getOp(&parentDs, data, size);
2726
2.29k
        auto module = getModule(parentDs);
2727
2.29k
        if ( module == nullptr ) {
2728
2.04k
            continue;
2729
2.04k
        }
2730
2731
244
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
244
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.28k
    } while ( parentDs.Get<bool>() == true );
2738
2739
166
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
162
#if 1
2745
162
    {
2746
162
        std::set<uint64_t> moduleIDs;
2747
162
        for (const auto& m : modules ) {
2748
126
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
126
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
126
            moduleIDs.insert(moduleID);
2756
126
        }
2757
2758
162
        std::set<uint64_t> operationModuleIDs;
2759
162
        for (const auto& op : operations) {
2760
153
            operationModuleIDs.insert(op.first->ID);
2761
153
        }
2762
2763
162
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
162
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
162
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
162
        for (const auto& id : addModuleIDs) {
2768
53
            operations.push_back({ modules.at(id), operations[0].second});
2769
53
        }
2770
162
    }
2771
162
#endif
2772
2773
162
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
162
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
368
    for (size_t i = 0; i < operations.size(); i++) {
2781
206
        auto& operation = operations[i];
2782
2783
206
        auto& module = operation.first;
2784
206
        auto& op = operation.second;
2785
2786
206
        if ( i > 0 ) {
2787
143
            auto& prevModule = operations[i-1].first;
2788
143
            auto& prevOp = operations[i].second;
2789
2790
143
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
72
                auto& curModifier = op.modifier.GetVectorPtr();
2792
72
                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
43
                } else {
2797
604
                    for (auto& c : curModifier) {
2798
604
                        c++;
2799
604
                    }
2800
29
                }
2801
72
            }
2802
143
        }
2803
2804
206
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
206
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
206
        const auto& result = results.back();
2811
2812
206
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
206
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
206
        if ( options.disableTests == false ) {
2830
206
            tests::test(op, result.second);
2831
206
        }
2832
2833
206
        postprocess(module, op, result);
2834
206
    }
2835
2836
162
    if ( options.noCompare == false ) {
2837
63
        compare(operations, results, data, size);
2838
63
    }
2839
162
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
157
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
157
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
157
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.16k
    do {
2725
2.16k
        auto op = getOp(&parentDs, data, size);
2726
2.16k
        auto module = getModule(parentDs);
2727
2.16k
        if ( module == nullptr ) {
2728
1.93k
            continue;
2729
1.93k
        }
2730
2731
236
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
236
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.15k
    } while ( parentDs.Get<bool>() == true );
2738
2739
157
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
151
#if 1
2745
151
    {
2746
151
        std::set<uint64_t> moduleIDs;
2747
151
        for (const auto& m : modules ) {
2748
96
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
96
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
96
            moduleIDs.insert(moduleID);
2756
96
        }
2757
2758
151
        std::set<uint64_t> operationModuleIDs;
2759
151
        for (const auto& op : operations) {
2760
123
            operationModuleIDs.insert(op.first->ID);
2761
123
        }
2762
2763
151
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
151
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
151
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
151
        for (const auto& id : addModuleIDs) {
2768
33
            operations.push_back({ modules.at(id), operations[0].second});
2769
33
        }
2770
151
    }
2771
151
#endif
2772
2773
151
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
151
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
307
    for (size_t i = 0; i < operations.size(); i++) {
2781
156
        auto& operation = operations[i];
2782
2783
156
        auto& module = operation.first;
2784
156
        auto& op = operation.second;
2785
2786
156
        if ( i > 0 ) {
2787
108
            auto& prevModule = operations[i-1].first;
2788
108
            auto& prevOp = operations[i].second;
2789
2790
108
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
50
                auto& curModifier = op.modifier.GetVectorPtr();
2792
50
                if ( curModifier.size() == 0 ) {
2793
14.3k
                    for (size_t j = 0; j < 512; j++) {
2794
14.3k
                        curModifier.push_back(1);
2795
14.3k
                    }
2796
28
                } else {
2797
303
                    for (auto& c : curModifier) {
2798
303
                        c++;
2799
303
                    }
2800
22
                }
2801
50
            }
2802
108
        }
2803
2804
156
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
156
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
156
        const auto& result = results.back();
2811
2812
156
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
156
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
156
        if ( options.disableTests == false ) {
2830
156
            tests::test(op, result.second);
2831
156
        }
2832
2833
156
        postprocess(module, op, result);
2834
156
    }
2835
2836
151
    if ( options.noCompare == false ) {
2837
48
        compare(operations, results, data, size);
2838
48
    }
2839
151
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::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
2.35k
    do {
2725
2.35k
        auto op = getOp(&parentDs, data, size);
2726
2.35k
        auto module = getModule(parentDs);
2727
2.35k
        if ( module == nullptr ) {
2728
1.98k
            continue;
2729
1.98k
        }
2730
2731
372
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
372
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.34k
    } while ( parentDs.Get<bool>() == true );
2738
2739
272
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
265
#if 1
2745
265
    {
2746
265
        std::set<uint64_t> moduleIDs;
2747
265
        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
265
        std::set<uint64_t> operationModuleIDs;
2759
265
        for (const auto& op : operations) {
2760
173
            operationModuleIDs.insert(op.first->ID);
2761
173
        }
2762
2763
265
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
265
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
265
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
265
        for (const auto& id : addModuleIDs) {
2768
59
            operations.push_back({ modules.at(id), operations[0].second});
2769
59
        }
2770
265
    }
2771
265
#endif
2772
2773
265
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
265
    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
232
        auto& operation = operations[i];
2782
2783
232
        auto& module = operation.first;
2784
232
        auto& op = operation.second;
2785
2786
232
        if ( i > 0 ) {
2787
162
            auto& prevModule = operations[i-1].first;
2788
162
            auto& prevOp = operations[i].second;
2789
2790
162
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
86
                auto& curModifier = op.modifier.GetVectorPtr();
2792
86
                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
9.02k
                    for (auto& c : curModifier) {
2798
9.02k
                        c++;
2799
9.02k
                    }
2800
36
                }
2801
86
            }
2802
162
        }
2803
2804
232
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
232
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
232
        const auto& result = results.back();
2811
2812
232
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
232
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
232
        if ( options.disableTests == false ) {
2830
232
            tests::test(op, result.second);
2831
232
        }
2832
2833
232
        postprocess(module, op, result);
2834
232
    }
2835
2836
265
    if ( options.noCompare == false ) {
2837
70
        compare(operations, results, data, size);
2838
70
    }
2839
265
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
142
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
142
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
142
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.64k
    do {
2725
1.64k
        auto op = getOp(&parentDs, data, size);
2726
1.64k
        auto module = getModule(parentDs);
2727
1.64k
        if ( module == nullptr ) {
2728
1.47k
            continue;
2729
1.47k
        }
2730
2731
166
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
166
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.63k
    } while ( parentDs.Get<bool>() == true );
2738
2739
142
    if ( operations.empty() == true ) {
2740
3
        return;
2741
3
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
139
#if 1
2745
139
    {
2746
139
        std::set<uint64_t> moduleIDs;
2747
139
        for (const auto& m : modules ) {
2748
60
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
60
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
60
            moduleIDs.insert(moduleID);
2756
60
        }
2757
2758
139
        std::set<uint64_t> operationModuleIDs;
2759
139
        for (const auto& op : operations) {
2760
91
            operationModuleIDs.insert(op.first->ID);
2761
91
        }
2762
2763
139
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
139
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
139
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
139
        for (const auto& id : addModuleIDs) {
2768
20
            operations.push_back({ modules.at(id), operations[0].second});
2769
20
        }
2770
139
    }
2771
139
#endif
2772
2773
139
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
139
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
250
    for (size_t i = 0; i < operations.size(); i++) {
2781
111
        auto& operation = operations[i];
2782
2783
111
        auto& module = operation.first;
2784
111
        auto& op = operation.second;
2785
2786
111
        if ( i > 0 ) {
2787
81
            auto& prevModule = operations[i-1].first;
2788
81
            auto& prevOp = operations[i].second;
2789
2790
81
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                if ( curModifier.size() == 0 ) {
2793
10.7k
                    for (size_t j = 0; j < 512; j++) {
2794
10.7k
                        curModifier.push_back(1);
2795
10.7k
                    }
2796
22
                } else {
2797
257
                    for (auto& c : curModifier) {
2798
257
                        c++;
2799
257
                    }
2800
22
                }
2801
43
            }
2802
81
        }
2803
2804
111
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
111
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
111
        const auto& result = results.back();
2811
2812
111
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
111
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
111
        if ( options.disableTests == false ) {
2830
111
            tests::test(op, result.second);
2831
111
        }
2832
2833
111
        postprocess(module, op, result);
2834
111
    }
2835
2836
139
    if ( options.noCompare == false ) {
2837
30
        compare(operations, results, data, size);
2838
30
    }
2839
139
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
131
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
131
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
131
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.90k
    do {
2725
1.90k
        auto op = getOp(&parentDs, data, size);
2726
1.90k
        auto module = getModule(parentDs);
2727
1.90k
        if ( module == nullptr ) {
2728
1.65k
            continue;
2729
1.65k
        }
2730
2731
246
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
246
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.89k
    } while ( parentDs.Get<bool>() == true );
2738
2739
131
    if ( operations.empty() == true ) {
2740
2
        return;
2741
2
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
129
#if 1
2745
129
    {
2746
129
        std::set<uint64_t> moduleIDs;
2747
129
        for (const auto& m : modules ) {
2748
86
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
86
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
86
            moduleIDs.insert(moduleID);
2756
86
        }
2757
2758
129
        std::set<uint64_t> operationModuleIDs;
2759
129
        for (const auto& op : operations) {
2760
119
            operationModuleIDs.insert(op.first->ID);
2761
119
        }
2762
2763
129
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
129
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
129
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
129
        for (const auto& id : addModuleIDs) {
2768
32
            operations.push_back({ modules.at(id), operations[0].second});
2769
32
        }
2770
129
    }
2771
129
#endif
2772
2773
129
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
129
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
280
    for (size_t i = 0; i < operations.size(); i++) {
2781
151
        auto& operation = operations[i];
2782
2783
151
        auto& module = operation.first;
2784
151
        auto& op = operation.second;
2785
2786
151
        if ( i > 0 ) {
2787
108
            auto& prevModule = operations[i-1].first;
2788
108
            auto& prevOp = operations[i].second;
2789
2790
108
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
59
                auto& curModifier = op.modifier.GetVectorPtr();
2792
59
                if ( curModifier.size() == 0 ) {
2793
16.9k
                    for (size_t j = 0; j < 512; j++) {
2794
16.8k
                        curModifier.push_back(1);
2795
16.8k
                    }
2796
33
                } else {
2797
402
                    for (auto& c : curModifier) {
2798
402
                        c++;
2799
402
                    }
2800
26
                }
2801
59
            }
2802
108
        }
2803
2804
151
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
151
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
151
        const auto& result = results.back();
2811
2812
151
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
151
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
151
        if ( options.disableTests == false ) {
2830
151
            tests::test(op, result.second);
2831
151
        }
2832
2833
151
        postprocess(module, op, result);
2834
151
    }
2835
2836
129
    if ( options.noCompare == false ) {
2837
43
        compare(operations, results, data, size);
2838
43
    }
2839
129
}
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 */