Coverage Report

Created: 2023-09-25 06:34

/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
112k
#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
6.60k
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
6.60k
    (void)module;
53
6.60k
    (void)op;
54
55
6.60k
    if ( result.second != std::nullopt ) {
56
3.49k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
3.49k
    }
58
6.60k
}
59
60
6.60k
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
6.60k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
6.60k
    return module->OpDigest(op);
64
6.60k
}
65
66
/* Specialization for operation::HMAC */
67
4.04k
template<> void ExecutorBase<component::MAC, operation::HMAC>::postprocess(std::shared_ptr<Module> module, operation::HMAC& op, const ExecutorBase<component::MAC, operation::HMAC>::ResultPair& result) const {
68
4.04k
    (void)module;
69
4.04k
    (void)op;
70
71
4.04k
    if ( result.second != std::nullopt ) {
72
1.41k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
1.41k
    }
74
4.04k
}
75
76
4.04k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
4.04k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
4.04k
    return module->OpHMAC(op);
80
4.04k
}
81
82
/* Specialization for operation::UMAC */
83
3.93k
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.93k
    (void)module;
85
3.93k
    (void)op;
86
87
3.93k
    if ( result.second != std::nullopt ) {
88
1.97k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
1.97k
    }
90
3.93k
}
91
92
3.93k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
3.93k
    return module->OpUMAC(op);
94
3.93k
}
95
96
/* Specialization for operation::CMAC */
97
4.88k
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
4.88k
    (void)module;
99
4.88k
    (void)op;
100
101
4.88k
    if ( result.second != std::nullopt ) {
102
2.12k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
2.12k
    }
104
4.88k
}
105
106
4.88k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
4.88k
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
4.88k
    return module->OpCMAC(op);
110
4.88k
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
22.6k
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
22.6k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
22.6k
    if ( result.second != std::nullopt ) {
119
8.49k
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
8.49k
        if ( result.second->tag != std::nullopt ) {
121
3.77k
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
3.77k
        }
123
8.49k
    }
124
125
22.6k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
7.76k
        using fuzzing::datasource::ID;
127
128
7.76k
        bool tryDecrypt = true;
129
130
7.76k
        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
7.76k
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
7.76k
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
7.76k
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
7.76k
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
7.76k
                    op.cleartext.GetSize() + 32,
171
172
7.76k
                    op.aad,
173
174
                    /* Empty modifier */
175
7.76k
                    {});
176
177
7.76k
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
7.76k
            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
7.76k
            } 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
7.76k
        }
208
7.76k
    }
209
22.6k
}
210
211
22.6k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
22.6k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
22.6k
    return module->OpSymmetricEncrypt(op);
215
22.6k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
12.7k
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.7k
    (void)module;
220
12.7k
    (void)op;
221
222
12.7k
    if ( result.second != std::nullopt ) {
223
1.68k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
1.68k
    }
225
12.7k
}
226
227
12.7k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
12.7k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
12.7k
    return module->OpSymmetricDecrypt(op);
231
12.7k
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
1.02k
template<> void ExecutorBase<component::Key, operation::KDF_SCRYPT>::postprocess(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op, const ExecutorBase<component::Key, operation::KDF_SCRYPT>::ResultPair& result) const {
235
1.02k
    (void)module;
236
1.02k
    (void)op;
237
238
1.02k
    if ( result.second != std::nullopt ) {
239
308
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
308
    }
241
1.02k
}
242
243
1.02k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
1.02k
    return module->OpKDF_SCRYPT(op);
245
1.02k
}
246
247
/* Specialization for operation::KDF_HKDF */
248
5.49k
template<> void ExecutorBase<component::Key, operation::KDF_HKDF>::postprocess(std::shared_ptr<Module> module, operation::KDF_HKDF& op, const ExecutorBase<component::Key, operation::KDF_HKDF>::ResultPair& result) const {
249
5.49k
    (void)module;
250
5.49k
    (void)op;
251
252
5.49k
    if ( result.second != std::nullopt ) {
253
3.16k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
3.16k
    }
255
5.49k
}
256
257
5.49k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
5.49k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
5.49k
    return module->OpKDF_HKDF(op);
261
5.49k
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
624
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
624
    (void)module;
266
624
    (void)op;
267
268
624
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
624
}
272
273
624
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
624
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
624
    return module->OpKDF_PBKDF(op);
277
624
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
534
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
534
    (void)module;
282
534
    (void)op;
283
284
534
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
534
}
288
289
534
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
534
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
534
    return module->OpKDF_PBKDF1(op);
293
534
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
2.57k
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.57k
    (void)module;
298
2.57k
    (void)op;
299
300
2.57k
    if ( result.second != std::nullopt ) {
301
857
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
857
    }
303
2.57k
}
304
305
2.57k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
2.57k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
2.57k
    return module->OpKDF_PBKDF2(op);
309
2.57k
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
892
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
892
    (void)module;
314
892
    (void)op;
315
316
892
    if ( result.second != std::nullopt ) {
317
411
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
411
    }
319
892
}
320
321
892
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
892
    return module->OpKDF_ARGON2(op);
323
892
}
324
325
/* Specialization for operation::KDF_SSH */
326
630
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
630
    (void)module;
328
630
    (void)op;
329
330
630
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
630
}
334
335
630
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
630
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
630
    return module->OpKDF_SSH(op);
339
630
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
723
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
723
    (void)module;
344
723
    (void)op;
345
346
723
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
723
}
350
351
723
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
723
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
723
    return module->OpKDF_TLS1_PRF(op);
355
723
}
356
357
/* Specialization for operation::KDF_X963 */
358
554
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
554
    (void)module;
360
554
    (void)op;
361
362
554
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
554
}
366
367
554
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
554
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
554
    return module->OpKDF_X963(op);
371
554
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
197
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
197
    (void)module;
376
197
    (void)op;
377
378
197
    if ( result.second != std::nullopt ) {
379
52
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
52
    }
381
197
}
382
383
197
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
197
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
197
    return module->OpKDF_BCRYPT(op);
387
197
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
2.12k
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
2.12k
    (void)module;
392
2.12k
    (void)op;
393
394
2.12k
    if ( result.second != std::nullopt ) {
395
997
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
997
    }
397
2.12k
}
398
399
2.12k
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
2.12k
    if ( op.mech.mode == true ) {
401
1.24k
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
1.24k
    }
403
404
2.12k
    return module->OpKDF_SP_800_108(op);
405
2.12k
}
406
407
408
/* Specialization for operation::ECC_PrivateToPublic */
409
2.29k
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 {
410
2.29k
    (void)module;
411
412
2.29k
    if ( result.second != std::nullopt  ) {
413
977
        const auto curveID = op.curveType.Get();
414
977
        const auto privkey = op.priv.ToTrimmedString();
415
977
        const auto pub_x = result.second->first.ToTrimmedString();
416
977
        const auto pub_y = result.second->second.ToTrimmedString();
417
418
977
        Pool_CurvePrivkey.Set({ curveID, privkey });
419
977
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
420
977
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
421
422
977
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
423
977
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
424
977
    }
425
2.29k
}
426
427
2.29k
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op) const {
428
2.29k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
429
430
2.29k
    const size_t size = op.priv.ToTrimmedString().size();
431
432
2.29k
    if ( size == 0 || size > 4096 ) {
433
2
        return std::nullopt;
434
2
    }
435
436
2.29k
    return module->OpECC_PrivateToPublic(op);
437
2.29k
}
438
439
/* Specialization for operation::ECC_ValidatePubkey */
440
2.04k
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 {
441
2.04k
    (void)module;
442
2.04k
    (void)op;
443
2.04k
    (void)result;
444
2.04k
}
445
446
2.04k
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
447
2.04k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
448
449
2.04k
    return module->OpECC_ValidatePubkey(op);
450
2.04k
}
451
452
/* Specialization for operation::ECC_GenerateKeyPair */
453
454
/* Do not compare DH_GenerateKeyPair results, because the result can be produced indeterministically */
455
template <>
456
71
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 {
457
71
    (void)operations;
458
71
    (void)results;
459
71
    (void)data;
460
71
    (void)size;
461
71
}
462
463
1.86k
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 {
464
1.86k
    (void)module;
465
466
1.86k
    if ( result.second != std::nullopt  ) {
467
435
        const auto curveID = op.curveType.Get();
468
435
        const auto privkey = result.second->priv.ToTrimmedString();
469
435
        const auto pub_x = result.second->pub.first.ToTrimmedString();
470
435
        const auto pub_y = result.second->pub.second.ToTrimmedString();
471
472
435
        Pool_CurvePrivkey.Set({ curveID, privkey });
473
435
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
474
435
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
475
435
    }
476
1.86k
}
477
478
1.86k
template<> std::optional<component::ECC_KeyPair> ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op) const {
479
1.86k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
480
481
1.86k
    return module->OpECC_GenerateKeyPair(op);
482
1.86k
}
483
484
/* Specialization for operation::ECCSI_Sign */
485
200
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 {
486
200
    (void)module;
487
488
200
    if ( result.second != std::nullopt  ) {
489
0
        const auto curveID = op.curveType.Get();
490
0
        const auto cleartext = op.cleartext.ToHex();
491
0
        const auto id = op.id.ToHex();
492
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
493
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
494
0
        const auto pvt_x = result.second->pvt.first.ToTrimmedString();
495
0
        const auto pvt_y = result.second->pvt.second.ToTrimmedString();
496
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
497
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
498
499
0
        Pool_CurveECCSISignature.Set({
500
0
                curveID,
501
0
                cleartext,
502
0
                id,
503
0
                pub_x, pub_y,
504
0
                pvt_x, pvt_y,
505
0
                sig_r, sig_s});
506
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
507
0
        Pool_CurveECC_Point.Set({ curveID, pvt_x, pvt_y });
508
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
509
510
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
511
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
512
0
        if ( pvt_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pvt_x); }
513
0
        if ( pvt_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pvt_y); }
514
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
515
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
516
517
0
        {
518
0
            auto opVerify = operation::ECCSI_Verify(
519
0
                    op,
520
0
                    *(result.second),
521
0
                    op.modifier);
522
523
0
            const auto verifyResult = module->OpECCSI_Verify(opVerify);
524
0
            CF_ASSERT(
525
0
                    verifyResult == std::nullopt ||
526
0
                    *verifyResult == true,
527
0
                    "Cannot verify generated signature");
528
0
        }
529
0
    }
530
200
}
531
532
200
template<> std::optional<component::ECCSI_Signature> ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Sign& op) const {
533
200
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
534
200
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
535
536
200
    const size_t size = op.priv.ToTrimmedString().size();
537
538
200
    if ( size == 0 || size > 4096 ) {
539
0
        return std::nullopt;
540
0
    }
541
542
200
    return module->OpECCSI_Sign(op);
543
200
}
544
545
/* Specialization for operation::ECDSA_Sign */
546
2.30k
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 {
547
2.30k
    (void)module;
548
549
2.30k
    if ( result.second != std::nullopt  ) {
550
1.07k
        const auto curveID = op.curveType.Get();
551
1.07k
        const auto cleartext = op.cleartext.ToHex();
552
1.07k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
553
1.07k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
554
1.07k
        const auto sig_r = result.second->signature.first.ToTrimmedString();
555
1.07k
        const auto sig_s = result.second->signature.second.ToTrimmedString();
556
557
1.07k
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
558
1.07k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
559
1.07k
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
560
561
1.07k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
562
1.07k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
563
1.07k
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
564
1.07k
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
565
566
1.07k
        {
567
1.07k
            auto opVerify = operation::ECDSA_Verify(
568
1.07k
                    op,
569
1.07k
                    *(result.second),
570
1.07k
                    op.modifier);
571
572
1.07k
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
573
1.07k
            CF_ASSERT(
574
1.07k
                    verifyResult == std::nullopt ||
575
1.07k
                    *verifyResult == true,
576
1.07k
                    "Cannot verify generated signature");
577
1.07k
        }
578
1.07k
    }
579
2.30k
}
580
581
2.30k
template<> std::optional<component::ECDSA_Signature> ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Sign& op) const {
582
2.30k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
583
2.30k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
584
585
2.30k
    const size_t size = op.priv.ToTrimmedString().size();
586
587
2.30k
    if ( size == 0 || size > 4096 ) {
588
2
        return std::nullopt;
589
2
    }
590
591
2.30k
    return module->OpECDSA_Sign(op);
592
2.30k
}
593
594
/* Specialization for operation::ECGDSA_Sign */
595
536
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 {
596
536
    (void)module;
597
598
536
    if ( result.second != std::nullopt  ) {
599
88
        const auto curveID = op.curveType.Get();
600
88
        const auto cleartext = op.cleartext.ToHex();
601
88
        const auto pub_x = result.second->pub.first.ToTrimmedString();
602
88
        const auto pub_y = result.second->pub.second.ToTrimmedString();
603
88
        const auto sig_r = result.second->signature.first.ToTrimmedString();
604
88
        const auto sig_s = result.second->signature.second.ToTrimmedString();
605
606
88
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
607
88
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
608
88
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
609
610
88
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
611
88
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
612
88
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
613
88
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
614
88
    }
615
536
}
616
617
536
template<> std::optional<component::ECGDSA_Signature> ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Sign& op) const {
618
536
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
619
536
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
620
621
536
    const size_t size = op.priv.ToTrimmedString().size();
622
623
536
    if ( size == 0 || size > 4096 ) {
624
9
        return std::nullopt;
625
9
    }
626
627
527
    return module->OpECGDSA_Sign(op);
628
536
}
629
630
/* Specialization for operation::ECRDSA_Sign */
631
174
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 {
632
174
    (void)module;
633
634
174
    if ( result.second != std::nullopt  ) {
635
0
        const auto curveID = op.curveType.Get();
636
0
        const auto cleartext = op.cleartext.ToHex();
637
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
638
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
639
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
640
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
641
642
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
643
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
644
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
645
646
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
647
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
648
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
649
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
650
0
    }
651
174
}
652
653
174
template<> std::optional<component::ECRDSA_Signature> ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Sign& op) const {
654
174
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
655
174
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
656
657
174
    const size_t size = op.priv.ToTrimmedString().size();
658
659
174
    if ( size == 0 || size > 4096 ) {
660
0
        return std::nullopt;
661
0
    }
662
663
174
    return module->OpECRDSA_Sign(op);
664
174
}
665
666
/* Specialization for operation::Schnorr_Sign */
667
207
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 {
668
207
    (void)module;
669
670
207
    if ( result.second != std::nullopt  ) {
671
0
        const auto curveID = op.curveType.Get();
672
0
        const auto cleartext = op.cleartext.ToHex();
673
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
674
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
675
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
676
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
677
678
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
679
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
680
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
681
682
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
683
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
684
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
685
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
686
0
    }
687
207
}
688
689
207
template<> std::optional<component::Schnorr_Signature> ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Sign& op) const {
690
207
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
691
207
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
692
693
207
    const size_t size = op.priv.ToTrimmedString().size();
694
695
207
    if ( size == 0 || size > 4096 ) {
696
0
        return std::nullopt;
697
0
    }
698
699
207
    return module->OpSchnorr_Sign(op);
700
207
}
701
702
/* Specialization for operation::ECCSI_Verify */
703
162
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 {
704
162
    (void)module;
705
162
    (void)op;
706
162
    (void)result;
707
162
}
708
709
162
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
710
162
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
711
162
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
712
713
162
    return module->OpECCSI_Verify(op);
714
162
}
715
716
/* Specialization for operation::ECDSA_Verify */
717
1.10k
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 {
718
1.10k
    (void)module;
719
1.10k
    (void)op;
720
1.10k
    (void)result;
721
1.10k
}
722
723
1.10k
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
724
1.10k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
1.10k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
726
727
    /* Intentionally do not constrain the size of the public key or
728
     * signature (like we do for BignumCalc).
729
     *
730
     * If any large public key or signature causes a time-out (or
731
     * worse), this is something that needs attention;
732
     * because verifiers sometimes process untrusted public keys,
733
     * signatures or both, they should be resistant to bugs
734
     * arising from large inputs.
735
     */
736
737
1.10k
    return module->OpECDSA_Verify(op);
738
1.10k
}
739
740
/* Specialization for operation::ECGDSA_Verify */
741
595
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 {
742
595
    (void)module;
743
595
    (void)op;
744
595
    (void)result;
745
595
}
746
747
595
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
748
595
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
749
595
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
750
751
    /* Intentionally do not constrain the size of the public key or
752
     * signature (like we do for BignumCalc).
753
     *
754
     * If any large public key or signature causes a time-out (or
755
     * worse), this is something that needs attention;
756
     * because verifiers sometimes process untrusted public keys,
757
     * signatures or both, they should be resistant to bugs
758
     * arising from large inputs.
759
     */
760
761
595
    return module->OpECGDSA_Verify(op);
762
595
}
763
764
/* Specialization for operation::ECRDSA_Verify */
765
140
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 {
766
140
    (void)module;
767
140
    (void)op;
768
140
    (void)result;
769
140
}
770
771
140
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
772
140
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
773
140
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
774
775
    /* Intentionally do not constrain the size of the public key or
776
     * signature (like we do for BignumCalc).
777
     *
778
     * If any large public key or signature causes a time-out (or
779
     * worse), this is something that needs attention;
780
     * because verifiers sometimes process untrusted public keys,
781
     * signatures or both, they should be resistant to bugs
782
     * arising from large inputs.
783
     */
784
785
140
    return module->OpECRDSA_Verify(op);
786
140
}
787
788
/* Specialization for operation::Schnorr_Verify */
789
156
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 {
790
156
    (void)module;
791
156
    (void)op;
792
156
    (void)result;
793
156
}
794
795
156
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
796
156
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
797
156
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
798
799
    /* Intentionally do not constrain the size of the public key or
800
     * signature (like we do for BignumCalc).
801
     *
802
     * If any large public key or signature causes a time-out (or
803
     * worse), this is something that needs attention;
804
     * because verifiers sometimes process untrusted public keys,
805
     * signatures or both, they should be resistant to bugs
806
     * arising from large inputs.
807
     */
808
809
156
    return module->OpSchnorr_Verify(op);
810
156
}
811
812
1.74k
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 {
813
1.74k
    (void)module;
814
1.74k
    (void)op;
815
1.74k
    (void)result;
816
1.74k
}
817
818
1.74k
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Recover& op) const {
819
1.74k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
820
1.74k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
821
822
1.74k
    return module->OpECDSA_Recover(op);
823
1.74k
}
824
825
/* Specialization for operation::DSA_Verify */
826
0
template<> void ExecutorBase<bool, operation::DSA_Verify>::updateExtraCounters(const uint64_t moduleID, operation::DSA_Verify& op) const {
827
0
    (void)moduleID;
828
0
    (void)op;
829
830
    /* TODO */
831
0
}
832
833
868
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 {
834
868
    (void)module;
835
868
    (void)op;
836
868
    (void)result;
837
868
}
838
839
868
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
840
868
    const std::vector<size_t> sizes = {
841
868
        op.parameters.p.ToTrimmedString().size(),
842
868
        op.parameters.q.ToTrimmedString().size(),
843
868
        op.parameters.g.ToTrimmedString().size(),
844
868
        op.pub.ToTrimmedString().size(),
845
868
        op.signature.first.ToTrimmedString().size(),
846
868
        op.signature.second.ToTrimmedString().size(),
847
868
    };
848
849
5.19k
    for (const auto& size : sizes) {
850
5.19k
        if ( size == 0 || size > 4096 ) {
851
9
            return std::nullopt;
852
9
        }
853
5.19k
    }
854
855
859
    return module->OpDSA_Verify(op);
856
868
}
857
858
/* Specialization for operation::DSA_Sign */
859
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
860
template <>
861
85
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 {
862
85
    (void)operations;
863
85
    (void)results;
864
85
    (void)data;
865
85
    (void)size;
866
85
}
867
0
template<> void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::updateExtraCounters(const uint64_t moduleID, operation::DSA_Sign& op) const {
868
0
    (void)moduleID;
869
0
    (void)op;
870
871
    /* TODO */
872
0
}
873
874
268
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 {
875
268
    (void)module;
876
268
    (void)op;
877
268
    if ( result.second != std::nullopt ) {
878
0
        const auto cleartext = op.cleartext.ToHex();
879
0
        const auto p = op.parameters.p.ToTrimmedString();
880
0
        const auto q = op.parameters.q.ToTrimmedString();
881
0
        const auto g = op.parameters.g.ToTrimmedString();
882
0
        const auto r = result.second->signature.first.ToTrimmedString();
883
0
        const auto s = result.second->signature.second.ToTrimmedString();
884
0
        const auto pub = result.second->pub.ToTrimmedString();
885
886
0
        Pool_DSASignature.Set({
887
0
                cleartext,
888
0
                p,
889
0
                q,
890
0
                g,
891
0
                pub,
892
0
                r,
893
0
                s
894
0
        });
895
896
0
        if ( r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(r); }
897
0
        if ( s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(s); }
898
0
    }
899
268
}
900
901
268
template<> std::optional<component::DSA_Signature> ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::callModule(std::shared_ptr<Module> module, operation::DSA_Sign& op) const {
902
268
    const std::vector<size_t> sizes = {
903
268
        op.parameters.p.ToTrimmedString().size(),
904
268
        op.parameters.q.ToTrimmedString().size(),
905
268
        op.parameters.g.ToTrimmedString().size(),
906
268
        op.priv.ToTrimmedString().size(),
907
268
    };
908
909
1.06k
    for (const auto& size : sizes) {
910
1.06k
        if ( size == 0 || size > 4096 ) {
911
4
            return std::nullopt;
912
4
        }
913
1.06k
    }
914
915
264
    return module->OpDSA_Sign(op);
916
268
}
917
918
/* Specialization for operation::DSA_PrivateToPublic */
919
920
0
template<> void ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::updateExtraCounters(const uint64_t moduleID, operation::DSA_PrivateToPublic& op) const {
921
0
    (void)moduleID;
922
0
    (void)op;
923
924
    /* TODO */
925
0
}
926
927
150
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 {
928
150
    (void)result;
929
150
    (void)module;
930
150
    (void)op;
931
150
    if ( result.second != std::nullopt ) {
932
        //Pool_DSA_PubPriv.Set({pub, priv});
933
0
    }
934
150
}
935
936
150
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
937
150
    return module->OpDSA_PrivateToPublic(op);
938
150
}
939
940
/* Specialization for operation::DSA_GenerateKeyPair */
941
942
/* Do not compare DSA_GenerateKeyPair results, because the result can be produced indeterministically */
943
template <>
944
73
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 {
945
73
    (void)operations;
946
73
    (void)results;
947
73
    (void)data;
948
73
    (void)size;
949
73
}
950
951
0
template<> void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateKeyPair& op) const {
952
0
    (void)moduleID;
953
0
    (void)op;
954
955
    /* TODO */
956
0
}
957
958
250
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 {
959
250
    (void)result;
960
250
    (void)module;
961
250
    (void)op;
962
250
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
963
0
        const auto priv = result.second->first.ToTrimmedString();
964
0
        const auto pub = result.second->second.ToTrimmedString();
965
966
0
        Pool_DSA_PubPriv.Set({pub, priv});
967
0
    }
968
250
}
969
970
250
template<> std::optional<component::DSA_KeyPair> ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateKeyPair& op) const {
971
250
    const std::vector<size_t> sizes = {
972
250
        op.p.ToTrimmedString().size(),
973
250
        op.q.ToTrimmedString().size(),
974
250
        op.g.ToTrimmedString().size(),
975
250
    };
976
977
745
    for (const auto& size : sizes) {
978
745
        if ( size == 0 || size > 4096 ) {
979
14
            return std::nullopt;
980
14
        }
981
745
    }
982
983
236
    return module->OpDSA_GenerateKeyPair(op);
984
250
}
985
986
/* Specialization for operation::DSA_GenerateParameters */
987
988
/* Do not compare DSA_GenerateParameters results, because the result can be produced indeterministically */
989
template <>
990
41
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 {
991
41
    (void)operations;
992
41
    (void)results;
993
41
    (void)data;
994
41
    (void)size;
995
41
}
996
997
0
template<> void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateParameters& op) const {
998
0
    (void)moduleID;
999
0
    (void)op;
1000
1001
    /* TODO */
1002
0
}
1003
1004
149
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 {
1005
149
    (void)result;
1006
149
    (void)module;
1007
149
    (void)op;
1008
149
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1009
0
        const auto P = result.second->p.ToTrimmedString();
1010
0
        const auto Q = result.second->q.ToTrimmedString();
1011
0
        const auto G = result.second->g.ToTrimmedString();
1012
1013
0
        Pool_DSA_PQG.Set({P, Q, G});
1014
1015
0
        if ( P.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(P); }
1016
0
        if ( Q.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(Q); }
1017
0
        if ( G.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(G); }
1018
0
    }
1019
149
}
1020
1021
149
template<> std::optional<component::DSA_Parameters> ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op) const {
1022
149
    return module->OpDSA_GenerateParameters(op);
1023
149
}
1024
1025
/* Specialization for operation::ECDH_Derive */
1026
161
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 {
1027
161
    (void)module;
1028
161
    (void)op;
1029
161
    (void)result;
1030
161
}
1031
1032
161
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1033
161
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1034
1035
161
    return module->OpECDH_Derive(op);
1036
161
}
1037
1038
/* Specialization for operation::ECIES_Encrypt */
1039
template <>
1040
57
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 {
1041
57
    (void)operations;
1042
57
    (void)results;
1043
57
    (void)data;
1044
57
    (void)size;
1045
57
}
1046
204
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 {
1047
204
    (void)module;
1048
204
    (void)op;
1049
204
    (void)result;
1050
204
}
1051
1052
204
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1053
204
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1054
1055
204
    return module->OpECIES_Encrypt(op);
1056
204
}
1057
1058
/* Specialization for operation::ECIES_Decrypt */
1059
185
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 {
1060
185
    (void)module;
1061
185
    (void)op;
1062
185
    (void)result;
1063
185
}
1064
1065
185
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1066
185
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1067
1068
185
    return module->OpECIES_Decrypt(op);
1069
185
}
1070
1071
/* Specialization for operation::ECC_Point_Add */
1072
329
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 {
1073
329
    (void)module;
1074
1075
329
    if ( result.second != std::nullopt  ) {
1076
29
        const auto curveID = op.curveType.Get();
1077
29
        const auto x = result.second->first.ToTrimmedString();
1078
29
        const auto y = result.second->second.ToTrimmedString();
1079
1080
29
        Pool_CurveECC_Point.Set({ curveID, x, y });
1081
1082
29
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1083
29
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1084
29
    }
1085
329
}
1086
1087
329
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 {
1088
329
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1089
1090
329
    return module->OpECC_Point_Add(op);
1091
329
}
1092
1093
/* Specialization for operation::ECC_Point_Sub */
1094
364
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 {
1095
364
    (void)module;
1096
1097
364
    if ( result.second != std::nullopt  ) {
1098
52
        const auto curveID = op.curveType.Get();
1099
52
        const auto x = result.second->first.ToTrimmedString();
1100
52
        const auto y = result.second->second.ToTrimmedString();
1101
1102
52
        Pool_CurveECC_Point.Set({ curveID, x, y });
1103
1104
52
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1105
52
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1106
52
    }
1107
364
}
1108
1109
364
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 {
1110
364
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1111
1112
364
    return module->OpECC_Point_Sub(op);
1113
364
}
1114
1115
/* Specialization for operation::ECC_Point_Mul */
1116
844
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 {
1117
844
    (void)module;
1118
1119
844
    if ( result.second != std::nullopt  ) {
1120
183
        const auto curveID = op.curveType.Get();
1121
183
        const auto x = result.second->first.ToTrimmedString();
1122
183
        const auto y = result.second->second.ToTrimmedString();
1123
1124
183
        Pool_CurveECC_Point.Set({ curveID, x, y });
1125
1126
183
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1127
183
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1128
183
    }
1129
844
}
1130
1131
844
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 {
1132
844
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1133
1134
844
    return module->OpECC_Point_Mul(op);
1135
844
}
1136
1137
/* Specialization for operation::ECC_Point_Neg */
1138
317
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 {
1139
317
    (void)module;
1140
1141
317
    if ( result.second != std::nullopt  ) {
1142
66
        const auto curveID = op.curveType.Get();
1143
66
        const auto x = result.second->first.ToTrimmedString();
1144
66
        const auto y = result.second->second.ToTrimmedString();
1145
1146
66
        Pool_CurveECC_Point.Set({ curveID, x, y });
1147
1148
66
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1149
66
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1150
66
    }
1151
317
}
1152
1153
317
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 {
1154
317
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1155
1156
317
    return module->OpECC_Point_Neg(op);
1157
317
}
1158
1159
/* Specialization for operation::ECC_Point_Dbl */
1160
280
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 {
1161
280
    (void)module;
1162
1163
280
    if ( result.second != std::nullopt  ) {
1164
35
        const auto curveID = op.curveType.Get();
1165
35
        const auto x = result.second->first.ToTrimmedString();
1166
35
        const auto y = result.second->second.ToTrimmedString();
1167
1168
35
        Pool_CurveECC_Point.Set({ curveID, x, y });
1169
1170
35
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1171
35
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1172
35
    }
1173
280
}
1174
1175
280
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 {
1176
280
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1177
1178
280
    return module->OpECC_Point_Dbl(op);
1179
280
}
1180
1181
/* Specialization for operation::ECC_Point_Cmp */
1182
306
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 {
1183
306
    (void)module;
1184
306
    (void)result;
1185
306
    (void)op;
1186
306
}
1187
1188
306
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1189
306
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1190
1191
306
    return module->OpECC_Point_Cmp(op);
1192
306
}
1193
1194
/* Specialization for operation::DH_Derive */
1195
833
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 {
1196
833
    (void)module;
1197
833
    (void)op;
1198
833
    (void)result;
1199
833
}
1200
1201
833
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1202
833
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1203
817
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1204
803
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1205
794
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1206
1207
785
    return module->OpDH_Derive(op);
1208
794
}
1209
1210
/* Specialization for operation::DH_GenerateKeyPair */
1211
240
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 {
1212
240
    (void)result;
1213
240
    (void)op;
1214
240
    (void)module;
1215
1216
240
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1217
0
        const auto priv = result.second->first.ToTrimmedString();
1218
0
        const auto pub = result.second->second.ToTrimmedString();
1219
1220
0
        Pool_DH_PrivateKey.Set(priv);
1221
0
        Pool_DH_PublicKey.Set(pub);
1222
0
    }
1223
240
}
1224
1225
240
template<> std::optional<component::DH_KeyPair> ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DH_GenerateKeyPair& op) const {
1226
240
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1227
231
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1228
1229
222
    return module->OpDH_GenerateKeyPair(op);
1230
231
}
1231
1232
/* Specialization for operation::BignumCalc */
1233
21.3k
template<> void ExecutorBase<component::Bignum, operation::BignumCalc>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc& op, const ExecutorBase<component::Bignum, operation::BignumCalc>::ResultPair& result) const {
1234
21.3k
    (void)module;
1235
21.3k
    (void)op;
1236
1237
21.3k
    if ( result.second != std::nullopt  ) {
1238
5.11k
        const auto bignum = result.second->ToTrimmedString();
1239
1240
5.11k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1241
5.09k
            Pool_Bignum.Set(bignum);
1242
5.09k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1243
844
                Pool_Bignum_Primes.Set(bignum);
1244
844
            }
1245
5.09k
        }
1246
5.11k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1247
296
            if ( bignum == "1" ) {
1248
141
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1249
141
            }
1250
296
        }
1251
5.11k
    }
1252
21.3k
}
1253
1254
21.3k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1255
21.3k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1256
1257
    /* Prevent timeouts */
1258
21.3k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1259
21.3k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1260
21.3k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1261
21.3k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1262
1263
21.3k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1264
2.18k
        return std::nullopt;
1265
2.18k
    }
1266
1267
19.1k
    switch ( op.calcOp.Get() ) {
1268
74
        case    CF_CALCOP("SetBit(A,B)"):
1269
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1270
74
            if ( op.bn1.GetSize() > 4 ) {
1271
15
                return std::nullopt;
1272
15
            }
1273
59
            break;
1274
100
        case    CF_CALCOP("Exp(A,B)"):
1275
100
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1276
28
                return std::nullopt;
1277
28
            }
1278
72
            break;
1279
72
        case    CF_CALCOP("ModLShift(A,B,C)"):
1280
29
            if ( op.bn1.GetSize() > 4 ) {
1281
13
                return std::nullopt;
1282
13
            }
1283
16
            break;
1284
162
        case    CF_CALCOP("Exp2(A)"):
1285
162
            if ( op.bn0.GetSize() > 4 ) {
1286
17
                return std::nullopt;
1287
17
            }
1288
145
            break;
1289
19.1k
    }
1290
1291
19.0k
    return module->OpBignumCalc(op);
1292
19.1k
}
1293
1294
/* Specialization for operation::BignumCalc_Fp2 */
1295
304
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 {
1296
304
    (void)module;
1297
304
    (void)op;
1298
1299
304
    if ( result.second != std::nullopt  ) {
1300
0
        const auto bignum_first = result.second->first.ToTrimmedString();
1301
0
        const auto bignum_second = result.second->second.ToTrimmedString();
1302
1303
0
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1304
0
            Pool_Bignum.Set(bignum_first);
1305
0
        }
1306
0
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1307
0
            Pool_Bignum.Set(bignum_second);
1308
0
        }
1309
0
    }
1310
304
}
1311
1312
304
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1313
304
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1314
1315
    /* Prevent timeouts */
1316
304
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1317
295
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1318
286
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1319
271
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1320
262
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1321
247
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1322
232
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1323
223
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1324
1325
208
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1326
0
        return std::nullopt;
1327
0
    }
1328
1329
208
    return module->OpBignumCalc_Fp2(op);
1330
208
}
1331
1332
/* Specialization for operation::BignumCalc_Fp12 */
1333
844
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 {
1334
844
    (void)module;
1335
844
    (void)op;
1336
1337
844
    if ( result.second != std::nullopt  ) {
1338
0
        Pool_Fp12.Set({
1339
0
                result.second->bn1.ToTrimmedString(),
1340
0
                result.second->bn2.ToTrimmedString(),
1341
0
                result.second->bn3.ToTrimmedString(),
1342
0
                result.second->bn4.ToTrimmedString(),
1343
0
                result.second->bn5.ToTrimmedString(),
1344
0
                result.second->bn6.ToTrimmedString(),
1345
0
                result.second->bn7.ToTrimmedString(),
1346
0
                result.second->bn8.ToTrimmedString(),
1347
0
                result.second->bn9.ToTrimmedString(),
1348
0
                result.second->bn10.ToTrimmedString(),
1349
0
                result.second->bn11.ToTrimmedString(),
1350
0
                result.second->bn12.ToTrimmedString()
1351
0
        });
1352
        /* TODO */
1353
#if 0
1354
        const auto bignum_first = result.second->first.ToTrimmedString();
1355
        const auto bignum_second = result.second->second.ToTrimmedString();
1356
1357
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1358
            Pool_Bignum.Set(bignum_first);
1359
        }
1360
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1361
            Pool_Bignum.Set(bignum_second);
1362
        }
1363
#endif
1364
0
    }
1365
844
}
1366
1367
844
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1368
844
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1369
1370
    /* Prevent timeouts */
1371
844
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1372
833
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1373
824
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1374
815
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1375
800
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1376
791
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1377
780
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1378
766
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1379
752
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1380
743
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1381
734
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1382
723
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1383
1384
708
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1385
697
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1386
685
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1387
676
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1388
667
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1389
654
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1390
645
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1391
632
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1392
623
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1393
610
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1394
594
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1395
582
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1396
1397
570
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1398
558
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1399
546
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1400
535
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1401
523
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1402
514
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1403
501
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1404
489
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1405
471
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1406
460
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1407
446
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1408
435
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1409
1410
421
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1411
410
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1412
401
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1413
387
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1414
378
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1415
367
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1416
355
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1417
341
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1418
330
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1419
321
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1420
312
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1421
300
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1422
1423
291
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1424
0
        return std::nullopt;
1425
0
    }
1426
1427
291
    return module->OpBignumCalc_Fp12(op);
1428
291
}
1429
1430
/* Specialization for operation::BLS_PrivateToPublic */
1431
173
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 {
1432
173
    (void)module;
1433
1434
173
    if ( result.second != std::nullopt  ) {
1435
0
        const auto curveID = op.curveType.Get();
1436
0
        const auto g1_x = result.second->first.ToTrimmedString();
1437
0
        const auto g1_y = result.second->second.ToTrimmedString();
1438
1439
0
        G1AddToPool(curveID, g1_x, g1_y);
1440
1441
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1442
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1443
0
    }
1444
173
}
1445
1446
173
template<> std::optional<component::BLS_PublicKey> ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic& op) const {
1447
173
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1448
1449
173
    const size_t size = op.priv.ToTrimmedString().size();
1450
1451
173
    if ( size == 0 || size > 4096 ) {
1452
9
        return std::nullopt;
1453
9
    }
1454
1455
164
    return module->OpBLS_PrivateToPublic(op);
1456
173
}
1457
1458
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1459
197
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 {
1460
197
    (void)module;
1461
197
    if ( result.second != std::nullopt  ) {
1462
0
        const auto curveID = op.curveType.Get();
1463
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1464
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1465
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1466
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1467
1468
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1469
1470
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1471
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1472
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1473
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1474
0
    }
1475
197
}
1476
1477
197
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic_G2& op) const {
1478
197
    const size_t size = op.priv.ToTrimmedString().size();
1479
1480
197
    if ( size == 0 || size > 4096 ) {
1481
15
        return std::nullopt;
1482
15
    }
1483
1484
182
    return module->OpBLS_PrivateToPublic_G2(op);
1485
197
}
1486
1487
/* Specialization for operation::BLS_Sign */
1488
187
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 {
1489
187
    (void)module;
1490
1491
187
    if ( result.second != std::nullopt  ) {
1492
0
        const auto curveID = op.curveType.Get();
1493
0
        const auto point_v = op.hashOrPoint ? op.point.first.first.ToTrimmedString() : "";
1494
0
        const auto point_w = op.hashOrPoint ? op.point.first.second.ToTrimmedString() : "";
1495
0
        const auto point_x = op.hashOrPoint ? op.point.second.first.ToTrimmedString() : "";
1496
0
        const auto point_y = op.hashOrPoint ? op.point.second.second.ToTrimmedString() : "";
1497
0
        const auto cleartext = op.hashOrPoint ? op.cleartext.ToHex() : "";
1498
0
        const auto dest = op.dest.ToHex();
1499
0
        const auto aug = op.aug.ToHex();
1500
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
1501
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
1502
0
        const auto sig_v = result.second->signature.first.first.ToTrimmedString();
1503
0
        const auto sig_w = result.second->signature.first.second.ToTrimmedString();
1504
0
        const auto sig_x = result.second->signature.second.first.ToTrimmedString();
1505
0
        const auto sig_y = result.second->signature.second.second.ToTrimmedString();
1506
1507
0
        G1AddToPool(curveID, pub_x, pub_y);
1508
0
        G2AddToPool(curveID, sig_v, sig_w, sig_x, sig_y);
1509
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});
1510
1511
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
1512
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
1513
0
        if ( sig_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_v); }
1514
0
        if ( sig_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_w); }
1515
0
        if ( sig_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_x); }
1516
0
        if ( sig_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_y); }
1517
0
    }
1518
187
}
1519
1520
187
template<> std::optional<component::BLS_Signature> ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::callModule(std::shared_ptr<Module> module, operation::BLS_Sign& op) const {
1521
187
    const size_t size = op.priv.ToTrimmedString().size();
1522
1523
187
    if ( size == 0 || size > 4096 ) {
1524
0
        return std::nullopt;
1525
0
    }
1526
1527
187
    return module->OpBLS_Sign(op);
1528
187
}
1529
1530
/* Specialization for operation::BLS_Verify */
1531
175
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 {
1532
175
    (void)module;
1533
175
    (void)op;
1534
175
    (void)result;
1535
175
}
1536
1537
175
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_Verify>::callModule(std::shared_ptr<Module> module, operation::BLS_Verify& op) const {
1538
#if 0
1539
    const std::vector<size_t> sizes = {
1540
        op.pub.first.ToTrimmedString().size(),
1541
        op.pub.second.ToTrimmedString().size(),
1542
        op.signature.first.ToTrimmedString().size(),
1543
        op.signature.second.ToTrimmedString().size(),
1544
    };
1545
1546
    for (const auto& size : sizes) {
1547
        if ( size == 0 || size > 4096 ) {
1548
            return std::nullopt;
1549
        }
1550
    }
1551
#endif
1552
1553
175
    return module->OpBLS_Verify(op);
1554
175
}
1555
1556
/* Specialization for operation::BLS_BatchSign */
1557
224
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 {
1558
224
    (void)module;
1559
224
    (void)op;
1560
1561
224
    if ( result.second != std::nullopt  ) {
1562
0
        std::vector< std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2> > msgpub;
1563
0
        for (const auto& mp : result.second->msgpub) {
1564
0
            msgpub.push_back(
1565
0
                    std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2>{
1566
0
                        {
1567
0
                            mp.first.first.ToTrimmedString(),
1568
0
                            mp.first.second.ToTrimmedString()
1569
0
                        },
1570
0
                        {
1571
0
                            mp.second.first.first.ToTrimmedString(),
1572
0
                            mp.second.first.second.ToTrimmedString(),
1573
0
                            mp.second.second.first.ToTrimmedString(),
1574
0
                            mp.second.second.second.ToTrimmedString()
1575
0
                        }
1576
0
                    }
1577
0
            );
1578
0
            G1AddToPool(CF_ECC_CURVE("BLS12_381"), mp.first.first.ToTrimmedString(), mp.first.second.ToTrimmedString());
1579
0
            Pool_CurveBLSG2.Set({
1580
0
                    CF_ECC_CURVE("BLS12_381"),
1581
0
                    mp.second.first.first.ToTrimmedString(),
1582
0
                    mp.second.first.second.ToTrimmedString(),
1583
0
                    mp.second.second.first.ToTrimmedString(),
1584
0
                    mp.second.second.second.ToTrimmedString()
1585
0
            });
1586
0
        }
1587
0
        Pool_BLS_BatchSignature.Set({msgpub});
1588
0
    }
1589
224
}
1590
1591
224
template<> std::optional<component::BLS_BatchSignature> ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchSign& op) const {
1592
224
    return module->OpBLS_BatchSign(op);
1593
224
}
1594
1595
/* Specialization for operation::BLS_BatchVerify */
1596
200
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 {
1597
200
    (void)module;
1598
200
    (void)op;
1599
200
    (void)result;
1600
200
}
1601
1602
200
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1603
200
    return module->OpBLS_BatchVerify(op);
1604
200
}
1605
1606
/* Specialization for operation::BLS_Aggregate_G1 */
1607
172
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 {
1608
172
    (void)module;
1609
172
    (void)op;
1610
172
    (void)result;
1611
172
}
1612
1613
172
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op) const {
1614
172
    return module->OpBLS_Aggregate_G1(op);
1615
172
}
1616
1617
/* Specialization for operation::BLS_Aggregate_G2 */
1618
178
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 {
1619
178
    (void)module;
1620
178
    (void)op;
1621
178
    (void)result;
1622
178
}
1623
1624
178
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op) const {
1625
178
    return module->OpBLS_Aggregate_G2(op);
1626
178
}
1627
1628
/* Specialization for operation::BLS_Pairing */
1629
161
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 {
1630
161
    (void)module;
1631
161
    (void)op;
1632
1633
161
    if ( result.second != std::nullopt  ) {
1634
0
        Pool_Fp12.Set({
1635
0
                result.second->bn1.ToTrimmedString(),
1636
0
                result.second->bn2.ToTrimmedString(),
1637
0
                result.second->bn3.ToTrimmedString(),
1638
0
                result.second->bn4.ToTrimmedString(),
1639
0
                result.second->bn5.ToTrimmedString(),
1640
0
                result.second->bn6.ToTrimmedString(),
1641
0
                result.second->bn7.ToTrimmedString(),
1642
0
                result.second->bn8.ToTrimmedString(),
1643
0
                result.second->bn9.ToTrimmedString(),
1644
0
                result.second->bn10.ToTrimmedString(),
1645
0
                result.second->bn11.ToTrimmedString(),
1646
0
                result.second->bn12.ToTrimmedString()
1647
0
        });
1648
0
    }
1649
161
}
1650
1651
161
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1652
161
    return module->OpBLS_Pairing(op);
1653
161
}
1654
1655
/* Specialization for operation::BLS_MillerLoop */
1656
160
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 {
1657
160
    (void)module;
1658
160
    (void)op;
1659
1660
160
    if ( result.second != std::nullopt  ) {
1661
0
        Pool_Fp12.Set({
1662
0
                result.second->bn1.ToTrimmedString(),
1663
0
                result.second->bn2.ToTrimmedString(),
1664
0
                result.second->bn3.ToTrimmedString(),
1665
0
                result.second->bn4.ToTrimmedString(),
1666
0
                result.second->bn5.ToTrimmedString(),
1667
0
                result.second->bn6.ToTrimmedString(),
1668
0
                result.second->bn7.ToTrimmedString(),
1669
0
                result.second->bn8.ToTrimmedString(),
1670
0
                result.second->bn9.ToTrimmedString(),
1671
0
                result.second->bn10.ToTrimmedString(),
1672
0
                result.second->bn11.ToTrimmedString(),
1673
0
                result.second->bn12.ToTrimmedString()
1674
0
        });
1675
0
    }
1676
160
}
1677
1678
160
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1679
160
    return module->OpBLS_MillerLoop(op);
1680
160
}
1681
1682
/* Specialization for operation::BLS_FinalExp */
1683
245
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 {
1684
245
    (void)module;
1685
245
    (void)op;
1686
1687
245
    if ( result.second != std::nullopt  ) {
1688
0
        Pool_Fp12.Set({
1689
0
                result.second->bn1.ToTrimmedString(),
1690
0
                result.second->bn2.ToTrimmedString(),
1691
0
                result.second->bn3.ToTrimmedString(),
1692
0
                result.second->bn4.ToTrimmedString(),
1693
0
                result.second->bn5.ToTrimmedString(),
1694
0
                result.second->bn6.ToTrimmedString(),
1695
0
                result.second->bn7.ToTrimmedString(),
1696
0
                result.second->bn8.ToTrimmedString(),
1697
0
                result.second->bn9.ToTrimmedString(),
1698
0
                result.second->bn10.ToTrimmedString(),
1699
0
                result.second->bn11.ToTrimmedString(),
1700
0
                result.second->bn12.ToTrimmedString()
1701
0
        });
1702
0
    }
1703
245
}
1704
1705
245
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1706
245
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1707
245
    return module->OpBLS_FinalExp(op);
1708
245
}
1709
1710
/* Specialization for operation::BLS_HashToG1 */
1711
170
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 {
1712
170
    (void)module;
1713
1714
170
    if ( result.second != std::nullopt  ) {
1715
0
        const auto curveID = op.curveType.Get();
1716
0
        const auto g1_x = result.second->first.ToTrimmedString();
1717
0
        const auto g1_y = result.second->second.ToTrimmedString();
1718
1719
0
        G1AddToPool(curveID, g1_x, g1_y);
1720
1721
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1722
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1723
0
    }
1724
170
}
1725
1726
170
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1727
170
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1728
170
    return module->OpBLS_HashToG1(op);
1729
170
}
1730
1731
/* Specialization for operation::BLS_MapToG1 */
1732
164
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 {
1733
164
    (void)module;
1734
1735
164
    if ( result.second != std::nullopt  ) {
1736
0
        const auto curveID = op.curveType.Get();
1737
0
        const auto g1_x = result.second->first.ToTrimmedString();
1738
0
        const auto g1_y = result.second->second.ToTrimmedString();
1739
1740
0
        G1AddToPool(curveID, g1_x, g1_y);
1741
1742
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1743
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1744
0
    }
1745
164
}
1746
1747
164
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1748
164
    return module->OpBLS_MapToG1(op);
1749
164
}
1750
1751
/* Specialization for operation::BLS_MapToG2 */
1752
159
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 {
1753
159
    (void)module;
1754
1755
159
    if ( result.second != std::nullopt  ) {
1756
0
        const auto curveID = op.curveType.Get();
1757
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1758
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1759
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1760
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1761
1762
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1763
1764
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1765
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1766
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1767
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1768
0
    }
1769
159
}
1770
1771
159
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1772
159
    return module->OpBLS_MapToG2(op);
1773
159
}
1774
1775
/* Specialization for operation::BLS_IsG1OnCurve */
1776
166
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 {
1777
166
    (void)module;
1778
166
    (void)op;
1779
166
    (void)result;
1780
166
}
1781
1782
166
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1783
166
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1784
166
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1785
161
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1786
1787
161
    return module->OpBLS_IsG1OnCurve(op);
1788
161
}
1789
1790
/* Specialization for operation::BLS_IsG2OnCurve */
1791
219
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 {
1792
219
    (void)module;
1793
219
    (void)op;
1794
219
    (void)result;
1795
219
}
1796
1797
219
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1798
219
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1799
206
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1800
195
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1801
186
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1802
1803
177
    return module->OpBLS_IsG2OnCurve(op);
1804
186
}
1805
1806
/* Specialization for operation::BLS_GenerateKeyPair */
1807
158
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 {
1808
158
    (void)module;
1809
1810
158
    if ( result.second != std::nullopt  ) {
1811
0
        const auto curveID = op.curveType.Get();
1812
0
        const auto priv = result.second->priv.ToTrimmedString();
1813
0
        const auto g1_x = result.second->pub.first.ToTrimmedString();
1814
0
        const auto g1_y = result.second->pub.second.ToTrimmedString();
1815
1816
0
        G1AddToPool(curveID, g1_x, g1_y);
1817
1818
0
        if ( priv.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(priv); }
1819
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1820
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1821
0
    }
1822
158
}
1823
1824
158
template<> std::optional<component::BLS_KeyPair> ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::BLS_GenerateKeyPair& op) const {
1825
158
    return module->OpBLS_GenerateKeyPair(op);
1826
158
}
1827
1828
/* Specialization for operation::BLS_Decompress_G1 */
1829
160
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 {
1830
160
    (void)module;
1831
1832
160
    if ( result.second != std::nullopt  ) {
1833
0
        const auto curveID = op.curveType.Get();
1834
0
        const auto g1_x = result.second->first.ToTrimmedString();
1835
0
        const auto g1_y = result.second->second.ToTrimmedString();
1836
1837
0
        G1AddToPool(curveID, g1_x, g1_y);
1838
1839
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1840
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1841
0
    }
1842
160
}
1843
1844
160
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Decompress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G1& op) const {
1845
160
    return module->OpBLS_Decompress_G1(op);
1846
160
}
1847
1848
/* Specialization for operation::BLS_Compress_G1 */
1849
147
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 {
1850
147
    (void)module;
1851
147
    (void)op;
1852
1853
147
    if ( result.second != std::nullopt  ) {
1854
0
        const auto compressed = result.second->ToTrimmedString();
1855
1856
0
        if ( compressed.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(compressed); }
1857
0
    }
1858
147
}
1859
1860
147
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G1& op) const {
1861
147
    return module->OpBLS_Compress_G1(op);
1862
147
}
1863
1864
/* Specialization for operation::BLS_Decompress_G2 */
1865
156
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 {
1866
156
    (void)module;
1867
1868
156
    if ( result.second != std::nullopt  ) {
1869
0
        const auto curveID = op.curveType.Get();
1870
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1871
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1872
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1873
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1874
1875
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1876
1877
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1878
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1879
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1880
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1881
0
    }
1882
156
}
1883
1884
156
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Decompress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op) const {
1885
156
    return module->OpBLS_Decompress_G2(op);
1886
156
}
1887
1888
/* Specialization for operation::BLS_Compress_G2 */
1889
179
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 {
1890
179
    (void)module;
1891
1892
179
    if ( result.second != std::nullopt  ) {
1893
0
        const auto curveID = op.curveType.Get();
1894
0
        const auto g1_x = result.second->first.ToTrimmedString();
1895
0
        const auto g1_y = result.second->second.ToTrimmedString();
1896
1897
0
        G1AddToPool(curveID, g1_x, g1_y);
1898
1899
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1900
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1901
0
    }
1902
179
}
1903
1904
179
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Compress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G2& op) const {
1905
179
    return module->OpBLS_Compress_G2(op);
1906
179
}
1907
1908
/* Specialization for operation::BLS_G1_Add */
1909
209
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 {
1910
209
    (void)module;
1911
1912
209
    if ( result.second != std::nullopt  ) {
1913
0
        const auto curveID = op.curveType.Get();
1914
0
        const auto g1_x = result.second->first.ToTrimmedString();
1915
0
        const auto g1_y = result.second->second.ToTrimmedString();
1916
1917
0
        G1AddToPool(curveID, g1_x, g1_y);
1918
1919
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1920
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1921
0
    }
1922
209
}
1923
1924
209
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Add& op) const {
1925
209
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1926
209
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1927
200
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1928
191
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1929
182
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1930
1931
171
    return module->OpBLS_G1_Add(op);
1932
182
}
1933
1934
/* Specialization for operation::BLS_G1_Mul */
1935
178
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 {
1936
178
    (void)module;
1937
1938
178
    if ( result.second != std::nullopt  ) {
1939
0
        const auto curveID = op.curveType.Get();
1940
0
        const auto g1_x = result.second->first.ToTrimmedString();
1941
0
        const auto g1_y = result.second->second.ToTrimmedString();
1942
1943
0
        G1AddToPool(curveID, g1_x, g1_y);
1944
1945
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1946
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1947
0
    }
1948
178
}
1949
1950
178
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op) const {
1951
178
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1952
178
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1953
176
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1954
174
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1955
1956
172
    return module->OpBLS_G1_Mul(op);
1957
174
}
1958
1959
/* Specialization for operation::BLS_G1_IsEq */
1960
248
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 {
1961
248
    (void)module;
1962
248
    (void)op;
1963
248
    (void)result;
1964
248
}
1965
1966
248
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
1967
248
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1968
248
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1969
237
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1970
228
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1971
213
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1972
1973
204
    return module->OpBLS_G1_IsEq(op);
1974
213
}
1975
1976
/* Specialization for operation::BLS_G1_Neg */
1977
152
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 {
1978
152
    (void)module;
1979
1980
152
    if ( result.second != std::nullopt  ) {
1981
0
        const auto curveID = op.curveType.Get();
1982
0
        const auto g1_x = result.second->first.ToTrimmedString();
1983
0
        const auto g1_y = result.second->second.ToTrimmedString();
1984
1985
0
        G1AddToPool(curveID, g1_x, g1_y);
1986
1987
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1988
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1989
0
    }
1990
152
}
1991
1992
152
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Neg& op) const {
1993
152
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1994
152
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1995
150
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1996
1997
148
    return module->OpBLS_G1_Neg(op);
1998
150
}
1999
2000
/* Specialization for operation::BLS_G2_Add */
2001
261
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 {
2002
261
    (void)module;
2003
2004
261
    if ( result.second != std::nullopt  ) {
2005
0
        const auto curveID = op.curveType.Get();
2006
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2007
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2008
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2009
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2010
2011
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2012
2013
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2014
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2015
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2016
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2017
0
    }
2018
261
}
2019
2020
261
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Add& op) const {
2021
261
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2022
261
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2023
252
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2024
238
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2025
229
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2026
218
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2027
206
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2028
197
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
188
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
2031
179
    return module->OpBLS_G2_Add(op);
2032
188
}
2033
2034
/* Specialization for operation::BLS_G2_Mul */
2035
252
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 {
2036
252
    (void)module;
2037
2038
252
    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
252
}
2053
2054
252
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Mul& op) const {
2055
252
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2056
252
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2057
243
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2058
234
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2059
225
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2060
213
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2061
2062
204
    return module->OpBLS_G2_Mul(op);
2063
213
}
2064
2065
/* Specialization for operation::BLS_G2_IsEq */
2066
287
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 {
2067
287
    (void)module;
2068
287
    (void)op;
2069
287
    (void)result;
2070
287
}
2071
2072
287
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2073
287
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2074
287
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2075
275
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2076
262
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2077
246
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2078
237
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2079
222
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2080
213
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2081
204
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2082
2083
191
    return module->OpBLS_G2_IsEq(op);
2084
204
}
2085
2086
/* Specialization for operation::BLS_G2_Neg */
2087
229
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 {
2088
229
    (void)module;
2089
2090
229
    if ( result.second != std::nullopt  ) {
2091
0
        const auto curveID = op.curveType.Get();
2092
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2093
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2094
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2095
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2096
2097
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2098
2099
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2100
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2101
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2102
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2103
0
    }
2104
229
}
2105
2106
229
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Neg& op) const {
2107
229
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2108
229
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2109
220
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2110
209
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2111
193
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2112
2113
184
    return module->OpBLS_G2_Neg(op);
2114
193
}
2115
2116
/* Specialization for operation::BLS_G1_MultiExp */
2117
281
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 {
2118
281
    (void)module;
2119
2120
281
    if ( result.second != std::nullopt  ) {
2121
0
        const auto curveID = op.curveType.Get();
2122
0
        const auto g1_x = result.second->first.ToTrimmedString();
2123
0
        const auto g1_y = result.second->second.ToTrimmedString();
2124
2125
0
        G1AddToPool(curveID, g1_x, g1_y);
2126
2127
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
2128
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
2129
0
    }
2130
281
}
2131
2132
281
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_MultiExp>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_MultiExp& op) const {
2133
281
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2134
2135
2.16k
    for (const auto& point_scalar : op.points_scalars.points_scalars) {
2136
2.16k
        if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2137
2.15k
        if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2138
2.13k
        if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2139
2.13k
    }
2140
2141
240
    return module->OpBLS_G1_MultiExp(op);
2142
281
}
2143
2144
/* Specialization for operation::Misc */
2145
132
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2146
132
    (void)module;
2147
132
    (void)op;
2148
132
    (void)result;
2149
132
}
2150
2151
132
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2152
132
    return module->OpMisc(op);
2153
132
}
2154
2155
/* Specialization for operation::BLS_HashToG2 */
2156
139
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 {
2157
139
    (void)module;
2158
2159
139
    if ( result.second != std::nullopt  ) {
2160
0
        const auto curveID = op.curveType.Get();
2161
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2162
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2163
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2164
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2165
2166
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2167
2168
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2169
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2170
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2171
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2172
0
    }
2173
139
}
2174
2175
139
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2176
139
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2177
139
    return module->OpBLS_HashToG2(op);
2178
139
}
2179
2180
ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2181
    ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options)
2182
46
{ }
2183
44
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2184
44
    this->modulo = component::Bignum(modulo);
2185
44
}
2186
2187
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) :
2188
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2189
2
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2190
2
}
2191
2192
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) :
2193
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2194
2
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2195
2
}
2196
2197
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) :
2198
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2199
2
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2200
2
}
2201
2202
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) :
2203
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2204
2
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2205
2
}
2206
2207
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) :
2208
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2209
2
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2210
2
}
2211
2212
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) :
2213
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2214
2
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2215
2
}
2216
2217
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) :
2218
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2219
2
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337"));
2220
2
}
2221
2222
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) :
2223
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2224
2
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097"));
2225
2
}
2226
2227
ExecutorBignumCalc_Mod_ED25519::ExecutorBignumCalc_Mod_ED25519(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2228
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2229
2
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2230
2
}
2231
2232
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) :
2233
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2234
2
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2235
2
}
2236
2237
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) :
2238
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2239
2
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2240
2
}
2241
2242
ExecutorBignumCalc_Mod_Goldilocks::ExecutorBignumCalc_Mod_Goldilocks(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2243
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2244
2
    CF_NORET(SetModulo("18446744069414584321"));
2245
2
}
2246
2247
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) :
2248
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2249
2
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2250
2
}
2251
2252
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) :
2253
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2254
2
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2255
2
}
2256
2257
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) :
2258
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2259
2
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2260
2
}
2261
2262
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) :
2263
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2264
2
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2265
2
}
2266
2267
ExecutorBignumCalc_Mod_2Exp64::ExecutorBignumCalc_Mod_2Exp64(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2268
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2269
2
    CF_NORET(SetModulo("18446744073709551616"));
2270
2
}
2271
2272
ExecutorBignumCalc_Mod_2Exp128::ExecutorBignumCalc_Mod_2Exp128(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2273
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2274
2
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2275
2
}
2276
2277
ExecutorBignumCalc_Mod_2Exp256::ExecutorBignumCalc_Mod_2Exp256(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2278
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2279
2
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2280
2
}
2281
2282
ExecutorBignumCalc_Mod_2Exp512::ExecutorBignumCalc_Mod_2Exp512(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2283
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2284
2
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2285
2
}
2286
2287
ExecutorBignumCalc_Mod_SECP256K1::ExecutorBignumCalc_Mod_SECP256K1(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2288
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2289
2
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2290
2
}
2291
2292
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) :
2293
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2294
2
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2295
2
}
2296
2297
ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2298
    ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options)
2299
2
{ }
2300
0
void ExecutorBignumCalc_Fp2::SetModulo(const std::string& modulo) {
2301
0
    this->modulo = component::Bignum(modulo);
2302
0
}
2303
2304
ExecutorBignumCalc_Fp12::ExecutorBignumCalc_Fp12(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2305
    ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options)
2306
2
{ }
2307
0
void ExecutorBignumCalc_Fp12::SetModulo(const std::string& modulo) {
2308
0
    this->modulo = component::Bignum(modulo);
2309
0
}
2310
2311
template <class ResultType, class OperationType>
2312
ExecutorBase<ResultType, OperationType>::ExecutorBase(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2313
    operationID(operationID),
2314
    modules(modules),
2315
    options(options)
2316
210
{
2317
210
}
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
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
46
{
2317
46
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
2
{
2317
2
}
2318
2319
/* Specialization for operation::SR25519_Verify */
2320
170
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 {
2321
170
    (void)module;
2322
170
    (void)op;
2323
170
    (void)result;
2324
170
}
2325
2326
170
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2327
170
    return module->OpSR25519_Verify(op);
2328
170
}
2329
2330
template <class ResultType, class OperationType>
2331
210
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
210
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2331
46
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
46
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2331
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
2
}
2333
2334
/* Filter away the values in the set that are std::nullopt */
2335
template <class ResultType, class OperationType>
2336
32.8k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
32.8k
    ResultSet ret;
2338
2339
115k
    for (const auto& result : results) {
2340
115k
        if ( result.second == std::nullopt ) {
2341
79.0k
            continue;
2342
79.0k
        }
2343
2344
36.2k
        ret.push_back(result);
2345
36.2k
    }
2346
2347
32.8k
    return ret;
2348
32.8k
}
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
2336
2.01k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
2.01k
    ResultSet ret;
2338
2339
6.60k
    for (const auto& result : results) {
2340
6.60k
        if ( result.second == std::nullopt ) {
2341
3.10k
            continue;
2342
3.10k
        }
2343
2344
3.49k
        ret.push_back(result);
2345
3.49k
    }
2346
2347
2.01k
    return ret;
2348
2.01k
}
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
2336
1.21k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
1.21k
    ResultSet ret;
2338
2339
4.04k
    for (const auto& result : results) {
2340
4.04k
        if ( result.second == std::nullopt ) {
2341
2.62k
            continue;
2342
2.62k
        }
2343
2344
1.41k
        ret.push_back(result);
2345
1.41k
    }
2346
2347
1.21k
    return ret;
2348
1.21k
}
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
2336
645
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
645
    ResultSet ret;
2338
2339
3.93k
    for (const auto& result : results) {
2340
3.93k
        if ( result.second == std::nullopt ) {
2341
1.95k
            continue;
2342
1.95k
        }
2343
2344
1.97k
        ret.push_back(result);
2345
1.97k
    }
2346
2347
645
    return ret;
2348
645
}
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
2336
1.15k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
1.15k
    ResultSet ret;
2338
2339
4.88k
    for (const auto& result : results) {
2340
4.88k
        if ( result.second == std::nullopt ) {
2341
2.76k
            continue;
2342
2.76k
        }
2343
2344
2.12k
        ret.push_back(result);
2345
2.12k
    }
2346
2347
1.15k
    return ret;
2348
1.15k
}
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
2336
5.01k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
5.01k
    ResultSet ret;
2338
2339
22.6k
    for (const auto& result : results) {
2340
22.6k
        if ( result.second == std::nullopt ) {
2341
14.1k
            continue;
2342
14.1k
        }
2343
2344
8.49k
        ret.push_back(result);
2345
8.49k
    }
2346
2347
5.01k
    return ret;
2348
5.01k
}
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
2336
2.29k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
2.29k
    ResultSet ret;
2338
2339
12.7k
    for (const auto& result : results) {
2340
12.7k
        if ( result.second == std::nullopt ) {
2341
11.0k
            continue;
2342
11.0k
        }
2343
2344
1.68k
        ret.push_back(result);
2345
1.68k
    }
2346
2347
2.29k
    return ret;
2348
2.29k
}
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
2336
148
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
148
    ResultSet ret;
2338
2339
1.02k
    for (const auto& result : results) {
2340
1.02k
        if ( result.second == std::nullopt ) {
2341
720
            continue;
2342
720
        }
2343
2344
308
        ret.push_back(result);
2345
308
    }
2346
2347
148
    return ret;
2348
148
}
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
2336
1.33k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
1.33k
    ResultSet ret;
2338
2339
5.49k
    for (const auto& result : results) {
2340
5.49k
        if ( result.second == std::nullopt ) {
2341
2.32k
            continue;
2342
2.32k
        }
2343
2344
3.16k
        ret.push_back(result);
2345
3.16k
    }
2346
2347
1.33k
    return ret;
2348
1.33k
}
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
2336
122
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
122
    ResultSet ret;
2338
2339
723
    for (const auto& result : results) {
2340
723
        if ( result.second == std::nullopt ) {
2341
723
            continue;
2342
723
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
122
    return ret;
2348
122
}
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
2336
86
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
86
    ResultSet ret;
2338
2339
624
    for (const auto& result : results) {
2340
624
        if ( result.second == std::nullopt ) {
2341
624
            continue;
2342
624
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
86
    return ret;
2348
86
}
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
2336
77
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
77
    ResultSet ret;
2338
2339
534
    for (const auto& result : results) {
2340
534
        if ( result.second == std::nullopt ) {
2341
534
            continue;
2342
534
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
77
    return ret;
2348
77
}
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
2336
725
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
725
    ResultSet ret;
2338
2339
2.57k
    for (const auto& result : results) {
2340
2.57k
        if ( result.second == std::nullopt ) {
2341
1.72k
            continue;
2342
1.72k
        }
2343
2344
857
        ret.push_back(result);
2345
857
    }
2346
2347
725
    return ret;
2348
725
}
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
2336
357
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
357
    ResultSet ret;
2338
2339
892
    for (const auto& result : results) {
2340
892
        if ( result.second == std::nullopt ) {
2341
481
            continue;
2342
481
        }
2343
2344
411
        ret.push_back(result);
2345
411
    }
2346
2347
357
    return ret;
2348
357
}
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
2336
85
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
85
    ResultSet ret;
2338
2339
630
    for (const auto& result : results) {
2340
630
        if ( result.second == std::nullopt ) {
2341
630
            continue;
2342
630
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
85
    return ret;
2348
85
}
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
2336
68
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
68
    ResultSet ret;
2338
2339
554
    for (const auto& result : results) {
2340
554
        if ( result.second == std::nullopt ) {
2341
554
            continue;
2342
554
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
68
    return ret;
2348
68
}
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
2336
86
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
86
    ResultSet ret;
2338
2339
197
    for (const auto& result : results) {
2340
197
        if ( result.second == std::nullopt ) {
2341
145
            continue;
2342
145
        }
2343
2344
52
        ret.push_back(result);
2345
52
    }
2346
2347
86
    return ret;
2348
86
}
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
2336
399
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
399
    ResultSet ret;
2338
2339
2.12k
    for (const auto& result : results) {
2340
2.12k
        if ( result.second == std::nullopt ) {
2341
1.12k
            continue;
2342
1.12k
        }
2343
2344
997
        ret.push_back(result);
2345
997
    }
2346
2347
399
    return ret;
2348
399
}
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
2336
936
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
936
    ResultSet ret;
2338
2339
2.29k
    for (const auto& result : results) {
2340
2.29k
        if ( result.second == std::nullopt ) {
2341
1.32k
            continue;
2342
1.32k
        }
2343
2344
977
        ret.push_back(result);
2345
977
    }
2346
2347
936
    return ret;
2348
936
}
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
2336
911
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
911
    ResultSet ret;
2338
2339
2.04k
    for (const auto& result : results) {
2340
2.04k
        if ( result.second == std::nullopt ) {
2341
244
            continue;
2342
244
        }
2343
2344
1.80k
        ret.push_back(result);
2345
1.80k
    }
2346
2347
911
    return ret;
2348
911
}
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
2336
55
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
55
    ResultSet ret;
2338
2339
200
    for (const auto& result : results) {
2340
200
        if ( result.second == std::nullopt ) {
2341
200
            continue;
2342
200
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
55
    return ret;
2348
55
}
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
2336
809
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
809
    ResultSet ret;
2338
2339
2.30k
    for (const auto& result : results) {
2340
2.30k
        if ( result.second == std::nullopt ) {
2341
1.22k
            continue;
2342
1.22k
        }
2343
2344
1.07k
        ret.push_back(result);
2345
1.07k
    }
2346
2347
809
    return ret;
2348
809
}
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
2336
166
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
166
    ResultSet ret;
2338
2339
536
    for (const auto& result : results) {
2340
536
        if ( result.second == std::nullopt ) {
2341
448
            continue;
2342
448
        }
2343
2344
88
        ret.push_back(result);
2345
88
    }
2346
2347
166
    return ret;
2348
166
}
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
2336
48
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
48
    ResultSet ret;
2338
2339
174
    for (const auto& result : results) {
2340
174
        if ( result.second == std::nullopt ) {
2341
174
            continue;
2342
174
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
48
    return ret;
2348
48
}
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
2336
56
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
56
    ResultSet ret;
2338
2339
207
    for (const auto& result : results) {
2340
207
        if ( result.second == std::nullopt ) {
2341
207
            continue;
2342
207
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
56
    return ret;
2348
56
}
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
2336
45
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
45
    ResultSet ret;
2338
2339
162
    for (const auto& result : results) {
2340
162
        if ( result.second == std::nullopt ) {
2341
162
            continue;
2342
162
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
45
    return ret;
2348
45
}
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
2336
362
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
362
    ResultSet ret;
2338
2339
1.10k
    for (const auto& result : results) {
2340
1.10k
        if ( result.second == std::nullopt ) {
2341
535
            continue;
2342
535
        }
2343
2344
570
        ret.push_back(result);
2345
570
    }
2346
2347
362
    return ret;
2348
362
}
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
2336
205
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
205
    ResultSet ret;
2338
2339
595
    for (const auto& result : results) {
2340
595
        if ( result.second == std::nullopt ) {
2341
421
            continue;
2342
421
        }
2343
2344
174
        ret.push_back(result);
2345
174
    }
2346
2347
205
    return ret;
2348
205
}
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
2336
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
40
    ResultSet ret;
2338
2339
140
    for (const auto& result : results) {
2340
140
        if ( result.second == std::nullopt ) {
2341
140
            continue;
2342
140
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
40
    return ret;
2348
40
}
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
2336
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
43
    ResultSet ret;
2338
2339
156
    for (const auto& result : results) {
2340
156
        if ( result.second == std::nullopt ) {
2341
156
            continue;
2342
156
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
43
    return ret;
2348
43
}
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
2336
684
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
684
    ResultSet ret;
2338
2339
1.74k
    for (const auto& result : results) {
2340
1.74k
        if ( result.second == std::nullopt ) {
2341
1.02k
            continue;
2342
1.02k
        }
2343
2344
723
        ret.push_back(result);
2345
723
    }
2346
2347
684
    return ret;
2348
684
}
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
2336
306
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
306
    ResultSet ret;
2338
2339
868
    for (const auto& result : results) {
2340
868
        if ( result.second == std::nullopt ) {
2341
528
            continue;
2342
528
        }
2343
2344
340
        ret.push_back(result);
2345
340
    }
2346
2347
306
    return ret;
2348
306
}
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
2336
44
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
44
    ResultSet ret;
2338
2339
150
    for (const auto& result : results) {
2340
150
        if ( result.second == std::nullopt ) {
2341
150
            continue;
2342
150
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
44
    return ret;
2348
44
}
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
2336
46
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
46
    ResultSet ret;
2338
2339
161
    for (const auto& result : results) {
2340
161
        if ( result.second == std::nullopt ) {
2341
161
            continue;
2342
161
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
46
    return ret;
2348
46
}
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
2336
51
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
51
    ResultSet ret;
2338
2339
185
    for (const auto& result : results) {
2340
185
        if ( result.second == std::nullopt ) {
2341
185
            continue;
2342
185
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
51
    return ret;
2348
51
}
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
2336
90
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
90
    ResultSet ret;
2338
2339
329
    for (const auto& result : results) {
2340
329
        if ( result.second == std::nullopt ) {
2341
300
            continue;
2342
300
        }
2343
2344
29
        ret.push_back(result);
2345
29
    }
2346
2347
90
    return ret;
2348
90
}
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
2336
100
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
100
    ResultSet ret;
2338
2339
364
    for (const auto& result : results) {
2340
364
        if ( result.second == std::nullopt ) {
2341
312
            continue;
2342
312
        }
2343
2344
52
        ret.push_back(result);
2345
52
    }
2346
2347
100
    return ret;
2348
100
}
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
2336
266
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
266
    ResultSet ret;
2338
2339
844
    for (const auto& result : results) {
2340
844
        if ( result.second == std::nullopt ) {
2341
661
            continue;
2342
661
        }
2343
2344
183
        ret.push_back(result);
2345
183
    }
2346
2347
266
    return ret;
2348
266
}
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
2336
90
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
90
    ResultSet ret;
2338
2339
317
    for (const auto& result : results) {
2340
317
        if ( result.second == std::nullopt ) {
2341
251
            continue;
2342
251
        }
2343
2344
66
        ret.push_back(result);
2345
66
    }
2346
2347
90
    return ret;
2348
90
}
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
2336
81
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
81
    ResultSet ret;
2338
2339
280
    for (const auto& result : results) {
2340
280
        if ( result.second == std::nullopt ) {
2341
245
            continue;
2342
245
        }
2343
2344
35
        ret.push_back(result);
2345
35
    }
2346
2347
81
    return ret;
2348
81
}
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
2336
84
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
84
    ResultSet ret;
2338
2339
306
    for (const auto& result : results) {
2340
306
        if ( result.second == std::nullopt ) {
2341
283
            continue;
2342
283
        }
2343
2344
23
        ret.push_back(result);
2345
23
    }
2346
2347
84
    return ret;
2348
84
}
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
2336
275
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
275
    ResultSet ret;
2338
2339
833
    for (const auto& result : results) {
2340
833
        if ( result.second == std::nullopt ) {
2341
790
            continue;
2342
790
        }
2343
2344
43
        ret.push_back(result);
2345
43
    }
2346
2347
275
    return ret;
2348
275
}
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
2336
9.02k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
9.02k
    ResultSet ret;
2338
2339
21.3k
    for (const auto& result : results) {
2340
21.3k
        if ( result.second == std::nullopt ) {
2341
16.2k
            continue;
2342
16.2k
        }
2343
2344
5.11k
        ret.push_back(result);
2345
5.11k
    }
2346
2347
9.02k
    return ret;
2348
9.02k
}
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
2336
89
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
89
    ResultSet ret;
2338
2339
304
    for (const auto& result : results) {
2340
304
        if ( result.second == std::nullopt ) {
2341
304
            continue;
2342
304
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
89
    return ret;
2348
89
}
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
2336
288
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
288
    ResultSet ret;
2338
2339
844
    for (const auto& result : results) {
2340
844
        if ( result.second == std::nullopt ) {
2341
844
            continue;
2342
844
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
288
    return ret;
2348
288
}
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
2336
54
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
54
    ResultSet ret;
2338
2339
173
    for (const auto& result : results) {
2340
173
        if ( result.second == std::nullopt ) {
2341
173
            continue;
2342
173
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
54
    return ret;
2348
54
}
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
2336
59
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
59
    ResultSet ret;
2338
2339
197
    for (const auto& result : results) {
2340
197
        if ( result.second == std::nullopt ) {
2341
197
            continue;
2342
197
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
59
    return ret;
2348
59
}
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
2336
54
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
54
    ResultSet ret;
2338
2339
187
    for (const auto& result : results) {
2340
187
        if ( result.second == std::nullopt ) {
2341
187
            continue;
2342
187
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
54
    return ret;
2348
54
}
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
2336
52
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
52
    ResultSet ret;
2338
2339
175
    for (const auto& result : results) {
2340
175
        if ( result.second == std::nullopt ) {
2341
175
            continue;
2342
175
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
52
    return ret;
2348
52
}
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
2336
66
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
66
    ResultSet ret;
2338
2339
224
    for (const auto& result : results) {
2340
224
        if ( result.second == std::nullopt ) {
2341
224
            continue;
2342
224
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
66
    return ret;
2348
66
}
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
2336
53
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
53
    ResultSet ret;
2338
2339
200
    for (const auto& result : results) {
2340
200
        if ( result.second == std::nullopt ) {
2341
200
            continue;
2342
200
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
53
    return ret;
2348
53
}
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
2336
49
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
49
    ResultSet ret;
2338
2339
172
    for (const auto& result : results) {
2340
172
        if ( result.second == std::nullopt ) {
2341
172
            continue;
2342
172
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
49
    return ret;
2348
49
}
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
2336
50
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
50
    ResultSet ret;
2338
2339
178
    for (const auto& result : results) {
2340
178
        if ( result.second == std::nullopt ) {
2341
178
            continue;
2342
178
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
50
    return ret;
2348
50
}
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
2336
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
43
    ResultSet ret;
2338
2339
161
    for (const auto& result : results) {
2340
161
        if ( result.second == std::nullopt ) {
2341
161
            continue;
2342
161
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
43
    return ret;
2348
43
}
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
2336
42
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
42
    ResultSet ret;
2338
2339
160
    for (const auto& result : results) {
2340
160
        if ( result.second == std::nullopt ) {
2341
160
            continue;
2342
160
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
42
    return ret;
2348
42
}
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
2336
72
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
72
    ResultSet ret;
2338
2339
245
    for (const auto& result : results) {
2340
245
        if ( result.second == std::nullopt ) {
2341
245
            continue;
2342
245
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
72
    return ret;
2348
72
}
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
2336
47
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
47
    ResultSet ret;
2338
2339
170
    for (const auto& result : results) {
2340
170
        if ( result.second == std::nullopt ) {
2341
170
            continue;
2342
170
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
47
    return ret;
2348
47
}
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
2336
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
39
    ResultSet ret;
2338
2339
139
    for (const auto& result : results) {
2340
139
        if ( result.second == std::nullopt ) {
2341
139
            continue;
2342
139
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
39
    return ret;
2348
39
}
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
2336
47
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
47
    ResultSet ret;
2338
2339
164
    for (const auto& result : results) {
2340
164
        if ( result.second == std::nullopt ) {
2341
164
            continue;
2342
164
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
47
    return ret;
2348
47
}
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
2336
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
43
    ResultSet ret;
2338
2339
159
    for (const auto& result : results) {
2340
159
        if ( result.second == std::nullopt ) {
2341
159
            continue;
2342
159
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
43
    return ret;
2348
43
}
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
2336
47
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
47
    ResultSet ret;
2338
2339
166
    for (const auto& result : results) {
2340
166
        if ( result.second == std::nullopt ) {
2341
166
            continue;
2342
166
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
47
    return ret;
2348
47
}
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
2336
69
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
69
    ResultSet ret;
2338
2339
219
    for (const auto& result : results) {
2340
219
        if ( result.second == std::nullopt ) {
2341
219
            continue;
2342
219
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
69
    return ret;
2348
69
}
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
2336
46
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
46
    ResultSet ret;
2338
2339
158
    for (const auto& result : results) {
2340
158
        if ( result.second == std::nullopt ) {
2341
158
            continue;
2342
158
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
46
    return ret;
2348
46
}
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
2336
47
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
47
    ResultSet ret;
2338
2339
160
    for (const auto& result : results) {
2340
160
        if ( result.second == std::nullopt ) {
2341
160
            continue;
2342
160
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
47
    return ret;
2348
47
}
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
2336
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
39
    ResultSet ret;
2338
2339
147
    for (const auto& result : results) {
2340
147
        if ( result.second == std::nullopt ) {
2341
147
            continue;
2342
147
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
39
    return ret;
2348
39
}
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
2336
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
43
    ResultSet ret;
2338
2339
156
    for (const auto& result : results) {
2340
156
        if ( result.second == std::nullopt ) {
2341
156
            continue;
2342
156
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
43
    return ret;
2348
43
}
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
2336
49
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
49
    ResultSet ret;
2338
2339
179
    for (const auto& result : results) {
2340
179
        if ( result.second == std::nullopt ) {
2341
179
            continue;
2342
179
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
49
    return ret;
2348
49
}
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
2336
66
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
66
    ResultSet ret;
2338
2339
209
    for (const auto& result : results) {
2340
209
        if ( result.second == std::nullopt ) {
2341
209
            continue;
2342
209
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
66
    return ret;
2348
66
}
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
2336
54
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
54
    ResultSet ret;
2338
2339
178
    for (const auto& result : results) {
2340
178
        if ( result.second == std::nullopt ) {
2341
178
            continue;
2342
178
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
54
    return ret;
2348
54
}
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
2336
82
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
82
    ResultSet ret;
2338
2339
248
    for (const auto& result : results) {
2340
248
        if ( result.second == std::nullopt ) {
2341
248
            continue;
2342
248
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
82
    return ret;
2348
82
}
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
2336
46
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
46
    ResultSet ret;
2338
2339
152
    for (const auto& result : results) {
2340
152
        if ( result.second == std::nullopt ) {
2341
152
            continue;
2342
152
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
46
    return ret;
2348
46
}
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
2336
86
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
86
    ResultSet ret;
2338
2339
261
    for (const auto& result : results) {
2340
261
        if ( result.second == std::nullopt ) {
2341
261
            continue;
2342
261
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
86
    return ret;
2348
86
}
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
2336
76
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
76
    ResultSet ret;
2338
2339
252
    for (const auto& result : results) {
2340
252
        if ( result.second == std::nullopt ) {
2341
252
            continue;
2342
252
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
76
    return ret;
2348
76
}
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
2336
90
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
90
    ResultSet ret;
2338
2339
287
    for (const auto& result : results) {
2340
287
        if ( result.second == std::nullopt ) {
2341
287
            continue;
2342
287
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
90
    return ret;
2348
90
}
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
2336
78
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
78
    ResultSet ret;
2338
2339
229
    for (const auto& result : results) {
2340
229
        if ( result.second == std::nullopt ) {
2341
229
            continue;
2342
229
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
78
    return ret;
2348
78
}
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
2336
79
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
79
    ResultSet ret;
2338
2339
281
    for (const auto& result : results) {
2340
281
        if ( result.second == std::nullopt ) {
2341
281
            continue;
2342
281
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
79
    return ret;
2348
79
}
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
2336
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
37
    ResultSet ret;
2338
2339
132
    for (const auto& result : results) {
2340
132
        if ( result.second == std::nullopt ) {
2341
132
            continue;
2342
132
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
37
    return ret;
2348
37
}
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
2336
46
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
46
    ResultSet ret;
2338
2339
170
    for (const auto& result : results) {
2340
170
        if ( result.second == std::nullopt ) {
2341
170
            continue;
2342
170
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
46
    return ret;
2348
46
}
2349
2350
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2351
template <>
2352
838
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 {
2353
838
    (void)operations;
2354
838
    (void)results;
2355
838
    (void)data;
2356
838
    (void)size;
2357
838
}
2358
2359
template <class ResultType, class OperationType>
2360
3.56k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
3.56k
    (void)operation;
2362
2363
3.56k
    return false;
2364
3.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2360
661
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
661
    (void)operation;
2362
2363
661
    return false;
2364
661
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
Line
Count
Source
2360
261
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
261
    (void)operation;
2362
2363
261
    return false;
2364
261
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const
Line
Count
Source
2360
36
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
36
    (void)operation;
2362
2363
36
    return false;
2364
36
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
Line
Count
Source
2360
693
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
693
    (void)operation;
2362
2363
693
    return false;
2364
693
}
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
2360
131
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
131
    (void)operation;
2362
2363
131
    return false;
2364
131
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const
Line
Count
Source
2360
62
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
62
    (void)operation;
2362
2363
62
    return false;
2364
62
}
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
2360
6
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
6
    (void)operation;
2362
2363
6
    return false;
2364
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
Line
Count
Source
2360
120
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
120
    (void)operation;
2362
2363
120
    return false;
2364
120
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::dontCompare(cryptofuzz::operation::ECC_PrivateToPublic const&) const
Line
Count
Source
2360
287
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
287
    (void)operation;
2362
2363
287
    return false;
2364
287
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2360
807
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
807
    (void)operation;
2362
2363
807
    return false;
2364
807
}
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
2360
176
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
176
    (void)operation;
2362
2363
176
    return false;
2364
176
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const
Line
Count
Source
2360
38
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
38
    (void)operation;
2362
2363
38
    return false;
2364
38
}
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
2360
96
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
96
    (void)operation;
2362
2363
96
    return false;
2364
96
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const
Line
Count
Source
2360
73
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
73
    (void)operation;
2362
2363
73
    return false;
2364
73
}
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
2360
8
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
8
    (void)operation;
2362
2363
8
    return false;
2364
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::dontCompare(cryptofuzz::operation::ECC_Point_Sub const&) const
Line
Count
Source
2360
14
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
14
    (void)operation;
2362
2363
14
    return false;
2364
14
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const
Line
Count
Source
2360
53
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
53
    (void)operation;
2362
2363
53
    return false;
2364
53
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2360
17
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
17
    (void)operation;
2362
2363
17
    return false;
2364
17
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
Line
Count
Source
2360
9
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
9
    (void)operation;
2362
2363
9
    return false;
2364
9
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2360
5
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
5
    (void)operation;
2362
2363
5
    return false;
2364
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
2360
9
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
9
    (void)operation;
2362
2363
9
    return false;
2364
9
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::dontCompare(cryptofuzz::operation::BignumCalc_Fp2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::dontCompare(cryptofuzz::operation::BignumCalc_Fp12 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::dontCompare(cryptofuzz::operation::BLS_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::dontCompare(cryptofuzz::operation::BLS_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::dontCompare(cryptofuzz::operation::BLS_BatchSign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::dontCompare(cryptofuzz::operation::BLS_BatchVerify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::dontCompare(cryptofuzz::operation::BLS_Pairing const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::dontCompare(cryptofuzz::operation::BLS_MillerLoop const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::dontCompare(cryptofuzz::operation::BLS_FinalExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::dontCompare(cryptofuzz::operation::BLS_HashToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::dontCompare(cryptofuzz::operation::BLS_HashToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::dontCompare(cryptofuzz::operation::BLS_MapToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::dontCompare(cryptofuzz::operation::BLS_MapToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG1OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG2OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::dontCompare(cryptofuzz::operation::BLS_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::dontCompare(cryptofuzz::operation::BLS_Decompress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::dontCompare(cryptofuzz::operation::BLS_Compress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::dontCompare(cryptofuzz::operation::BLS_Decompress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::dontCompare(cryptofuzz::operation::BLS_Compress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::dontCompare(cryptofuzz::operation::BLS_G1_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::dontCompare(cryptofuzz::operation::BLS_G1_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::dontCompare(cryptofuzz::operation::BLS_G1_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::dontCompare(cryptofuzz::operation::BLS_G1_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::dontCompare(cryptofuzz::operation::BLS_G2_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::dontCompare(cryptofuzz::operation::BLS_G2_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::dontCompare(cryptofuzz::operation::BLS_G2_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::dontCompare(cryptofuzz::operation::BLS_G2_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::dontCompare(cryptofuzz::operation::BLS_G1_MultiExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::dontCompare(cryptofuzz::operation::Misc const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::dontCompare(cryptofuzz::operation::SR25519_Verify const&) const
2365
2366
template <>
2367
1.10k
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2368
1.10k
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2369
1.10k
    if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; }
2370
1.10k
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2371
941
    if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; }
2372
2373
936
    return false;
2374
941
}
2375
2376
template <>
2377
0
bool ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::dontCompare(const operation::ECCSI_Sign& operation) const {
2378
0
    (void)operation;
2379
0
    return true;
2380
0
}
2381
2382
template <>
2383
200
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2384
200
    if (
2385
200
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2386
200
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2387
125
        if ( operation.UseRandomNonce() ) {
2388
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2389
102
            return true;
2390
102
        }
2391
125
    }
2392
2393
98
    return false;
2394
200
}
2395
2396
template <>
2397
25
bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const {
2398
25
    if (
2399
25
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2400
25
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2401
25
        if ( operation.UseRandomNonce() ) {
2402
            /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */
2403
25
            return true;
2404
25
        }
2405
25
    }
2406
2407
0
    return false;
2408
25
}
2409
2410
template <>
2411
0
bool ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::dontCompare(const operation::ECRDSA_Sign& operation) const {
2412
0
    if (
2413
0
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2414
0
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2415
0
        if ( operation.UseRandomNonce() ) {
2416
            /* Don't compare ECRDSA signatures comptued from a randomly generated nonce */
2417
0
            return true;
2418
0
        }
2419
0
    }
2420
2421
0
    return false;
2422
0
}
2423
2424
/* OpenSSL DES_EDE3_WRAP randomizes the IV, result is different each time */
2425
template <>
2426
1.24k
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2427
1.24k
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2428
2429
1.24k
    return false;
2430
1.24k
}
2431
2432
template <>
2433
265
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2434
265
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2435
2436
265
    return false;
2437
265
}
2438
2439
template <>
2440
281
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2441
281
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2442
2443
281
    return false;
2444
281
}
2445
2446
template <>
2447
274
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2448
274
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2449
2450
273
    return false;
2451
274
}
2452
2453
template <class ResultType, class OperationType>
2454
32.8k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
32.8k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
32.8k
    const auto filtered = filter(results);
2461
2462
32.8k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
25.8k
        return;
2465
25.8k
    }
2466
2467
6.96k
    if ( dontCompare(operations[0].second) == true ) {
2468
299
        return;
2469
299
    }
2470
2471
29.8k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
23.2k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
23.2k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
23.2k
        const bool equal = *prev == *cur;
2476
2477
23.2k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
23.2k
    }
2494
6.66k
}
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
2454
2.01k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
2.01k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
2.01k
    const auto filtered = filter(results);
2461
2462
2.01k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
1.35k
        return;
2465
1.35k
    }
2466
2467
661
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
3.22k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
2.56k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
2.56k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
2.56k
        const bool equal = *prev == *cur;
2476
2477
2.56k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
2.56k
    }
2494
661
}
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
2454
1.21k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
1.21k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
1.21k
    const auto filtered = filter(results);
2461
2462
1.21k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
937
        return;
2465
937
    }
2466
2467
274
    if ( dontCompare(operations[0].second) == true ) {
2468
1
        return;
2469
1
    }
2470
2471
1.33k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
1.06k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
1.06k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
1.06k
        const bool equal = *prev == *cur;
2476
2477
1.06k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
1.06k
    }
2494
273
}
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
2454
645
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
645
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
645
    const auto filtered = filter(results);
2461
2462
645
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
384
        return;
2465
384
    }
2466
2467
261
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
1.80k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
1.54k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
1.54k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
1.54k
        const bool equal = *prev == *cur;
2476
2477
1.54k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
1.54k
    }
2494
261
}
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
2454
1.15k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
1.15k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
1.15k
    const auto filtered = filter(results);
2461
2462
1.15k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
871
        return;
2465
871
    }
2466
2467
281
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
1.84k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
1.56k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
1.56k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
1.56k
        const bool equal = *prev == *cur;
2476
2477
1.56k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
1.56k
    }
2494
281
}
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
2454
5.01k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
5.01k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
5.01k
    const auto filtered = filter(results);
2461
2462
5.01k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
3.76k
        return;
2465
3.76k
    }
2466
2467
1.24k
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
8.06k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
6.82k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
6.82k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
6.82k
        const bool equal = *prev == *cur;
2476
2477
6.82k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
6.82k
    }
2494
1.24k
}
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
2454
2.29k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
2.29k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
2.29k
    const auto filtered = filter(results);
2461
2462
2.29k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
2.02k
        return;
2465
2.02k
    }
2466
2467
265
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
1.54k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
1.28k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
1.28k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
1.28k
        const bool equal = *prev == *cur;
2476
2477
1.28k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
1.28k
    }
2494
265
}
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
2454
148
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
148
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
148
    const auto filtered = filter(results);
2461
2462
148
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
112
        return;
2465
112
    }
2466
2467
36
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
278
    for (size_t i = 1; i < filtered.size(); i++) {
2472
242
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
242
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
242
        const bool equal = *prev == *cur;
2476
2477
242
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
242
    }
2494
36
}
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
2454
1.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 {
2455
1.33k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
1.33k
    const auto filtered = filter(results);
2461
2462
1.33k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
641
        return;
2465
641
    }
2466
2467
693
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
2.88k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
2.19k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
2.19k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
2.19k
        const bool equal = *prev == *cur;
2476
2477
2.19k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
2.19k
    }
2494
693
}
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
2454
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 {
2455
122
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
122
    const auto filtered = filter(results);
2461
2462
122
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
122
        return;
2465
122
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
86
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
86
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
86
    const auto filtered = filter(results);
2461
2462
86
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
86
        return;
2465
86
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
77
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
77
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
77
    const auto filtered = filter(results);
2461
2462
77
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
77
        return;
2465
77
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
725
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
725
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
725
    const auto filtered = filter(results);
2461
2462
725
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
594
        return;
2465
594
    }
2466
2467
131
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
707
    for (size_t i = 1; i < filtered.size(); i++) {
2472
576
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
576
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
576
        const bool equal = *prev == *cur;
2476
2477
576
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
576
    }
2494
131
}
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
2454
357
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
357
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
357
    const auto filtered = filter(results);
2461
2462
357
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
295
        return;
2465
295
    }
2466
2467
62
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
173
    for (size_t i = 1; i < filtered.size(); i++) {
2472
111
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
111
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
111
        const bool equal = *prev == *cur;
2476
2477
111
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
111
    }
2494
62
}
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
2454
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 {
2455
85
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
85
    const auto filtered = filter(results);
2461
2462
85
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
85
        return;
2465
85
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
68
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
68
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
68
    const auto filtered = filter(results);
2461
2462
68
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
68
        return;
2465
68
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
86
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
86
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
86
    const auto filtered = filter(results);
2461
2462
86
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
80
        return;
2465
80
    }
2466
2467
6
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
12
    for (size_t i = 1; i < filtered.size(); i++) {
2472
6
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
6
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
6
        const bool equal = *prev == *cur;
2476
2477
6
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
6
    }
2494
6
}
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
2454
399
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
399
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
399
    const auto filtered = filter(results);
2461
2462
399
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
279
        return;
2465
279
    }
2466
2467
120
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
843
    for (size_t i = 1; i < filtered.size(); i++) {
2472
723
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
723
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
723
        const bool equal = *prev == *cur;
2476
2477
723
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
723
    }
2494
120
}
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
2454
936
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
936
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
936
    const auto filtered = filter(results);
2461
2462
936
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
649
        return;
2465
649
    }
2466
2467
287
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
712
    for (size_t i = 1; i < filtered.size(); i++) {
2472
425
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
425
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
425
        const bool equal = *prev == *cur;
2476
2477
425
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
425
    }
2494
287
}
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
2454
911
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
911
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
911
    const auto filtered = filter(results);
2461
2462
911
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
104
        return;
2465
104
    }
2466
2467
807
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
1.76k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
961
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
961
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
961
        const bool equal = *prev == *cur;
2476
2477
961
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
961
    }
2494
807
}
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
2454
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 {
2455
55
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
55
    const auto filtered = filter(results);
2461
2462
55
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
55
        return;
2465
55
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
809
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
809
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
809
    const auto filtered = filter(results);
2461
2462
809
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
609
        return;
2465
609
    }
2466
2467
200
    if ( dontCompare(operations[0].second) == true ) {
2468
102
        return;
2469
102
    }
2470
2471
341
    for (size_t i = 1; i < filtered.size(); i++) {
2472
243
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
243
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
243
        const bool equal = *prev == *cur;
2476
2477
243
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
243
    }
2494
98
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2454
166
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
166
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
166
    const auto filtered = filter(results);
2461
2462
166
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
141
        return;
2465
141
    }
2466
2467
25
    if ( dontCompare(operations[0].second) == true ) {
2468
25
        return;
2469
25
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
48
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
48
    const auto filtered = filter(results);
2461
2462
48
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
48
        return;
2465
48
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
56
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
56
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
56
    const auto filtered = filter(results);
2461
2462
56
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
56
        return;
2465
56
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
45
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
45
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
45
    const auto filtered = filter(results);
2461
2462
45
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
45
        return;
2465
45
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
362
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
362
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
362
    const auto filtered = filter(results);
2461
2462
362
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
186
        return;
2465
186
    }
2466
2467
176
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
509
    for (size_t i = 1; i < filtered.size(); i++) {
2472
333
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
333
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
333
        const bool equal = *prev == *cur;
2476
2477
333
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
333
    }
2494
176
}
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
2454
205
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
205
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
205
    const auto filtered = filter(results);
2461
2462
205
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
167
        return;
2465
167
    }
2466
2467
38
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
116
    for (size_t i = 1; i < filtered.size(); i++) {
2472
78
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
78
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
78
        const bool equal = *prev == *cur;
2476
2477
78
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
78
    }
2494
38
}
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
2454
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 {
2455
40
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
40
    const auto filtered = filter(results);
2461
2462
40
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
40
        return;
2465
40
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
43
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
43
    const auto filtered = filter(results);
2461
2462
43
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
43
        return;
2465
43
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
684
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
684
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
684
    const auto filtered = filter(results);
2461
2462
684
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
588
        return;
2465
588
    }
2466
2467
96
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
290
    for (size_t i = 1; i < filtered.size(); i++) {
2472
194
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
194
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
194
        const bool equal = *prev == *cur;
2476
2477
194
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
194
    }
2494
96
}
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
2454
306
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
306
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
306
    const auto filtered = filter(results);
2461
2462
306
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
233
        return;
2465
233
    }
2466
2467
73
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
198
    for (size_t i = 1; i < filtered.size(); i++) {
2472
125
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
125
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
125
        const bool equal = *prev == *cur;
2476
2477
125
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
125
    }
2494
73
}
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
2454
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 {
2455
44
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
44
    const auto filtered = filter(results);
2461
2462
44
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
44
        return;
2465
44
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
46
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
46
    const auto filtered = filter(results);
2461
2462
46
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
46
        return;
2465
46
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
51
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
51
    const auto filtered = filter(results);
2461
2462
51
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
51
        return;
2465
51
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
90
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
90
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
90
    const auto filtered = filter(results);
2461
2462
90
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
82
        return;
2465
82
    }
2466
2467
8
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
26
    for (size_t i = 1; i < filtered.size(); i++) {
2472
18
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
18
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
18
        const bool equal = *prev == *cur;
2476
2477
18
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
18
    }
2494
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2454
100
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
100
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
100
    const auto filtered = filter(results);
2461
2462
100
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
86
        return;
2465
86
    }
2466
2467
14
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
45
    for (size_t i = 1; i < filtered.size(); i++) {
2472
31
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
31
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
31
        const bool equal = *prev == *cur;
2476
2477
31
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
31
    }
2494
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
2454
266
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
266
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
266
    const auto filtered = filter(results);
2461
2462
266
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
213
        return;
2465
213
    }
2466
2467
53
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
162
    for (size_t i = 1; i < filtered.size(); i++) {
2472
109
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
109
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
109
        const bool equal = *prev == *cur;
2476
2477
109
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
109
    }
2494
53
}
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
2454
90
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
90
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
90
    const auto filtered = filter(results);
2461
2462
90
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
73
        return;
2465
73
    }
2466
2467
17
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
57
    for (size_t i = 1; i < filtered.size(); i++) {
2472
40
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
40
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
40
        const bool equal = *prev == *cur;
2476
2477
40
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
40
    }
2494
17
}
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
2454
81
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
81
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
81
    const auto filtered = filter(results);
2461
2462
81
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
72
        return;
2465
72
    }
2466
2467
9
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
28
    for (size_t i = 1; i < filtered.size(); i++) {
2472
19
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
19
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
19
        const bool equal = *prev == *cur;
2476
2477
19
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
19
    }
2494
9
}
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
2454
84
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
84
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
84
    const auto filtered = filter(results);
2461
2462
84
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
79
        return;
2465
79
    }
2466
2467
5
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
19
    for (size_t i = 1; i < filtered.size(); i++) {
2472
14
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
14
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
14
        const bool equal = *prev == *cur;
2476
2477
14
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
14
    }
2494
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
2454
275
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
275
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
275
    const auto filtered = filter(results);
2461
2462
275
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
266
        return;
2465
266
    }
2466
2467
9
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
30
    for (size_t i = 1; i < filtered.size(); i++) {
2472
21
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
21
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
21
        const bool equal = *prev == *cur;
2476
2477
21
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
21
    }
2494
9
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2454
9.02k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
9.02k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
9.02k
    const auto filtered = filter(results);
2461
2462
9.02k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
7.91k
        return;
2465
7.91k
    }
2466
2467
1.10k
    if ( dontCompare(operations[0].second) == true ) {
2468
171
        return;
2469
171
    }
2470
2471
2.86k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
1.92k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
1.92k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
1.92k
        const bool equal = *prev == *cur;
2476
2477
1.92k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
1.92k
    }
2494
936
}
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
2454
89
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
89
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
89
    const auto filtered = filter(results);
2461
2462
89
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
89
        return;
2465
89
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
288
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
288
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
288
    const auto filtered = filter(results);
2461
2462
288
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
288
        return;
2465
288
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
54
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
54
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
54
    const auto filtered = filter(results);
2461
2462
54
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
54
        return;
2465
54
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
59
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
59
    const auto filtered = filter(results);
2461
2462
59
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
59
        return;
2465
59
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
54
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
54
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
54
    const auto filtered = filter(results);
2461
2462
54
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
54
        return;
2465
54
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
52
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
52
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
52
    const auto filtered = filter(results);
2461
2462
52
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
52
        return;
2465
52
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
66
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
66
    const auto filtered = filter(results);
2461
2462
66
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
66
        return;
2465
66
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
53
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
53
    const auto filtered = filter(results);
2461
2462
53
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
53
        return;
2465
53
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
49
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
49
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
49
    const auto filtered = filter(results);
2461
2462
49
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
49
        return;
2465
49
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
50
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
50
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
50
    const auto filtered = filter(results);
2461
2462
50
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
50
        return;
2465
50
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
43
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
43
    const auto filtered = filter(results);
2461
2462
43
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
43
        return;
2465
43
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
42
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
42
    const auto filtered = filter(results);
2461
2462
42
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
42
        return;
2465
42
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
72
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
72
    const auto filtered = filter(results);
2461
2462
72
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
72
        return;
2465
72
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
47
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
47
    const auto filtered = filter(results);
2461
2462
47
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
47
        return;
2465
47
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
39
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
39
    const auto filtered = filter(results);
2461
2462
39
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
39
        return;
2465
39
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
47
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
47
    const auto filtered = filter(results);
2461
2462
47
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
47
        return;
2465
47
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
43
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
43
    const auto filtered = filter(results);
2461
2462
43
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
43
        return;
2465
43
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
47
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
47
    const auto filtered = filter(results);
2461
2462
47
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
47
        return;
2465
47
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
69
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
69
    const auto filtered = filter(results);
2461
2462
69
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
69
        return;
2465
69
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
46
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
46
    const auto filtered = filter(results);
2461
2462
46
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
46
        return;
2465
46
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
47
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
47
    const auto filtered = filter(results);
2461
2462
47
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
47
        return;
2465
47
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
39
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
39
    const auto filtered = filter(results);
2461
2462
39
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
39
        return;
2465
39
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
43
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
43
    const auto filtered = filter(results);
2461
2462
43
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
43
        return;
2465
43
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
49
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
49
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
49
    const auto filtered = filter(results);
2461
2462
49
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
49
        return;
2465
49
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
66
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
66
    const auto filtered = filter(results);
2461
2462
66
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
66
        return;
2465
66
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
54
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
54
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
54
    const auto filtered = filter(results);
2461
2462
54
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
54
        return;
2465
54
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
82
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
82
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
82
    const auto filtered = filter(results);
2461
2462
82
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
82
        return;
2465
82
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
46
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
46
    const auto filtered = filter(results);
2461
2462
46
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
46
        return;
2465
46
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
86
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
86
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
86
    const auto filtered = filter(results);
2461
2462
86
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
86
        return;
2465
86
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
76
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
76
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
76
    const auto filtered = filter(results);
2461
2462
76
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
76
        return;
2465
76
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
90
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
90
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
90
    const auto filtered = filter(results);
2461
2462
90
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
90
        return;
2465
90
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
78
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
78
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
78
    const auto filtered = filter(results);
2461
2462
78
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
78
        return;
2465
78
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
79
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
79
    const auto filtered = filter(results);
2461
2462
79
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
79
        return;
2465
79
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
37
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
37
    const auto filtered = filter(results);
2461
2462
37
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
37
        return;
2465
37
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
46
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
46
    const auto filtered = filter(results);
2461
2462
46
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
46
        return;
2465
46
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
0
}
2495
2496
template <class ResultType, class OperationType>
2497
0
void ExecutorBase<ResultType, OperationType>::abort(std::vector<std::string> moduleNames, const std::string operation, const std::string algorithm, const std::string reason) const {
2498
0
    std::sort(moduleNames.begin(), moduleNames.end());
2499
2500
0
    printf("CPU:\n");
2501
0
    system("cat /proc/cpuinfo | grep '^model name' | head -n1");
2502
0
    system("cat /proc/cpuinfo | grep '^flags' | head -n1");
2503
2504
0
    printf("Assertion failure: ");
2505
0
    for (const auto& moduleName : moduleNames) {
2506
0
        printf("%s-", moduleName.c_str());
2507
0
    }
2508
0
    printf("%s-%s-%s\n", operation.c_str(), algorithm.c_str(), reason.c_str());
2509
0
    fflush(stdout);
2510
2511
0
    ::abort();
2512
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<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
2513
2514
template <class ResultType, class OperationType>
2515
300k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
300k
    (void)parentDs;
2517
300k
    return op;
2518
300k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2515
7.10k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
7.10k
    (void)parentDs;
2517
7.10k
    return op;
2518
7.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2515
6.05k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
6.05k
    (void)parentDs;
2517
6.05k
    return op;
2518
6.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2515
5.82k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
5.82k
    (void)parentDs;
2517
5.82k
    return op;
2518
5.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2515
6.37k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
6.37k
    (void)parentDs;
2517
6.37k
    return op;
2518
6.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2515
23.4k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
23.4k
    (void)parentDs;
2517
23.4k
    return op;
2518
23.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2515
13.9k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
13.9k
    (void)parentDs;
2517
13.9k
    return op;
2518
13.9k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2515
3.53k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.53k
    (void)parentDs;
2517
3.53k
    return op;
2518
3.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2515
7.65k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
7.65k
    (void)parentDs;
2517
7.65k
    return op;
2518
7.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2515
3.30k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.30k
    (void)parentDs;
2517
3.30k
    return op;
2518
3.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2515
3.69k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.69k
    (void)parentDs;
2517
3.69k
    return op;
2518
3.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2515
3.53k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.53k
    (void)parentDs;
2517
3.53k
    return op;
2518
3.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2515
4.57k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
4.57k
    (void)parentDs;
2517
4.57k
    return op;
2518
4.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2515
3.92k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.92k
    (void)parentDs;
2517
3.92k
    return op;
2518
3.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2515
3.88k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.88k
    (void)parentDs;
2517
3.88k
    return op;
2518
3.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2515
3.08k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.08k
    (void)parentDs;
2517
3.08k
    return op;
2518
3.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2515
2.75k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.75k
    (void)parentDs;
2517
2.75k
    return op;
2518
2.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SP_800_108) const
Line
Count
Source
2515
4.67k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
4.67k
    (void)parentDs;
2517
4.67k
    return op;
2518
4.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2515
2.93k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.93k
    (void)parentDs;
2517
2.93k
    return op;
2518
2.93k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2515
2.95k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.95k
    (void)parentDs;
2517
2.95k
    return op;
2518
2.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2515
2.65k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.65k
    (void)parentDs;
2517
2.65k
    return op;
2518
2.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const
Line
Count
Source
2515
3.10k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.10k
    (void)parentDs;
2517
3.10k
    return op;
2518
3.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const
Line
Count
Source
2515
3.78k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.78k
    (void)parentDs;
2517
3.78k
    return op;
2518
3.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2515
3.24k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.24k
    (void)parentDs;
2517
3.24k
    return op;
2518
3.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const
Line
Count
Source
2515
2.84k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.84k
    (void)parentDs;
2517
2.84k
    return op;
2518
2.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2515
3.00k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.00k
    (void)parentDs;
2517
3.00k
    return op;
2518
3.00k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2515
3.46k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.46k
    (void)parentDs;
2517
3.46k
    return op;
2518
3.46k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2515
3.21k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.21k
    (void)parentDs;
2517
3.21k
    return op;
2518
3.21k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2515
3.07k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.07k
    (void)parentDs;
2517
3.07k
    return op;
2518
3.07k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2515
2.84k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.84k
    (void)parentDs;
2517
2.84k
    return op;
2518
2.84k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2515
2.58k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.58k
    (void)parentDs;
2517
2.58k
    return op;
2518
2.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2515
3.91k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.91k
    (void)parentDs;
2517
3.91k
    return op;
2518
3.91k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2515
3.15k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.15k
    (void)parentDs;
2517
3.15k
    return op;
2518
3.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2515
3.31k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.31k
    (void)parentDs;
2517
3.31k
    return op;
2518
3.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2515
1.82k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.82k
    (void)parentDs;
2517
1.82k
    return op;
2518
1.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2515
3.58k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.58k
    (void)parentDs;
2517
3.58k
    return op;
2518
3.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const
Line
Count
Source
2515
2.85k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.85k
    (void)parentDs;
2517
2.85k
    return op;
2518
2.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2515
2.78k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.78k
    (void)parentDs;
2517
2.78k
    return op;
2518
2.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2515
3.52k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.52k
    (void)parentDs;
2517
3.52k
    return op;
2518
3.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2515
3.73k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.73k
    (void)parentDs;
2517
3.73k
    return op;
2518
3.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2515
2.40k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.40k
    (void)parentDs;
2517
2.40k
    return op;
2518
2.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const
Line
Count
Source
2515
2.80k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.80k
    (void)parentDs;
2517
2.80k
    return op;
2518
2.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const
Line
Count
Source
2515
3.06k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.06k
    (void)parentDs;
2517
3.06k
    return op;
2518
3.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2515
2.23k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.23k
    (void)parentDs;
2517
2.23k
    return op;
2518
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2515
2.62k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.62k
    (void)parentDs;
2517
2.62k
    return op;
2518
2.62k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2515
2.37k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.37k
    (void)parentDs;
2517
2.37k
    return op;
2518
2.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2515
2.92k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.92k
    (void)parentDs;
2517
2.92k
    return op;
2518
2.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2515
4.08k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
4.08k
    (void)parentDs;
2517
4.08k
    return op;
2518
4.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2515
11.6k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
11.6k
    (void)parentDs;
2517
11.6k
    return op;
2518
11.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2515
2.03k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.03k
    (void)parentDs;
2517
2.03k
    return op;
2518
2.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2515
3.05k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.05k
    (void)parentDs;
2517
3.05k
    return op;
2518
3.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2515
1.84k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.84k
    (void)parentDs;
2517
1.84k
    return op;
2518
1.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2515
2.23k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.23k
    (void)parentDs;
2517
2.23k
    return op;
2518
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2515
2.60k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.60k
    (void)parentDs;
2517
2.60k
    return op;
2518
2.60k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2515
3.04k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.04k
    (void)parentDs;
2517
3.04k
    return op;
2518
3.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2515
2.66k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.66k
    (void)parentDs;
2517
2.66k
    return op;
2518
2.66k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2515
2.34k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.34k
    (void)parentDs;
2517
2.34k
    return op;
2518
2.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2515
2.68k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.68k
    (void)parentDs;
2517
2.68k
    return op;
2518
2.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2515
2.06k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.06k
    (void)parentDs;
2517
2.06k
    return op;
2518
2.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2515
3.28k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.28k
    (void)parentDs;
2517
3.28k
    return op;
2518
3.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2515
3.11k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.11k
    (void)parentDs;
2517
3.11k
    return op;
2518
3.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2515
2.60k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.60k
    (void)parentDs;
2517
2.60k
    return op;
2518
2.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2515
3.51k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.51k
    (void)parentDs;
2517
3.51k
    return op;
2518
3.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2515
3.49k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.49k
    (void)parentDs;
2517
3.49k
    return op;
2518
3.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2515
2.87k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.87k
    (void)parentDs;
2517
2.87k
    return op;
2518
2.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2515
2.34k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.34k
    (void)parentDs;
2517
2.34k
    return op;
2518
2.34k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2515
2.45k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.45k
    (void)parentDs;
2517
2.45k
    return op;
2518
2.45k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2515
2.02k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.02k
    (void)parentDs;
2517
2.02k
    return op;
2518
2.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const
Line
Count
Source
2515
2.81k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.81k
    (void)parentDs;
2517
2.81k
    return op;
2518
2.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
Line
Count
Source
2515
1.74k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.74k
    (void)parentDs;
2517
1.74k
    return op;
2518
1.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2515
2.29k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.29k
    (void)parentDs;
2517
2.29k
    return op;
2518
2.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const
Line
Count
Source
2515
2.05k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.05k
    (void)parentDs;
2517
2.05k
    return op;
2518
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2515
2.30k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.30k
    (void)parentDs;
2517
2.30k
    return op;
2518
2.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2515
2.61k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.61k
    (void)parentDs;
2517
2.61k
    return op;
2518
2.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2515
3.15k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.15k
    (void)parentDs;
2517
3.15k
    return op;
2518
3.15k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2515
2.43k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.43k
    (void)parentDs;
2517
2.43k
    return op;
2518
2.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2515
1.82k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.82k
    (void)parentDs;
2517
1.82k
    return op;
2518
1.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2515
3.00k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.00k
    (void)parentDs;
2517
3.00k
    return op;
2518
3.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2515
2.75k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.75k
    (void)parentDs;
2517
2.75k
    return op;
2518
2.75k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2515
3.46k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.46k
    (void)parentDs;
2517
3.46k
    return op;
2518
3.46k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2515
2.83k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.83k
    (void)parentDs;
2517
2.83k
    return op;
2518
2.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const
Line
Count
Source
2515
2.25k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.25k
    (void)parentDs;
2517
2.25k
    return op;
2518
2.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2515
2.24k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.24k
    (void)parentDs;
2517
2.24k
    return op;
2518
2.24k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2515
2.91k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.91k
    (void)parentDs;
2517
2.91k
    return op;
2518
2.91k
}
2519
2520
463
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2521
463
    (void)parentDs;
2522
463
    op.modulo = modulo;
2523
463
    return op;
2524
463
}
2525
2526
345
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2527
345
    (void)parentDs;
2528
345
    op.modulo = modulo;
2529
345
    return op;
2530
345
}
2531
2532
663
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2533
663
    (void)parentDs;
2534
663
    op.modulo = modulo;
2535
663
    return op;
2536
663
}
2537
2538
386
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2539
386
    (void)parentDs;
2540
386
    op.modulo = modulo;
2541
386
    return op;
2542
386
}
2543
2544
270
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2545
270
    (void)parentDs;
2546
270
    op.modulo = modulo;
2547
270
    return op;
2548
270
}
2549
2550
572
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2551
572
    (void)parentDs;
2552
572
    op.modulo = modulo;
2553
572
    return op;
2554
572
}
2555
2556
771
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2557
771
    (void)parentDs;
2558
771
    op.modulo = modulo;
2559
771
    return op;
2560
771
}
2561
2562
336
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2563
336
    (void)parentDs;
2564
336
    op.modulo = modulo;
2565
336
    return op;
2566
336
}
2567
2568
747
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2569
747
    (void)parentDs;
2570
747
    op.modulo = modulo;
2571
747
    return op;
2572
747
}
2573
2574
453
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2575
453
    (void)parentDs;
2576
453
    op.modulo = modulo;
2577
453
    return op;
2578
453
}
2579
2580
528
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2581
528
    (void)parentDs;
2582
528
    op.modulo = modulo;
2583
528
    return op;
2584
528
}
2585
2586
513
operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2587
513
    (void)parentDs;
2588
513
    op.modulo = modulo;
2589
513
    return op;
2590
513
}
2591
2592
296
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2593
296
    (void)parentDs;
2594
296
    op.modulo = modulo;
2595
296
    return op;
2596
296
}
2597
2598
257
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2599
257
    (void)parentDs;
2600
257
    op.modulo = modulo;
2601
257
    return op;
2602
257
}
2603
2604
500
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2605
500
    (void)parentDs;
2606
500
    op.modulo = modulo;
2607
500
    return op;
2608
500
}
2609
2610
251
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2611
251
    (void)parentDs;
2612
251
    op.modulo = modulo;
2613
251
    return op;
2614
251
}
2615
2616
480
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2617
480
    (void)parentDs;
2618
480
    op.modulo = modulo;
2619
480
    return op;
2620
480
}
2621
2622
620
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2623
620
    (void)parentDs;
2624
620
    op.modulo = modulo;
2625
620
    return op;
2626
620
}
2627
2628
303
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2629
303
    (void)parentDs;
2630
303
    op.modulo = modulo;
2631
303
    return op;
2632
303
}
2633
2634
704
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2635
704
    (void)parentDs;
2636
704
    op.modulo = modulo;
2637
704
    return op;
2638
704
}
2639
2640
500
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2641
500
    (void)parentDs;
2642
500
    op.modulo = modulo;
2643
500
    return op;
2644
500
}
2645
2646
215
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2647
215
    (void)parentDs;
2648
215
    op.modulo = modulo;
2649
215
    return op;
2650
215
}
2651
2652
template <class ResultType, class OperationType>
2653
313k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
313k
    Datasource ds(data, size);
2655
313k
    if ( parentDs != nullptr ) {
2656
313k
        auto modifier = parentDs->GetData(0);
2657
313k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
313k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
313k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
7.13k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
7.13k
    Datasource ds(data, size);
2655
7.13k
    if ( parentDs != nullptr ) {
2656
7.13k
        auto modifier = parentDs->GetData(0);
2657
7.13k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
7.13k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
7.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
6.09k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
6.09k
    Datasource ds(data, size);
2655
6.09k
    if ( parentDs != nullptr ) {
2656
6.09k
        auto modifier = parentDs->GetData(0);
2657
6.09k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
6.09k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
6.09k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
5.85k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
5.85k
    Datasource ds(data, size);
2655
5.85k
    if ( parentDs != nullptr ) {
2656
5.85k
        auto modifier = parentDs->GetData(0);
2657
5.85k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
5.85k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
5.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
6.40k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
6.40k
    Datasource ds(data, size);
2655
6.40k
    if ( parentDs != nullptr ) {
2656
6.40k
        auto modifier = parentDs->GetData(0);
2657
6.40k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
6.40k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
6.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
23.4k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
23.4k
    Datasource ds(data, size);
2655
23.4k
    if ( parentDs != nullptr ) {
2656
23.4k
        auto modifier = parentDs->GetData(0);
2657
23.4k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
23.4k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
23.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
14.0k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
14.0k
    Datasource ds(data, size);
2655
14.0k
    if ( parentDs != nullptr ) {
2656
14.0k
        auto modifier = parentDs->GetData(0);
2657
14.0k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
14.0k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
14.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.56k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.56k
    Datasource ds(data, size);
2655
3.56k
    if ( parentDs != nullptr ) {
2656
3.56k
        auto modifier = parentDs->GetData(0);
2657
3.56k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.56k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
7.69k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
7.69k
    Datasource ds(data, size);
2655
7.69k
    if ( parentDs != nullptr ) {
2656
7.69k
        auto modifier = parentDs->GetData(0);
2657
7.69k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
7.69k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
7.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.33k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.33k
    Datasource ds(data, size);
2655
3.33k
    if ( parentDs != nullptr ) {
2656
3.33k
        auto modifier = parentDs->GetData(0);
2657
3.33k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.33k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.33k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.73k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.73k
    Datasource ds(data, size);
2655
3.73k
    if ( parentDs != nullptr ) {
2656
3.73k
        auto modifier = parentDs->GetData(0);
2657
3.73k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.73k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.58k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.58k
    Datasource ds(data, size);
2655
3.58k
    if ( parentDs != nullptr ) {
2656
3.58k
        auto modifier = parentDs->GetData(0);
2657
3.58k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.58k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
4.60k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
4.60k
    Datasource ds(data, size);
2655
4.60k
    if ( parentDs != nullptr ) {
2656
4.60k
        auto modifier = parentDs->GetData(0);
2657
4.60k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
4.60k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
4.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.96k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.96k
    Datasource ds(data, size);
2655
3.96k
    if ( parentDs != nullptr ) {
2656
3.96k
        auto modifier = parentDs->GetData(0);
2657
3.96k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.96k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.93k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.93k
    Datasource ds(data, size);
2655
3.93k
    if ( parentDs != nullptr ) {
2656
3.93k
        auto modifier = parentDs->GetData(0);
2657
3.93k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.93k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.11k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.11k
    Datasource ds(data, size);
2655
3.11k
    if ( parentDs != nullptr ) {
2656
3.11k
        auto modifier = parentDs->GetData(0);
2657
3.11k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.11k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.78k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.78k
    Datasource ds(data, size);
2655
2.78k
    if ( parentDs != nullptr ) {
2656
2.78k
        auto modifier = parentDs->GetData(0);
2657
2.78k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.78k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
4.71k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
4.71k
    Datasource ds(data, size);
2655
4.71k
    if ( parentDs != nullptr ) {
2656
4.71k
        auto modifier = parentDs->GetData(0);
2657
4.71k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
4.71k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
4.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.95k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.95k
    Datasource ds(data, size);
2655
2.95k
    if ( parentDs != nullptr ) {
2656
2.95k
        auto modifier = parentDs->GetData(0);
2657
2.95k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.95k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.95k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.97k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.97k
    Datasource ds(data, size);
2655
2.97k
    if ( parentDs != nullptr ) {
2656
2.97k
        auto modifier = parentDs->GetData(0);
2657
2.97k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.97k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.68k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.68k
    Datasource ds(data, size);
2655
2.68k
    if ( parentDs != nullptr ) {
2656
2.68k
        auto modifier = parentDs->GetData(0);
2657
2.68k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.68k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.13k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.13k
    Datasource ds(data, size);
2655
3.13k
    if ( parentDs != nullptr ) {
2656
3.13k
        auto modifier = parentDs->GetData(0);
2657
3.13k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.13k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.81k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.81k
    Datasource ds(data, size);
2655
3.81k
    if ( parentDs != nullptr ) {
2656
3.81k
        auto modifier = parentDs->GetData(0);
2657
3.81k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.81k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.26k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.26k
    Datasource ds(data, size);
2655
3.26k
    if ( parentDs != nullptr ) {
2656
3.26k
        auto modifier = parentDs->GetData(0);
2657
3.26k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.26k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.86k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.86k
    Datasource ds(data, size);
2655
2.86k
    if ( parentDs != nullptr ) {
2656
2.86k
        auto modifier = parentDs->GetData(0);
2657
2.86k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.86k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.02k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.02k
    Datasource ds(data, size);
2655
3.02k
    if ( parentDs != nullptr ) {
2656
3.02k
        auto modifier = parentDs->GetData(0);
2657
3.02k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.02k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.02k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.49k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.49k
    Datasource ds(data, size);
2655
3.49k
    if ( parentDs != nullptr ) {
2656
3.49k
        auto modifier = parentDs->GetData(0);
2657
3.49k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.49k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.49k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.24k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.24k
    Datasource ds(data, size);
2655
3.24k
    if ( parentDs != nullptr ) {
2656
3.24k
        auto modifier = parentDs->GetData(0);
2657
3.24k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.24k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.24k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.10k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.10k
    Datasource ds(data, size);
2655
3.10k
    if ( parentDs != nullptr ) {
2656
3.10k
        auto modifier = parentDs->GetData(0);
2657
3.10k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.10k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.10k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.86k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.86k
    Datasource ds(data, size);
2655
2.86k
    if ( parentDs != nullptr ) {
2656
2.86k
        auto modifier = parentDs->GetData(0);
2657
2.86k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.86k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.86k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.60k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.60k
    Datasource ds(data, size);
2655
2.60k
    if ( parentDs != nullptr ) {
2656
2.60k
        auto modifier = parentDs->GetData(0);
2657
2.60k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.60k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.94k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.94k
    Datasource ds(data, size);
2655
3.94k
    if ( parentDs != nullptr ) {
2656
3.94k
        auto modifier = parentDs->GetData(0);
2657
3.94k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.94k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.94k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.19k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.19k
    Datasource ds(data, size);
2655
3.19k
    if ( parentDs != nullptr ) {
2656
3.19k
        auto modifier = parentDs->GetData(0);
2657
3.19k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.19k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.35k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.35k
    Datasource ds(data, size);
2655
3.35k
    if ( parentDs != nullptr ) {
2656
3.35k
        auto modifier = parentDs->GetData(0);
2657
3.35k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.35k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.35k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.85k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.85k
    Datasource ds(data, size);
2655
1.85k
    if ( parentDs != nullptr ) {
2656
1.85k
        auto modifier = parentDs->GetData(0);
2657
1.85k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.85k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.62k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.62k
    Datasource ds(data, size);
2655
3.62k
    if ( parentDs != nullptr ) {
2656
3.62k
        auto modifier = parentDs->GetData(0);
2657
3.62k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.62k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.87k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.87k
    Datasource ds(data, size);
2655
2.87k
    if ( parentDs != nullptr ) {
2656
2.87k
        auto modifier = parentDs->GetData(0);
2657
2.87k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.87k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.81k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.81k
    Datasource ds(data, size);
2655
2.81k
    if ( parentDs != nullptr ) {
2656
2.81k
        auto modifier = parentDs->GetData(0);
2657
2.81k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.81k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.55k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.55k
    Datasource ds(data, size);
2655
3.55k
    if ( parentDs != nullptr ) {
2656
3.55k
        auto modifier = parentDs->GetData(0);
2657
3.55k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.55k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.76k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.76k
    Datasource ds(data, size);
2655
3.76k
    if ( parentDs != nullptr ) {
2656
3.76k
        auto modifier = parentDs->GetData(0);
2657
3.76k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.76k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.42k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.42k
    Datasource ds(data, size);
2655
2.42k
    if ( parentDs != nullptr ) {
2656
2.42k
        auto modifier = parentDs->GetData(0);
2657
2.42k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.42k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.82k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.82k
    Datasource ds(data, size);
2655
2.82k
    if ( parentDs != nullptr ) {
2656
2.82k
        auto modifier = parentDs->GetData(0);
2657
2.82k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.82k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.08k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.08k
    Datasource ds(data, size);
2655
3.08k
    if ( parentDs != nullptr ) {
2656
3.08k
        auto modifier = parentDs->GetData(0);
2657
3.08k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.08k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.26k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.26k
    Datasource ds(data, size);
2655
2.26k
    if ( parentDs != nullptr ) {
2656
2.26k
        auto modifier = parentDs->GetData(0);
2657
2.26k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.26k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.64k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.64k
    Datasource ds(data, size);
2655
2.64k
    if ( parentDs != nullptr ) {
2656
2.64k
        auto modifier = parentDs->GetData(0);
2657
2.64k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.64k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.64k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.39k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.39k
    Datasource ds(data, size);
2655
2.39k
    if ( parentDs != nullptr ) {
2656
2.39k
        auto modifier = parentDs->GetData(0);
2657
2.39k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.39k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.95k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.95k
    Datasource ds(data, size);
2655
2.95k
    if ( parentDs != nullptr ) {
2656
2.95k
        auto modifier = parentDs->GetData(0);
2657
2.95k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.95k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
4.11k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
4.11k
    Datasource ds(data, size);
2655
4.11k
    if ( parentDs != nullptr ) {
2656
4.11k
        auto modifier = parentDs->GetData(0);
2657
4.11k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
4.11k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
4.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
21.9k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
21.9k
    Datasource ds(data, size);
2655
21.9k
    if ( parentDs != nullptr ) {
2656
21.9k
        auto modifier = parentDs->GetData(0);
2657
21.9k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
21.9k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
21.9k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.05k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.05k
    Datasource ds(data, size);
2655
2.05k
    if ( parentDs != nullptr ) {
2656
2.05k
        auto modifier = parentDs->GetData(0);
2657
2.05k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.05k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.10k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.10k
    Datasource ds(data, size);
2655
3.10k
    if ( parentDs != nullptr ) {
2656
3.10k
        auto modifier = parentDs->GetData(0);
2657
3.10k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.10k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.85k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.85k
    Datasource ds(data, size);
2655
1.85k
    if ( parentDs != nullptr ) {
2656
1.85k
        auto modifier = parentDs->GetData(0);
2657
1.85k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.85k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.26k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.26k
    Datasource ds(data, size);
2655
2.26k
    if ( parentDs != nullptr ) {
2656
2.26k
        auto modifier = parentDs->GetData(0);
2657
2.26k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.26k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.62k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.62k
    Datasource ds(data, size);
2655
2.62k
    if ( parentDs != nullptr ) {
2656
2.62k
        auto modifier = parentDs->GetData(0);
2657
2.62k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.62k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.62k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.08k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.08k
    Datasource ds(data, size);
2655
3.08k
    if ( parentDs != nullptr ) {
2656
3.08k
        auto modifier = parentDs->GetData(0);
2657
3.08k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.08k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.77k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.77k
    Datasource ds(data, size);
2655
2.77k
    if ( parentDs != nullptr ) {
2656
2.77k
        auto modifier = parentDs->GetData(0);
2657
2.77k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.77k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.77k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.39k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.39k
    Datasource ds(data, size);
2655
2.39k
    if ( parentDs != nullptr ) {
2656
2.39k
        auto modifier = parentDs->GetData(0);
2657
2.39k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.39k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.76k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.76k
    Datasource ds(data, size);
2655
2.76k
    if ( parentDs != nullptr ) {
2656
2.76k
        auto modifier = parentDs->GetData(0);
2657
2.76k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.76k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.09k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.09k
    Datasource ds(data, size);
2655
2.09k
    if ( parentDs != nullptr ) {
2656
2.09k
        auto modifier = parentDs->GetData(0);
2657
2.09k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.09k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.09k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.32k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.32k
    Datasource ds(data, size);
2655
3.32k
    if ( parentDs != nullptr ) {
2656
3.32k
        auto modifier = parentDs->GetData(0);
2657
3.32k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.32k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.13k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.13k
    Datasource ds(data, size);
2655
3.13k
    if ( parentDs != nullptr ) {
2656
3.13k
        auto modifier = parentDs->GetData(0);
2657
3.13k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.13k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.64k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.64k
    Datasource ds(data, size);
2655
2.64k
    if ( parentDs != nullptr ) {
2656
2.64k
        auto modifier = parentDs->GetData(0);
2657
2.64k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.64k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.53k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.53k
    Datasource ds(data, size);
2655
3.53k
    if ( parentDs != nullptr ) {
2656
3.53k
        auto modifier = parentDs->GetData(0);
2657
3.53k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.53k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.51k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.51k
    Datasource ds(data, size);
2655
3.51k
    if ( parentDs != nullptr ) {
2656
3.51k
        auto modifier = parentDs->GetData(0);
2657
3.51k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.51k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.89k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.89k
    Datasource ds(data, size);
2655
2.89k
    if ( parentDs != nullptr ) {
2656
2.89k
        auto modifier = parentDs->GetData(0);
2657
2.89k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.89k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.36k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.36k
    Datasource ds(data, size);
2655
2.36k
    if ( parentDs != nullptr ) {
2656
2.36k
        auto modifier = parentDs->GetData(0);
2657
2.36k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.36k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.36k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.47k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.47k
    Datasource ds(data, size);
2655
2.47k
    if ( parentDs != nullptr ) {
2656
2.47k
        auto modifier = parentDs->GetData(0);
2657
2.47k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.47k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.47k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.05k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.05k
    Datasource ds(data, size);
2655
2.05k
    if ( parentDs != nullptr ) {
2656
2.05k
        auto modifier = parentDs->GetData(0);
2657
2.05k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.05k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
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
2653
2.84k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.84k
    Datasource ds(data, size);
2655
2.84k
    if ( parentDs != nullptr ) {
2656
2.84k
        auto modifier = parentDs->GetData(0);
2657
2.84k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.84k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.76k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.76k
    Datasource ds(data, size);
2655
1.76k
    if ( parentDs != nullptr ) {
2656
1.76k
        auto modifier = parentDs->GetData(0);
2657
1.76k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.76k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.31k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.31k
    Datasource ds(data, size);
2655
2.31k
    if ( parentDs != nullptr ) {
2656
2.31k
        auto modifier = parentDs->GetData(0);
2657
2.31k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.31k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.06k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.06k
    Datasource ds(data, size);
2655
2.06k
    if ( parentDs != nullptr ) {
2656
2.06k
        auto modifier = parentDs->GetData(0);
2657
2.06k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.06k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.32k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.32k
    Datasource ds(data, size);
2655
2.32k
    if ( parentDs != nullptr ) {
2656
2.32k
        auto modifier = parentDs->GetData(0);
2657
2.32k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.32k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.64k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.64k
    Datasource ds(data, size);
2655
2.64k
    if ( parentDs != nullptr ) {
2656
2.64k
        auto modifier = parentDs->GetData(0);
2657
2.64k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.64k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.17k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.17k
    Datasource ds(data, size);
2655
3.17k
    if ( parentDs != nullptr ) {
2656
3.17k
        auto modifier = parentDs->GetData(0);
2657
3.17k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.17k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.17k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.46k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.46k
    Datasource ds(data, size);
2655
2.46k
    if ( parentDs != nullptr ) {
2656
2.46k
        auto modifier = parentDs->GetData(0);
2657
2.46k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.46k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.46k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.83k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.83k
    Datasource ds(data, size);
2655
1.83k
    if ( parentDs != nullptr ) {
2656
1.83k
        auto modifier = parentDs->GetData(0);
2657
1.83k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.83k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.03k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.03k
    Datasource ds(data, size);
2655
3.03k
    if ( parentDs != nullptr ) {
2656
3.03k
        auto modifier = parentDs->GetData(0);
2657
3.03k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.03k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.77k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.77k
    Datasource ds(data, size);
2655
2.77k
    if ( parentDs != nullptr ) {
2656
2.77k
        auto modifier = parentDs->GetData(0);
2657
2.77k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.77k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.77k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.49k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.49k
    Datasource ds(data, size);
2655
3.49k
    if ( parentDs != nullptr ) {
2656
3.49k
        auto modifier = parentDs->GetData(0);
2657
3.49k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.49k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.85k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.85k
    Datasource ds(data, size);
2655
2.85k
    if ( parentDs != nullptr ) {
2656
2.85k
        auto modifier = parentDs->GetData(0);
2657
2.85k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.85k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.30k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.30k
    Datasource ds(data, size);
2655
2.30k
    if ( parentDs != nullptr ) {
2656
2.30k
        auto modifier = parentDs->GetData(0);
2657
2.30k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.30k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.27k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.27k
    Datasource ds(data, size);
2655
2.27k
    if ( parentDs != nullptr ) {
2656
2.27k
        auto modifier = parentDs->GetData(0);
2657
2.27k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.27k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.27k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.95k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.95k
    Datasource ds(data, size);
2655
2.95k
    if ( parentDs != nullptr ) {
2656
2.95k
        auto modifier = parentDs->GetData(0);
2657
2.95k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.95k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.95k
}
2662
2663
template <class ResultType, class OperationType>
2664
311k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
311k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
311k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
311k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
311k
    if ( modules.find(moduleID) == modules.end() ) {
2678
214k
        return nullptr;
2679
214k
    }
2680
2681
96.7k
    return modules.at(moduleID);
2682
311k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
7.10k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
7.10k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
7.10k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
7.10k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
7.10k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.23k
        return nullptr;
2679
2.23k
    }
2680
2681
4.87k
    return modules.at(moduleID);
2682
7.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
6.05k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
6.05k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
6.05k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
6.05k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
6.05k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.95k
        return nullptr;
2679
2.95k
    }
2680
2681
3.10k
    return modules.at(moduleID);
2682
6.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
5.82k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
5.82k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
5.82k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
5.82k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
5.82k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.15k
        return nullptr;
2679
2.15k
    }
2680
2681
3.67k
    return modules.at(moduleID);
2682
5.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
6.37k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
6.37k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
6.37k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
6.37k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
6.37k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.35k
        return nullptr;
2679
2.35k
    }
2680
2681
4.02k
    return modules.at(moduleID);
2682
6.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
23.4k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
23.4k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
23.4k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
23.4k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
23.4k
    if ( modules.find(moduleID) == modules.end() ) {
2678
5.24k
        return nullptr;
2679
5.24k
    }
2680
2681
18.1k
    return modules.at(moduleID);
2682
23.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
13.9k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
13.9k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
13.9k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
13.9k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
13.9k
    if ( modules.find(moduleID) == modules.end() ) {
2678
3.12k
        return nullptr;
2679
3.12k
    }
2680
2681
10.8k
    return modules.at(moduleID);
2682
13.9k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.53k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.53k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.53k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.53k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.53k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.34k
        return nullptr;
2679
2.34k
    }
2680
2681
1.18k
    return modules.at(moduleID);
2682
3.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
7.65k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
7.65k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
7.65k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
7.65k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
7.65k
    if ( modules.find(moduleID) == modules.end() ) {
2678
3.10k
        return nullptr;
2679
3.10k
    }
2680
2681
4.55k
    return modules.at(moduleID);
2682
7.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.30k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.30k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.30k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.30k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.30k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.40k
        return nullptr;
2679
2.40k
    }
2680
2681
896
    return modules.at(moduleID);
2682
3.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.69k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.69k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.69k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.69k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.69k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.87k
        return nullptr;
2679
2.87k
    }
2680
2681
827
    return modules.at(moduleID);
2682
3.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.53k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.53k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.53k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.53k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.53k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.86k
        return nullptr;
2679
2.86k
    }
2680
2681
676
    return modules.at(moduleID);
2682
3.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
4.57k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
4.57k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
4.57k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
4.57k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
4.57k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.45k
        return nullptr;
2679
2.45k
    }
2680
2681
2.12k
    return modules.at(moduleID);
2682
4.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.92k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.92k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.92k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.92k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.92k
    if ( modules.find(moduleID) == modules.end() ) {
2678
3.29k
        return nullptr;
2679
3.29k
    }
2680
2681
633
    return modules.at(moduleID);
2682
3.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.88k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.88k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.88k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.88k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.88k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.97k
        return nullptr;
2679
2.97k
    }
2680
2681
915
    return modules.at(moduleID);
2682
3.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.08k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.08k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.08k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.08k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.08k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.18k
        return nullptr;
2679
2.18k
    }
2680
2681
898
    return modules.at(moduleID);
2682
3.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.75k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.75k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.75k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.75k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.75k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.58k
        return nullptr;
2679
2.58k
    }
2680
2681
172
    return modules.at(moduleID);
2682
2.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
4.67k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
4.67k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
4.67k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
4.67k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
4.67k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.63k
        return nullptr;
2679
2.63k
    }
2680
2681
2.04k
    return modules.at(moduleID);
2682
4.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.93k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.93k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.93k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.93k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.93k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.48k
        return nullptr;
2679
1.48k
    }
2680
2681
1.45k
    return modules.at(moduleID);
2682
2.93k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.95k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.95k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.95k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.95k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.95k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.72k
        return nullptr;
2679
1.72k
    }
2680
2681
1.23k
    return modules.at(moduleID);
2682
2.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.65k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.65k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.65k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.65k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.65k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.55k
        return nullptr;
2679
1.55k
    }
2680
2681
1.10k
    return modules.at(moduleID);
2682
2.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.10k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.10k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.10k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.10k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.10k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.85k
        return nullptr;
2679
2.85k
    }
2680
2681
247
    return modules.at(moduleID);
2682
3.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.78k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.78k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.78k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.78k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.78k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.17k
        return nullptr;
2679
2.17k
    }
2680
2681
1.61k
    return modules.at(moduleID);
2682
3.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.24k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.24k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.24k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.24k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.24k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.76k
        return nullptr;
2679
2.76k
    }
2680
2681
480
    return modules.at(moduleID);
2682
3.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.84k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.84k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.84k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.84k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.84k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.62k
        return nullptr;
2679
2.62k
    }
2680
2681
212
    return modules.at(moduleID);
2682
2.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.00k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.00k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.00k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.00k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.00k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.77k
        return nullptr;
2679
2.77k
    }
2680
2681
229
    return modules.at(moduleID);
2682
3.00k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.46k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.46k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.46k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.46k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.46k
    if ( modules.find(moduleID) == modules.end() ) {
2678
3.26k
        return nullptr;
2679
3.26k
    }
2680
2681
205
    return modules.at(moduleID);
2682
3.46k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.21k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.21k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.21k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.21k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.21k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.39k
        return nullptr;
2679
2.39k
    }
2680
2681
818
    return modules.at(moduleID);
2682
3.21k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.07k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.07k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.07k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.07k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.07k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.60k
        return nullptr;
2679
2.60k
    }
2680
2681
472
    return modules.at(moduleID);
2682
3.07k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.84k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.84k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.84k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.84k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.84k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.64k
        return nullptr;
2679
2.64k
    }
2680
2681
198
    return modules.at(moduleID);
2682
2.84k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.58k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.58k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.58k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.58k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.58k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.39k
        return nullptr;
2679
2.39k
    }
2680
2681
188
    return modules.at(moduleID);
2682
2.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.91k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.91k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.91k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.91k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.91k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.77k
        return nullptr;
2679
2.77k
    }
2680
2681
1.14k
    return modules.at(moduleID);
2682
3.91k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.15k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.15k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.15k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.15k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.15k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.51k
        return nullptr;
2679
2.51k
    }
2680
2681
640
    return modules.at(moduleID);
2682
3.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.31k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.31k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.31k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.31k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.31k
    if ( modules.find(moduleID) == modules.end() ) {
2678
3.03k
        return nullptr;
2679
3.03k
    }
2680
2681
287
    return modules.at(moduleID);
2682
3.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.82k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.82k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.82k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.82k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.82k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.64k
        return nullptr;
2679
1.64k
    }
2680
2681
187
    return modules.at(moduleID);
2682
1.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.58k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.58k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.58k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.58k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.58k
    if ( modules.find(moduleID) == modules.end() ) {
2678
3.37k
        return nullptr;
2679
3.37k
    }
2680
2681
212
    return modules.at(moduleID);
2682
3.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.85k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.85k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.85k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.85k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.85k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.54k
        return nullptr;
2679
2.54k
    }
2680
2681
310
    return modules.at(moduleID);
2682
2.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.78k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.78k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.78k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.78k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.78k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.55k
        return nullptr;
2679
2.55k
    }
2680
2681
224
    return modules.at(moduleID);
2682
2.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.52k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.52k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.52k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.52k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.52k
    if ( modules.find(moduleID) == modules.end() ) {
2678
3.25k
        return nullptr;
2679
3.25k
    }
2680
2681
269
    return modules.at(moduleID);
2682
3.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.73k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.73k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.73k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.73k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.73k
    if ( modules.find(moduleID) == modules.end() ) {
2678
3.49k
        return nullptr;
2679
3.49k
    }
2680
2681
243
    return modules.at(moduleID);
2682
3.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.40k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.40k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.40k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.40k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.40k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.04k
        return nullptr;
2679
2.04k
    }
2680
2681
363
    return modules.at(moduleID);
2682
2.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.80k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.80k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.80k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.80k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.80k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.41k
        return nullptr;
2679
2.41k
    }
2680
2681
386
    return modules.at(moduleID);
2682
2.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.06k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.06k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.06k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.06k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.06k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.38k
        return nullptr;
2679
2.38k
    }
2680
2681
675
    return modules.at(moduleID);
2682
3.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.23k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.23k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.23k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.23k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.23k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.92k
        return nullptr;
2679
1.92k
    }
2680
2681
314
    return modules.at(moduleID);
2682
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.62k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.62k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.62k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.62k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.62k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.30k
        return nullptr;
2679
2.30k
    }
2680
2681
317
    return modules.at(moduleID);
2682
2.62k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.37k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.37k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.37k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.37k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.37k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.03k
        return nullptr;
2679
2.03k
    }
2680
2681
338
    return modules.at(moduleID);
2682
2.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.92k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.92k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.92k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.92k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.92k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.64k
        return nullptr;
2679
2.64k
    }
2680
2681
285
    return modules.at(moduleID);
2682
2.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
4.08k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
4.08k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
4.08k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
4.08k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
4.08k
    if ( modules.find(moduleID) == modules.end() ) {
2678
3.41k
        return nullptr;
2679
3.41k
    }
2680
2681
669
    return modules.at(moduleID);
2682
4.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
21.8k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
21.8k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
21.8k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
21.8k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
21.8k
    if ( modules.find(moduleID) == modules.end() ) {
2678
9.10k
        return nullptr;
2679
9.10k
    }
2680
2681
12.7k
    return modules.at(moduleID);
2682
21.8k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.03k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.03k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.03k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.03k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.03k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.73k
        return nullptr;
2679
1.73k
    }
2680
2681
298
    return modules.at(moduleID);
2682
2.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.05k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.05k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.05k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.05k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.05k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.41k
        return nullptr;
2679
2.41k
    }
2680
2681
637
    return modules.at(moduleID);
2682
3.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.84k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.84k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.84k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.84k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.84k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.63k
        return nullptr;
2679
1.63k
    }
2680
2681
210
    return modules.at(moduleID);
2682
1.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.23k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.23k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.23k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.23k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.23k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.01k
        return nullptr;
2679
2.01k
    }
2680
2681
223
    return modules.at(moduleID);
2682
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.60k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.60k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.60k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.60k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.60k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.38k
        return nullptr;
2679
2.38k
    }
2680
2681
216
    return modules.at(moduleID);
2682
2.60k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.04k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.04k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.04k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.04k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.04k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.84k
        return nullptr;
2679
2.84k
    }
2680
2681
201
    return modules.at(moduleID);
2682
3.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.66k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.66k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.66k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.66k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.66k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.36k
        return nullptr;
2679
2.36k
    }
2680
2681
298
    return modules.at(moduleID);
2682
2.66k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.34k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.34k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.34k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.34k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.34k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.05k
        return nullptr;
2679
2.05k
    }
2680
2681
292
    return modules.at(moduleID);
2682
2.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.68k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.68k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.68k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.68k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.68k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.41k
        return nullptr;
2679
2.41k
    }
2680
2681
261
    return modules.at(moduleID);
2682
2.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.06k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.06k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.06k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.06k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.06k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.83k
        return nullptr;
2679
1.83k
    }
2680
2681
236
    return modules.at(moduleID);
2682
2.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.28k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.28k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.28k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.28k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.28k
    if ( modules.find(moduleID) == modules.end() ) {
2678
3.04k
        return nullptr;
2679
3.04k
    }
2680
2681
237
    return modules.at(moduleID);
2682
3.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.11k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.11k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.11k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.11k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.11k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.86k
        return nullptr;
2679
2.86k
    }
2680
2681
248
    return modules.at(moduleID);
2682
3.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.60k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.60k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.60k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.60k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.60k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.30k
        return nullptr;
2679
2.30k
    }
2680
2681
304
    return modules.at(moduleID);
2682
2.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.51k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.51k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.51k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.51k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.51k
    if ( modules.find(moduleID) == modules.end() ) {
2678
3.25k
        return nullptr;
2679
3.25k
    }
2680
2681
260
    return modules.at(moduleID);
2682
3.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.49k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.49k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.49k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.49k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.49k
    if ( modules.find(moduleID) == modules.end() ) {
2678
3.29k
        return nullptr;
2679
3.29k
    }
2680
2681
194
    return modules.at(moduleID);
2682
3.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.87k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.87k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.87k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.87k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.87k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.65k
        return nullptr;
2679
2.65k
    }
2680
2681
219
    return modules.at(moduleID);
2682
2.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.34k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.34k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.34k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.34k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.34k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.12k
        return nullptr;
2679
2.12k
    }
2680
2681
223
    return modules.at(moduleID);
2682
2.34k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.45k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.45k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.45k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.45k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.45k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.22k
        return nullptr;
2679
2.22k
    }
2680
2681
224
    return modules.at(moduleID);
2682
2.45k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.02k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.02k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.02k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.02k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.02k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.75k
        return nullptr;
2679
1.75k
    }
2680
2681
272
    return modules.at(moduleID);
2682
2.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.81k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.81k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.81k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.81k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.81k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.61k
        return nullptr;
2679
2.61k
    }
2680
2681
199
    return modules.at(moduleID);
2682
2.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.74k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.74k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.74k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.74k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.74k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.54k
        return nullptr;
2679
1.54k
    }
2680
2681
200
    return modules.at(moduleID);
2682
1.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.29k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.29k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.29k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.29k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.29k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.07k
        return nullptr;
2679
2.07k
    }
2680
2681
219
    return modules.at(moduleID);
2682
2.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.05k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.05k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.05k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.05k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.05k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.84k
        return nullptr;
2679
1.84k
    }
2680
2681
203
    return modules.at(moduleID);
2682
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.30k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.30k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.30k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.30k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.30k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.06k
        return nullptr;
2679
2.06k
    }
2680
2681
244
    return modules.at(moduleID);
2682
2.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.61k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.61k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.61k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.61k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.61k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.32k
        return nullptr;
2679
2.32k
    }
2680
2681
292
    return modules.at(moduleID);
2682
2.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.15k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.15k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.15k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.15k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.15k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.91k
        return nullptr;
2679
2.91k
    }
2680
2681
237
    return modules.at(moduleID);
2682
3.15k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.43k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.43k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.43k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.43k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.43k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.16k
        return nullptr;
2679
2.16k
    }
2680
2681
277
    return modules.at(moduleID);
2682
2.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.82k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.82k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.82k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.82k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.82k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.59k
        return nullptr;
2679
1.59k
    }
2680
2681
222
    return modules.at(moduleID);
2682
1.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.00k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.00k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.00k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.00k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.00k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.70k
        return nullptr;
2679
2.70k
    }
2680
2681
299
    return modules.at(moduleID);
2682
3.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.75k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.75k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.75k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.75k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.75k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.45k
        return nullptr;
2679
2.45k
    }
2680
2681
303
    return modules.at(moduleID);
2682
2.75k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.46k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.46k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.46k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.46k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.46k
    if ( modules.find(moduleID) == modules.end() ) {
2678
3.13k
        return nullptr;
2679
3.13k
    }
2680
2681
324
    return modules.at(moduleID);
2682
3.46k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.83k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.83k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.83k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.83k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.83k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.57k
        return nullptr;
2679
2.57k
    }
2680
2681
264
    return modules.at(moduleID);
2682
2.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.25k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.25k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.25k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.25k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.25k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.89k
        return nullptr;
2679
1.89k
    }
2680
2681
359
    return modules.at(moduleID);
2682
2.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.24k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.24k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.24k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.24k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.24k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.05k
        return nullptr;
2679
2.05k
    }
2680
2681
191
    return modules.at(moduleID);
2682
2.24k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.91k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.91k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.91k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.91k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.91k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.65k
        return nullptr;
2679
2.65k
    }
2680
2681
257
    return modules.at(moduleID);
2682
2.91k
}
2683
2684
template <class ResultType, class OperationType>
2685
46.3k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
46.3k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
46.3k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
313k
    do {
2691
313k
        auto op = getOp(&parentDs, data, size);
2692
313k
        auto module = getModule(parentDs);
2693
313k
        if ( module == nullptr ) {
2694
214k
            continue;
2695
214k
        }
2696
2697
99.3k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
99.3k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
911
            break;
2702
911
        }
2703
312k
    } while ( parentDs.Get<bool>() == true );
2704
2705
46.3k
    if ( operations.empty() == true ) {
2706
1.11k
        return;
2707
1.11k
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
45.1k
#if 1
2711
45.1k
    {
2712
45.1k
        std::set<uint64_t> moduleIDs;
2713
68.0k
        for (const auto& m : modules ) {
2714
68.0k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
68.0k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
68.0k
            moduleIDs.insert(moduleID);
2722
68.0k
        }
2723
2724
45.1k
        std::set<uint64_t> operationModuleIDs;
2725
85.6k
        for (const auto& op : operations) {
2726
85.6k
            operationModuleIDs.insert(op.first->ID);
2727
85.6k
        }
2728
2729
45.1k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
45.1k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
45.1k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
45.1k
        for (const auto& id : addModuleIDs) {
2734
32.6k
            operations.push_back({ modules.at(id), operations[0].second});
2735
32.6k
        }
2736
45.1k
    }
2737
45.1k
#endif
2738
2739
45.1k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
45.1k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
163k
    for (size_t i = 0; i < operations.size(); i++) {
2747
118k
        auto& operation = operations[i];
2748
2749
118k
        auto& module = operation.first;
2750
118k
        auto& op = operation.second;
2751
2752
118k
        if ( i > 0 ) {
2753
84.2k
            auto& prevModule = operations[i-1].first;
2754
84.2k
            auto& prevOp = operations[i].second;
2755
2756
84.2k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
49.0k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
49.0k
                if ( curModifier.size() == 0 ) {
2759
20.0M
                    for (size_t j = 0; j < 512; j++) {
2760
19.9M
                        curModifier.push_back(1);
2761
19.9M
                    }
2762
39.0k
                } else {
2763
168k
                    for (auto& c : curModifier) {
2764
168k
                        c++;
2765
168k
                    }
2766
10.0k
                }
2767
49.0k
            }
2768
84.2k
        }
2769
2770
118k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
118k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
118k
        const auto& result = results.back();
2777
2778
118k
        if ( result.second != std::nullopt ) {
2779
36.7k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
36.7k
        }
2786
2787
118k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
118k
        if ( options.disableTests == false ) {
2796
118k
            tests::test(op, result.second);
2797
118k
        }
2798
2799
118k
        postprocess(module, op, result);
2800
118k
    }
2801
2802
45.1k
    if ( options.noCompare == false ) {
2803
34.0k
        compare(operations, results, data, size);
2804
34.0k
    }
2805
45.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
2.23k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
2.23k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
2.23k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
7.13k
    do {
2691
7.13k
        auto op = getOp(&parentDs, data, size);
2692
7.13k
        auto module = getModule(parentDs);
2693
7.13k
        if ( module == nullptr ) {
2694
2.23k
            continue;
2695
2.23k
        }
2696
2697
4.90k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
4.90k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
7.12k
    } while ( parentDs.Get<bool>() == true );
2704
2705
2.23k
    if ( operations.empty() == true ) {
2706
30
        return;
2707
30
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
2.20k
#if 1
2711
2.20k
    {
2712
2.20k
        std::set<uint64_t> moduleIDs;
2713
4.03k
        for (const auto& m : modules ) {
2714
4.03k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
4.03k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
4.03k
            moduleIDs.insert(moduleID);
2722
4.03k
        }
2723
2724
2.20k
        std::set<uint64_t> operationModuleIDs;
2725
4.61k
        for (const auto& op : operations) {
2726
4.61k
            operationModuleIDs.insert(op.first->ID);
2727
4.61k
        }
2728
2729
2.20k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
2.20k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
2.20k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
2.20k
        for (const auto& id : addModuleIDs) {
2734
1.98k
            operations.push_back({ modules.at(id), operations[0].second});
2735
1.98k
        }
2736
2.20k
    }
2737
2.20k
#endif
2738
2739
2.20k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
2.20k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
8.80k
    for (size_t i = 0; i < operations.size(); i++) {
2747
6.60k
        auto& operation = operations[i];
2748
2749
6.60k
        auto& module = operation.first;
2750
6.60k
        auto& op = operation.second;
2751
2752
6.60k
        if ( i > 0 ) {
2753
4.59k
            auto& prevModule = operations[i-1].first;
2754
4.59k
            auto& prevOp = operations[i].second;
2755
2756
4.59k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
2.53k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
2.53k
                if ( curModifier.size() == 0 ) {
2759
1.13M
                    for (size_t j = 0; j < 512; j++) {
2760
1.13M
                        curModifier.push_back(1);
2761
1.13M
                    }
2762
2.22k
                } else {
2763
1.24k
                    for (auto& c : curModifier) {
2764
1.24k
                        c++;
2765
1.24k
                    }
2766
315
                }
2767
2.53k
            }
2768
4.59k
        }
2769
2770
6.60k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
6.60k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
6.60k
        const auto& result = results.back();
2777
2778
6.60k
        if ( result.second != std::nullopt ) {
2779
3.49k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
3.49k
        }
2786
2787
6.60k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
6.60k
        if ( options.disableTests == false ) {
2796
6.60k
            tests::test(op, result.second);
2797
6.60k
        }
2798
2799
6.60k
        postprocess(module, op, result);
2800
6.60k
    }
2801
2802
2.20k
    if ( options.noCompare == false ) {
2803
2.01k
        compare(operations, results, data, size);
2804
2.01k
    }
2805
2.20k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
1.38k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
1.38k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
1.38k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
6.09k
    do {
2691
6.09k
        auto op = getOp(&parentDs, data, size);
2692
6.09k
        auto module = getModule(parentDs);
2693
6.09k
        if ( module == nullptr ) {
2694
2.95k
            continue;
2695
2.95k
        }
2696
2697
3.14k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
3.14k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
6.09k
    } while ( parentDs.Get<bool>() == true );
2704
2705
1.38k
    if ( operations.empty() == true ) {
2706
36
        return;
2707
36
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
1.34k
#if 1
2711
1.34k
    {
2712
1.34k
        std::set<uint64_t> moduleIDs;
2713
2.42k
        for (const auto& m : modules ) {
2714
2.42k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
2.42k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
2.42k
            moduleIDs.insert(moduleID);
2722
2.42k
        }
2723
2724
1.34k
        std::set<uint64_t> operationModuleIDs;
2725
2.86k
        for (const auto& op : operations) {
2726
2.86k
            operationModuleIDs.insert(op.first->ID);
2727
2.86k
        }
2728
2729
1.34k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
1.34k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
1.34k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
1.34k
        for (const auto& id : addModuleIDs) {
2734
1.17k
            operations.push_back({ modules.at(id), operations[0].second});
2735
1.17k
        }
2736
1.34k
    }
2737
1.34k
#endif
2738
2739
1.34k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
1.34k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
5.38k
    for (size_t i = 0; i < operations.size(); i++) {
2747
4.04k
        auto& operation = operations[i];
2748
2749
4.04k
        auto& module = operation.first;
2750
4.04k
        auto& op = operation.second;
2751
2752
4.04k
        if ( i > 0 ) {
2753
2.83k
            auto& prevModule = operations[i-1].first;
2754
2.83k
            auto& prevOp = operations[i].second;
2755
2756
2.83k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
1.56k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
1.56k
                if ( curModifier.size() == 0 ) {
2759
673k
                    for (size_t j = 0; j < 512; j++) {
2760
671k
                        curModifier.push_back(1);
2761
671k
                    }
2762
1.31k
                } else {
2763
670
                    for (auto& c : curModifier) {
2764
670
                        c++;
2765
670
                    }
2766
254
                }
2767
1.56k
            }
2768
2.83k
        }
2769
2770
4.04k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
4.04k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
4.04k
        const auto& result = results.back();
2777
2778
4.04k
        if ( result.second != std::nullopt ) {
2779
1.41k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
1.41k
        }
2786
2787
4.04k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
4.04k
        if ( options.disableTests == false ) {
2796
4.04k
            tests::test(op, result.second);
2797
4.04k
        }
2798
2799
4.04k
        postprocess(module, op, result);
2800
4.04k
    }
2801
2802
1.34k
    if ( options.noCompare == false ) {
2803
1.21k
        compare(operations, results, data, size);
2804
1.21k
    }
2805
1.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
772
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
772
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
772
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
5.85k
    do {
2691
5.85k
        auto op = getOp(&parentDs, data, size);
2692
5.85k
        auto module = getModule(parentDs);
2693
5.85k
        if ( module == nullptr ) {
2694
2.15k
            continue;
2695
2.15k
        }
2696
2697
3.70k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
3.70k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
3
            break;
2702
3
        }
2703
5.85k
    } while ( parentDs.Get<bool>() == true );
2704
2705
772
    if ( operations.empty() == true ) {
2706
10
        return;
2707
10
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
762
#if 1
2711
762
    {
2712
762
        std::set<uint64_t> moduleIDs;
2713
1.29k
        for (const auto& m : modules ) {
2714
1.29k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.29k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.29k
            moduleIDs.insert(moduleID);
2722
1.29k
        }
2723
2724
762
        std::set<uint64_t> operationModuleIDs;
2725
3.31k
        for (const auto& op : operations) {
2726
3.31k
            operationModuleIDs.insert(op.first->ID);
2727
3.31k
        }
2728
2729
762
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
762
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
762
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
762
        for (const auto& id : addModuleIDs) {
2734
618
            operations.push_back({ modules.at(id), operations[0].second});
2735
618
        }
2736
762
    }
2737
762
#endif
2738
2739
762
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
762
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
4.69k
    for (size_t i = 0; i < operations.size(); i++) {
2747
3.93k
        auto& operation = operations[i];
2748
2749
3.93k
        auto& module = operation.first;
2750
3.93k
        auto& op = operation.second;
2751
2752
3.93k
        if ( i > 0 ) {
2753
3.28k
            auto& prevModule = operations[i-1].first;
2754
3.28k
            auto& prevOp = operations[i].second;
2755
2756
3.28k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
2.61k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
2.61k
                if ( curModifier.size() == 0 ) {
2759
1.21M
                    for (size_t j = 0; j < 512; j++) {
2760
1.21M
                        curModifier.push_back(1);
2761
1.21M
                    }
2762
2.36k
                } else {
2763
680
                    for (auto& c : curModifier) {
2764
680
                        c++;
2765
680
                    }
2766
247
                }
2767
2.61k
            }
2768
3.28k
        }
2769
2770
3.93k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
3.93k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
3.93k
        const auto& result = results.back();
2777
2778
3.93k
        if ( result.second != std::nullopt ) {
2779
1.97k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
1.97k
        }
2786
2787
3.93k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
3.93k
        if ( options.disableTests == false ) {
2796
3.93k
            tests::test(op, result.second);
2797
3.93k
        }
2798
2799
3.93k
        postprocess(module, op, result);
2800
3.93k
    }
2801
2802
762
    if ( options.noCompare == false ) {
2803
645
        compare(operations, results, data, size);
2804
645
    }
2805
762
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
1.28k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
1.28k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
1.28k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
6.40k
    do {
2691
6.40k
        auto op = getOp(&parentDs, data, size);
2692
6.40k
        auto module = getModule(parentDs);
2693
6.40k
        if ( module == nullptr ) {
2694
2.35k
            continue;
2695
2.35k
        }
2696
2697
4.05k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
4.05k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
3
            break;
2702
3
        }
2703
6.40k
    } while ( parentDs.Get<bool>() == true );
2704
2705
1.28k
    if ( operations.empty() == true ) {
2706
12
        return;
2707
12
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
1.26k
#if 1
2711
1.26k
    {
2712
1.26k
        std::set<uint64_t> moduleIDs;
2713
2.30k
        for (const auto& m : modules ) {
2714
2.30k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
2.30k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
2.30k
            moduleIDs.insert(moduleID);
2722
2.30k
        }
2723
2724
1.26k
        std::set<uint64_t> operationModuleIDs;
2725
3.75k
        for (const auto& op : operations) {
2726
3.75k
            operationModuleIDs.insert(op.first->ID);
2727
3.75k
        }
2728
2729
1.26k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
1.26k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
1.26k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
1.26k
        for (const auto& id : addModuleIDs) {
2734
1.13k
            operations.push_back({ modules.at(id), operations[0].second});
2735
1.13k
        }
2736
1.26k
    }
2737
1.26k
#endif
2738
2739
1.26k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
1.26k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
6.15k
    for (size_t i = 0; i < operations.size(); i++) {
2747
4.88k
        auto& operation = operations[i];
2748
2749
4.88k
        auto& module = operation.first;
2750
4.88k
        auto& op = operation.second;
2751
2752
4.88k
        if ( i > 0 ) {
2753
3.72k
            auto& prevModule = operations[i-1].first;
2754
3.72k
            auto& prevOp = operations[i].second;
2755
2756
3.72k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
2.54k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
2.54k
                if ( curModifier.size() == 0 ) {
2759
1.10M
                    for (size_t j = 0; j < 512; j++) {
2760
1.10M
                        curModifier.push_back(1);
2761
1.10M
                    }
2762
2.16k
                } else {
2763
901
                    for (auto& c : curModifier) {
2764
901
                        c++;
2765
901
                    }
2766
387
                }
2767
2.54k
            }
2768
3.72k
        }
2769
2770
4.88k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
4.88k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
4.88k
        const auto& result = results.back();
2777
2778
4.88k
        if ( result.second != std::nullopt ) {
2779
2.12k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
2.12k
        }
2786
2787
4.88k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
4.88k
        if ( options.disableTests == false ) {
2796
4.88k
            tests::test(op, result.second);
2797
4.88k
        }
2798
2799
4.88k
        postprocess(module, op, result);
2800
4.88k
    }
2801
2802
1.26k
    if ( options.noCompare == false ) {
2803
1.15k
        compare(operations, results, data, size);
2804
1.15k
    }
2805
1.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
5.17k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
5.17k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
5.17k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
23.4k
    do {
2691
23.4k
        auto op = getOp(&parentDs, data, size);
2692
23.4k
        auto module = getModule(parentDs);
2693
23.4k
        if ( module == nullptr ) {
2694
5.24k
            continue;
2695
5.24k
        }
2696
2697
18.2k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
18.2k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
23.4k
    } while ( parentDs.Get<bool>() == true );
2704
2705
5.17k
    if ( operations.empty() == true ) {
2706
30
        return;
2707
30
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
5.14k
#if 1
2711
5.14k
    {
2712
5.14k
        std::set<uint64_t> moduleIDs;
2713
10.0k
        for (const auto& m : modules ) {
2714
10.0k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
10.0k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
10.0k
            moduleIDs.insert(moduleID);
2722
10.0k
        }
2723
2724
5.14k
        std::set<uint64_t> operationModuleIDs;
2725
17.6k
        for (const auto& op : operations) {
2726
17.6k
            operationModuleIDs.insert(op.first->ID);
2727
17.6k
        }
2728
2729
5.14k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
5.14k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
5.14k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
5.14k
        for (const auto& id : addModuleIDs) {
2734
4.96k
            operations.push_back({ modules.at(id), operations[0].second});
2735
4.96k
        }
2736
5.14k
    }
2737
5.14k
#endif
2738
2739
5.14k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
5.14k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
27.7k
    for (size_t i = 0; i < operations.size(); i++) {
2747
22.6k
        auto& operation = operations[i];
2748
2749
22.6k
        auto& module = operation.first;
2750
22.6k
        auto& op = operation.second;
2751
2752
22.6k
        if ( i > 0 ) {
2753
17.6k
            auto& prevModule = operations[i-1].first;
2754
17.6k
            auto& prevOp = operations[i].second;
2755
2756
17.6k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
12.5k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
12.5k
                if ( curModifier.size() == 0 ) {
2759
5.50M
                    for (size_t j = 0; j < 512; j++) {
2760
5.49M
                        curModifier.push_back(1);
2761
5.49M
                    }
2762
10.7k
                } else {
2763
15.5k
                    for (auto& c : curModifier) {
2764
15.5k
                        c++;
2765
15.5k
                    }
2766
1.85k
                }
2767
12.5k
            }
2768
17.6k
        }
2769
2770
22.6k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
22.6k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
22.6k
        const auto& result = results.back();
2777
2778
22.6k
        if ( result.second != std::nullopt ) {
2779
8.49k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
8.49k
        }
2786
2787
22.6k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
22.6k
        if ( options.disableTests == false ) {
2796
22.6k
            tests::test(op, result.second);
2797
22.6k
        }
2798
2799
22.6k
        postprocess(module, op, result);
2800
22.6k
    }
2801
2802
5.14k
    if ( options.noCompare == false ) {
2803
5.01k
        compare(operations, results, data, size);
2804
5.01k
    }
2805
5.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
2.45k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
2.45k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
2.45k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
14.0k
    do {
2691
14.0k
        auto op = getOp(&parentDs, data, size);
2692
14.0k
        auto module = getModule(parentDs);
2693
14.0k
        if ( module == nullptr ) {
2694
3.12k
            continue;
2695
3.12k
        }
2696
2697
10.8k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
10.8k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
3
            break;
2702
3
        }
2703
14.0k
    } while ( parentDs.Get<bool>() == true );
2704
2705
2.45k
    if ( operations.empty() == true ) {
2706
25
        return;
2707
25
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
2.43k
#if 1
2711
2.43k
    {
2712
2.43k
        std::set<uint64_t> moduleIDs;
2713
4.58k
        for (const auto& m : modules ) {
2714
4.58k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
4.58k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
4.58k
            moduleIDs.insert(moduleID);
2722
4.58k
        }
2723
2724
2.43k
        std::set<uint64_t> operationModuleIDs;
2725
10.4k
        for (const auto& op : operations) {
2726
10.4k
            operationModuleIDs.insert(op.first->ID);
2727
10.4k
        }
2728
2729
2.43k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
2.43k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
2.43k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
2.43k
        for (const auto& id : addModuleIDs) {
2734
2.24k
            operations.push_back({ modules.at(id), operations[0].second});
2735
2.24k
        }
2736
2.43k
    }
2737
2.43k
#endif
2738
2739
2.43k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
2.43k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
15.1k
    for (size_t i = 0; i < operations.size(); i++) {
2747
12.7k
        auto& operation = operations[i];
2748
2749
12.7k
        auto& module = operation.first;
2750
12.7k
        auto& op = operation.second;
2751
2752
12.7k
        if ( i > 0 ) {
2753
10.4k
            auto& prevModule = operations[i-1].first;
2754
10.4k
            auto& prevOp = operations[i].second;
2755
2756
10.4k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
8.05k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
8.05k
                if ( curModifier.size() == 0 ) {
2759
3.33M
                    for (size_t j = 0; j < 512; j++) {
2760
3.32M
                        curModifier.push_back(1);
2761
3.32M
                    }
2762
6.50k
                } else {
2763
16.0k
                    for (auto& c : curModifier) {
2764
16.0k
                        c++;
2765
16.0k
                    }
2766
1.55k
                }
2767
8.05k
            }
2768
10.4k
        }
2769
2770
12.7k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
12.7k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
12.7k
        const auto& result = results.back();
2777
2778
12.7k
        if ( result.second != std::nullopt ) {
2779
1.68k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
1.68k
        }
2786
2787
12.7k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
12.7k
        if ( options.disableTests == false ) {
2796
12.7k
            tests::test(op, result.second);
2797
12.7k
        }
2798
2799
12.7k
        postprocess(module, op, result);
2800
12.7k
    }
2801
2802
2.43k
    if ( options.noCompare == false ) {
2803
2.29k
        compare(operations, results, data, size);
2804
2.29k
    }
2805
2.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
302
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
302
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
302
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.56k
    do {
2691
3.56k
        auto op = getOp(&parentDs, data, size);
2692
3.56k
        auto module = getModule(parentDs);
2693
3.56k
        if ( module == nullptr ) {
2694
2.34k
            continue;
2695
2.34k
        }
2696
2697
1.22k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
1.22k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
3.56k
    } while ( parentDs.Get<bool>() == true );
2704
2705
302
    if ( operations.empty() == true ) {
2706
36
        return;
2707
36
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
266
#if 1
2711
266
    {
2712
266
        std::set<uint64_t> moduleIDs;
2713
296
        for (const auto& m : modules ) {
2714
296
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
296
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
296
            moduleIDs.insert(moduleID);
2722
296
        }
2723
2724
266
        std::set<uint64_t> operationModuleIDs;
2725
904
        for (const auto& op : operations) {
2726
904
            operationModuleIDs.insert(op.first->ID);
2727
904
        }
2728
2729
266
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
266
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
266
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
266
        for (const auto& id : addModuleIDs) {
2734
124
            operations.push_back({ modules.at(id), operations[0].second});
2735
124
        }
2736
266
    }
2737
266
#endif
2738
2739
266
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
266
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
1.29k
    for (size_t i = 0; i < operations.size(); i++) {
2747
1.02k
        auto& operation = operations[i];
2748
2749
1.02k
        auto& module = operation.first;
2750
1.02k
        auto& op = operation.second;
2751
2752
1.02k
        if ( i > 0 ) {
2753
880
            auto& prevModule = operations[i-1].first;
2754
880
            auto& prevOp = operations[i].second;
2755
2756
880
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
703
                auto& curModifier = op.modifier.GetVectorPtr();
2758
703
                if ( curModifier.size() == 0 ) {
2759
292k
                    for (size_t j = 0; j < 512; j++) {
2760
292k
                        curModifier.push_back(1);
2761
292k
                    }
2762
571
                } else {
2763
363
                    for (auto& c : curModifier) {
2764
363
                        c++;
2765
363
                    }
2766
132
                }
2767
703
            }
2768
880
        }
2769
2770
1.02k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
1.02k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
1.02k
        const auto& result = results.back();
2777
2778
1.02k
        if ( result.second != std::nullopt ) {
2779
308
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
308
        }
2786
2787
1.02k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
1.02k
        if ( options.disableTests == false ) {
2796
1.02k
            tests::test(op, result.second);
2797
1.02k
        }
2798
2799
1.02k
        postprocess(module, op, result);
2800
1.02k
    }
2801
2802
266
    if ( options.noCompare == false ) {
2803
148
        compare(operations, results, data, size);
2804
148
    }
2805
266
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
1.50k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
1.50k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
1.50k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
7.69k
    do {
2691
7.69k
        auto op = getOp(&parentDs, data, size);
2692
7.69k
        auto module = getModule(parentDs);
2693
7.69k
        if ( module == nullptr ) {
2694
3.10k
            continue;
2695
3.10k
        }
2696
2697
4.58k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
4.58k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
4
            break;
2702
4
        }
2703
7.68k
    } while ( parentDs.Get<bool>() == true );
2704
2705
1.50k
    if ( operations.empty() == true ) {
2706
37
        return;
2707
37
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
1.47k
#if 1
2711
1.47k
    {
2712
1.47k
        std::set<uint64_t> moduleIDs;
2713
2.66k
        for (const auto& m : modules ) {
2714
2.66k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
2.66k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
2.66k
            moduleIDs.insert(moduleID);
2722
2.66k
        }
2723
2724
1.47k
        std::set<uint64_t> operationModuleIDs;
2725
4.18k
        for (const auto& op : operations) {
2726
4.18k
            operationModuleIDs.insert(op.first->ID);
2727
4.18k
        }
2728
2729
1.47k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
1.47k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
1.47k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
1.47k
        for (const auto& id : addModuleIDs) {
2734
1.30k
            operations.push_back({ modules.at(id), operations[0].second});
2735
1.30k
        }
2736
1.47k
    }
2737
1.47k
#endif
2738
2739
1.47k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
1.47k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
6.96k
    for (size_t i = 0; i < operations.size(); i++) {
2747
5.49k
        auto& operation = operations[i];
2748
2749
5.49k
        auto& module = operation.first;
2750
5.49k
        auto& op = operation.second;
2751
2752
5.49k
        if ( i > 0 ) {
2753
4.15k
            auto& prevModule = operations[i-1].first;
2754
4.15k
            auto& prevOp = operations[i].second;
2755
2756
4.15k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
2.78k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
2.78k
                if ( curModifier.size() == 0 ) {
2759
1.26M
                    for (size_t j = 0; j < 512; j++) {
2760
1.26M
                        curModifier.push_back(1);
2761
1.26M
                    }
2762
2.46k
                } else {
2763
704
                    for (auto& c : curModifier) {
2764
704
                        c++;
2765
704
                    }
2766
322
                }
2767
2.78k
            }
2768
4.15k
        }
2769
2770
5.49k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
5.49k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
5.49k
        const auto& result = results.back();
2777
2778
5.49k
        if ( result.second != std::nullopt ) {
2779
3.16k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
3.16k
        }
2786
2787
5.49k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
5.49k
        if ( options.disableTests == false ) {
2796
5.49k
            tests::test(op, result.second);
2797
5.49k
        }
2798
2799
5.49k
        postprocess(module, op, result);
2800
5.49k
    }
2801
2802
1.47k
    if ( options.noCompare == false ) {
2803
1.33k
        compare(operations, results, data, size);
2804
1.33k
    }
2805
1.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
278
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
278
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
278
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.33k
    do {
2691
3.33k
        auto op = getOp(&parentDs, data, size);
2692
3.33k
        auto module = getModule(parentDs);
2693
3.33k
        if ( module == nullptr ) {
2694
2.40k
            continue;
2695
2.40k
        }
2696
2697
928
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
928
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
3.33k
    } while ( parentDs.Get<bool>() == true );
2704
2705
278
    if ( operations.empty() == true ) {
2706
34
        return;
2707
34
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
244
#if 1
2711
244
    {
2712
244
        std::set<uint64_t> moduleIDs;
2713
244
        for (const auto& m : modules ) {
2714
244
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
244
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
244
            moduleIDs.insert(moduleID);
2722
244
        }
2723
2724
244
        std::set<uint64_t> operationModuleIDs;
2725
624
        for (const auto& op : operations) {
2726
624
            operationModuleIDs.insert(op.first->ID);
2727
624
        }
2728
2729
244
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
244
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
244
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
244
        for (const auto& id : addModuleIDs) {
2734
99
            operations.push_back({ modules.at(id), operations[0].second});
2735
99
        }
2736
244
    }
2737
244
#endif
2738
2739
244
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
244
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
967
    for (size_t i = 0; i < operations.size(); i++) {
2747
723
        auto& operation = operations[i];
2748
2749
723
        auto& module = operation.first;
2750
723
        auto& op = operation.second;
2751
2752
723
        if ( i > 0 ) {
2753
601
            auto& prevModule = operations[i-1].first;
2754
601
            auto& prevOp = operations[i].second;
2755
2756
601
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
440
                auto& curModifier = op.modifier.GetVectorPtr();
2758
440
                if ( curModifier.size() == 0 ) {
2759
172k
                    for (size_t j = 0; j < 512; j++) {
2760
172k
                        curModifier.push_back(1);
2761
172k
                    }
2762
336
                } else {
2763
427
                    for (auto& c : curModifier) {
2764
427
                        c++;
2765
427
                    }
2766
104
                }
2767
440
            }
2768
601
        }
2769
2770
723
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
723
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
723
        const auto& result = results.back();
2777
2778
723
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
723
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
723
        if ( options.disableTests == false ) {
2796
723
            tests::test(op, result.second);
2797
723
        }
2798
2799
723
        postprocess(module, op, result);
2800
723
    }
2801
2802
244
    if ( options.noCompare == false ) {
2803
122
        compare(operations, results, data, size);
2804
122
    }
2805
244
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
210
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
210
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
210
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.73k
    do {
2691
3.73k
        auto op = getOp(&parentDs, data, size);
2692
3.73k
        auto module = getModule(parentDs);
2693
3.73k
        if ( module == nullptr ) {
2694
2.87k
            continue;
2695
2.87k
        }
2696
2697
858
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
858
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
3
            break;
2702
3
        }
2703
3.72k
    } while ( parentDs.Get<bool>() == true );
2704
2705
210
    if ( operations.empty() == true ) {
2706
21
        return;
2707
21
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
189
#if 1
2711
189
    {
2712
189
        std::set<uint64_t> moduleIDs;
2713
189
        for (const auto& m : modules ) {
2714
172
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
172
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
172
            moduleIDs.insert(moduleID);
2722
172
        }
2723
2724
189
        std::set<uint64_t> operationModuleIDs;
2725
564
        for (const auto& op : operations) {
2726
564
            operationModuleIDs.insert(op.first->ID);
2727
564
        }
2728
2729
189
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
189
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
189
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
189
        for (const auto& id : addModuleIDs) {
2734
60
            operations.push_back({ modules.at(id), operations[0].second});
2735
60
        }
2736
189
    }
2737
189
#endif
2738
2739
189
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
189
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
813
    for (size_t i = 0; i < operations.size(); i++) {
2747
624
        auto& operation = operations[i];
2748
2749
624
        auto& module = operation.first;
2750
624
        auto& op = operation.second;
2751
2752
624
        if ( i > 0 ) {
2753
538
            auto& prevModule = operations[i-1].first;
2754
538
            auto& prevOp = operations[i].second;
2755
2756
538
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
408
                auto& curModifier = op.modifier.GetVectorPtr();
2758
408
                if ( curModifier.size() == 0 ) {
2759
158k
                    for (size_t j = 0; j < 512; j++) {
2760
158k
                        curModifier.push_back(1);
2761
158k
                    }
2762
309
                } else {
2763
634
                    for (auto& c : curModifier) {
2764
634
                        c++;
2765
634
                    }
2766
99
                }
2767
408
            }
2768
538
        }
2769
2770
624
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
624
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
624
        const auto& result = results.back();
2777
2778
624
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
624
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
624
        if ( options.disableTests == false ) {
2796
624
            tests::test(op, result.second);
2797
624
        }
2798
2799
624
        postprocess(module, op, result);
2800
624
    }
2801
2802
189
    if ( options.noCompare == false ) {
2803
86
        compare(operations, results, data, size);
2804
86
    }
2805
189
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
290
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
290
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
290
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.58k
    do {
2691
3.58k
        auto op = getOp(&parentDs, data, size);
2692
3.58k
        auto module = getModule(parentDs);
2693
3.58k
        if ( module == nullptr ) {
2694
2.86k
            continue;
2695
2.86k
        }
2696
2697
718
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
718
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
3.57k
    } while ( parentDs.Get<bool>() == true );
2704
2705
290
    if ( operations.empty() == true ) {
2706
46
        return;
2707
46
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
244
#if 1
2711
244
    {
2712
244
        std::set<uint64_t> moduleIDs;
2713
244
        for (const auto& m : modules ) {
2714
154
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
154
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
154
            moduleIDs.insert(moduleID);
2722
154
        }
2723
2724
244
        std::set<uint64_t> operationModuleIDs;
2725
482
        for (const auto& op : operations) {
2726
482
            operationModuleIDs.insert(op.first->ID);
2727
482
        }
2728
2729
244
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
244
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
244
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
244
        for (const auto& id : addModuleIDs) {
2734
52
            operations.push_back({ modules.at(id), operations[0].second});
2735
52
        }
2736
244
    }
2737
244
#endif
2738
2739
244
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
244
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
778
    for (size_t i = 0; i < operations.size(); i++) {
2747
534
        auto& operation = operations[i];
2748
2749
534
        auto& module = operation.first;
2750
534
        auto& op = operation.second;
2751
2752
534
        if ( i > 0 ) {
2753
457
            auto& prevModule = operations[i-1].first;
2754
457
            auto& prevOp = operations[i].second;
2755
2756
457
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
345
                auto& curModifier = op.modifier.GetVectorPtr();
2758
345
                if ( curModifier.size() == 0 ) {
2759
138k
                    for (size_t j = 0; j < 512; j++) {
2760
138k
                        curModifier.push_back(1);
2761
138k
                    }
2762
270
                } else {
2763
388
                    for (auto& c : curModifier) {
2764
388
                        c++;
2765
388
                    }
2766
75
                }
2767
345
            }
2768
457
        }
2769
2770
534
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
534
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
534
        const auto& result = results.back();
2777
2778
534
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
534
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
534
        if ( options.disableTests == false ) {
2796
534
            tests::test(op, result.second);
2797
534
        }
2798
2799
534
        postprocess(module, op, result);
2800
534
    }
2801
2802
244
    if ( options.noCompare == false ) {
2803
77
        compare(operations, results, data, size);
2804
77
    }
2805
244
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
857
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
857
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
857
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
4.60k
    do {
2691
4.60k
        auto op = getOp(&parentDs, data, size);
2692
4.60k
        auto module = getModule(parentDs);
2693
4.60k
        if ( module == nullptr ) {
2694
2.45k
            continue;
2695
2.45k
        }
2696
2697
2.15k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
2.15k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
3
            break;
2702
3
        }
2703
4.59k
    } while ( parentDs.Get<bool>() == true );
2704
2705
857
    if ( operations.empty() == true ) {
2706
21
        return;
2707
21
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
836
#if 1
2711
836
    {
2712
836
        std::set<uint64_t> moduleIDs;
2713
1.45k
        for (const auto& m : modules ) {
2714
1.45k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.45k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.45k
            moduleIDs.insert(moduleID);
2722
1.45k
        }
2723
2724
836
        std::set<uint64_t> operationModuleIDs;
2725
1.87k
        for (const auto& op : operations) {
2726
1.87k
            operationModuleIDs.insert(op.first->ID);
2727
1.87k
        }
2728
2729
836
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
836
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
836
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
836
        for (const auto& id : addModuleIDs) {
2734
699
            operations.push_back({ modules.at(id), operations[0].second});
2735
699
        }
2736
836
    }
2737
836
#endif
2738
2739
836
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
836
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
3.41k
    for (size_t i = 0; i < operations.size(); i++) {
2747
2.57k
        auto& operation = operations[i];
2748
2749
2.57k
        auto& module = operation.first;
2750
2.57k
        auto& op = operation.second;
2751
2752
2.57k
        if ( i > 0 ) {
2753
1.85k
            auto& prevModule = operations[i-1].first;
2754
1.85k
            auto& prevOp = operations[i].second;
2755
2756
1.85k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
1.09k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
1.09k
                if ( curModifier.size() == 0 ) {
2759
462k
                    for (size_t j = 0; j < 512; j++) {
2760
461k
                        curModifier.push_back(1);
2761
461k
                    }
2762
901
                } else {
2763
557
                    for (auto& c : curModifier) {
2764
557
                        c++;
2765
557
                    }
2766
189
                }
2767
1.09k
            }
2768
1.85k
        }
2769
2770
2.57k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
2.57k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
2.57k
        const auto& result = results.back();
2777
2778
2.57k
        if ( result.second != std::nullopt ) {
2779
857
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
857
        }
2786
2787
2.57k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
2.57k
        if ( options.disableTests == false ) {
2796
2.57k
            tests::test(op, result.second);
2797
2.57k
        }
2798
2799
2.57k
        postprocess(module, op, result);
2800
2.57k
    }
2801
2802
836
    if ( options.noCompare == false ) {
2803
725
        compare(operations, results, data, size);
2804
725
    }
2805
836
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
496
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
496
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
496
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.96k
    do {
2691
3.96k
        auto op = getOp(&parentDs, data, size);
2692
3.96k
        auto module = getModule(parentDs);
2693
3.96k
        if ( module == nullptr ) {
2694
3.29k
            continue;
2695
3.29k
        }
2696
2697
668
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
668
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
77
            break;
2702
77
        }
2703
3.88k
    } while ( parentDs.Get<bool>() == true );
2704
2705
496
    if ( operations.empty() == true ) {
2706
20
        return;
2707
20
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
476
#if 1
2711
476
    {
2712
476
        std::set<uint64_t> moduleIDs;
2713
714
        for (const auto& m : modules ) {
2714
714
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
714
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
714
            moduleIDs.insert(moduleID);
2722
714
        }
2723
2724
476
        std::set<uint64_t> operationModuleIDs;
2725
544
        for (const auto& op : operations) {
2726
544
            operationModuleIDs.insert(op.first->ID);
2727
544
        }
2728
2729
476
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
476
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
476
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
476
        for (const auto& id : addModuleIDs) {
2734
348
            operations.push_back({ modules.at(id), operations[0].second});
2735
348
        }
2736
476
    }
2737
476
#endif
2738
2739
476
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
476
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
1.36k
    for (size_t i = 0; i < operations.size(); i++) {
2747
892
        auto& operation = operations[i];
2748
2749
892
        auto& module = operation.first;
2750
892
        auto& op = operation.second;
2751
2752
892
        if ( i > 0 ) {
2753
535
            auto& prevModule = operations[i-1].first;
2754
535
            auto& prevOp = operations[i].second;
2755
2756
535
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
177
                auto& curModifier = op.modifier.GetVectorPtr();
2758
177
                if ( curModifier.size() == 0 ) {
2759
74.8k
                    for (size_t j = 0; j < 512; j++) {
2760
74.7k
                        curModifier.push_back(1);
2761
74.7k
                    }
2762
146
                } else {
2763
328
                    for (auto& c : curModifier) {
2764
328
                        c++;
2765
328
                    }
2766
31
                }
2767
177
            }
2768
535
        }
2769
2770
892
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
892
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
892
        const auto& result = results.back();
2777
2778
892
        if ( result.second != std::nullopt ) {
2779
411
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
411
        }
2786
2787
892
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
892
        if ( options.disableTests == false ) {
2796
892
            tests::test(op, result.second);
2797
892
        }
2798
2799
892
        postprocess(module, op, result);
2800
892
    }
2801
2802
476
    if ( options.noCompare == false ) {
2803
357
        compare(operations, results, data, size);
2804
357
    }
2805
476
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
230
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
230
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
230
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.93k
    do {
2691
3.93k
        auto op = getOp(&parentDs, data, size);
2692
3.93k
        auto module = getModule(parentDs);
2693
3.93k
        if ( module == nullptr ) {
2694
2.97k
            continue;
2695
2.97k
        }
2696
2697
960
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
960
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
3.93k
    } while ( parentDs.Get<bool>() == true );
2704
2705
230
    if ( operations.empty() == true ) {
2706
12
        return;
2707
12
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
218
#if 1
2711
218
    {
2712
218
        std::set<uint64_t> moduleIDs;
2713
218
        for (const auto& m : modules ) {
2714
170
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
170
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
170
            moduleIDs.insert(moduleID);
2722
170
        }
2723
2724
218
        std::set<uint64_t> operationModuleIDs;
2725
575
        for (const auto& op : operations) {
2726
575
            operationModuleIDs.insert(op.first->ID);
2727
575
        }
2728
2729
218
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
218
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
218
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
218
        for (const auto& id : addModuleIDs) {
2734
55
            operations.push_back({ modules.at(id), operations[0].second});
2735
55
        }
2736
218
    }
2737
218
#endif
2738
2739
218
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
218
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
848
    for (size_t i = 0; i < operations.size(); i++) {
2747
630
        auto& operation = operations[i];
2748
2749
630
        auto& module = operation.first;
2750
630
        auto& op = operation.second;
2751
2752
630
        if ( i > 0 ) {
2753
545
            auto& prevModule = operations[i-1].first;
2754
545
            auto& prevOp = operations[i].second;
2755
2756
545
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
401
                auto& curModifier = op.modifier.GetVectorPtr();
2758
401
                if ( curModifier.size() == 0 ) {
2759
155k
                    for (size_t j = 0; j < 512; j++) {
2760
155k
                        curModifier.push_back(1);
2761
155k
                    }
2762
304
                } else {
2763
384
                    for (auto& c : curModifier) {
2764
384
                        c++;
2765
384
                    }
2766
97
                }
2767
401
            }
2768
545
        }
2769
2770
630
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
630
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
630
        const auto& result = results.back();
2777
2778
630
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
630
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
630
        if ( options.disableTests == false ) {
2796
630
            tests::test(op, result.second);
2797
630
        }
2798
2799
630
        postprocess(module, op, result);
2800
630
    }
2801
2802
218
    if ( options.noCompare == false ) {
2803
85
        compare(operations, results, data, size);
2804
85
    }
2805
218
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
194
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
194
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
194
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.11k
    do {
2691
3.11k
        auto op = getOp(&parentDs, data, size);
2692
3.11k
        auto module = getModule(parentDs);
2693
3.11k
        if ( module == nullptr ) {
2694
2.18k
            continue;
2695
2.18k
        }
2696
2697
929
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
929
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
3.10k
    } while ( parentDs.Get<bool>() == true );
2704
2705
194
    if ( operations.empty() == true ) {
2706
23
        return;
2707
23
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
171
#if 1
2711
171
    {
2712
171
        std::set<uint64_t> moduleIDs;
2713
171
        for (const auto& m : modules ) {
2714
136
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
136
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
136
            moduleIDs.insert(moduleID);
2722
136
        }
2723
2724
171
        std::set<uint64_t> operationModuleIDs;
2725
509
        for (const auto& op : operations) {
2726
509
            operationModuleIDs.insert(op.first->ID);
2727
509
        }
2728
2729
171
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
171
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
171
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
171
        for (const auto& id : addModuleIDs) {
2734
45
            operations.push_back({ modules.at(id), operations[0].second});
2735
45
        }
2736
171
    }
2737
171
#endif
2738
2739
171
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
171
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
725
    for (size_t i = 0; i < operations.size(); i++) {
2747
554
        auto& operation = operations[i];
2748
2749
554
        auto& module = operation.first;
2750
554
        auto& op = operation.second;
2751
2752
554
        if ( i > 0 ) {
2753
486
            auto& prevModule = operations[i-1].first;
2754
486
            auto& prevOp = operations[i].second;
2755
2756
486
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
358
                auto& curModifier = op.modifier.GetVectorPtr();
2758
358
                if ( curModifier.size() == 0 ) {
2759
145k
                    for (size_t j = 0; j < 512; j++) {
2760
144k
                        curModifier.push_back(1);
2761
144k
                    }
2762
283
                } else {
2763
444
                    for (auto& c : curModifier) {
2764
444
                        c++;
2765
444
                    }
2766
75
                }
2767
358
            }
2768
486
        }
2769
2770
554
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
554
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
554
        const auto& result = results.back();
2777
2778
554
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
554
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
554
        if ( options.disableTests == false ) {
2796
554
            tests::test(op, result.second);
2797
554
        }
2798
2799
554
        postprocess(module, op, result);
2800
554
    }
2801
2802
171
    if ( options.noCompare == false ) {
2803
68
        compare(operations, results, data, size);
2804
68
    }
2805
171
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
203
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
203
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
203
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.78k
    do {
2691
2.78k
        auto op = getOp(&parentDs, data, size);
2692
2.78k
        auto module = getModule(parentDs);
2693
2.78k
        if ( module == nullptr ) {
2694
2.58k
            continue;
2695
2.58k
        }
2696
2697
199
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
199
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
28
            break;
2702
28
        }
2703
2.75k
    } while ( parentDs.Get<bool>() == true );
2704
2705
203
    if ( operations.empty() == true ) {
2706
16
        return;
2707
16
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
187
#if 1
2711
187
    {
2712
187
        std::set<uint64_t> moduleIDs;
2713
187
        for (const auto& m : modules ) {
2714
172
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
172
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
172
            moduleIDs.insert(moduleID);
2722
172
        }
2723
2724
187
        std::set<uint64_t> operationModuleIDs;
2725
187
        for (const auto& op : operations) {
2726
114
            operationModuleIDs.insert(op.first->ID);
2727
114
        }
2728
2729
187
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
187
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
187
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
187
        for (const auto& id : addModuleIDs) {
2734
83
            operations.push_back({ modules.at(id), operations[0].second});
2735
83
        }
2736
187
    }
2737
187
#endif
2738
2739
187
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
187
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
384
    for (size_t i = 0; i < operations.size(); i++) {
2747
197
        auto& operation = operations[i];
2748
2749
197
        auto& module = operation.first;
2750
197
        auto& op = operation.second;
2751
2752
197
        if ( i > 0 ) {
2753
111
            auto& prevModule = operations[i-1].first;
2754
111
            auto& prevOp = operations[i].second;
2755
2756
111
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
25
                auto& curModifier = op.modifier.GetVectorPtr();
2758
25
                if ( curModifier.size() == 0 ) {
2759
6.15k
                    for (size_t j = 0; j < 512; j++) {
2760
6.14k
                        curModifier.push_back(1);
2761
6.14k
                    }
2762
13
                } else {
2763
239
                    for (auto& c : curModifier) {
2764
239
                        c++;
2765
239
                    }
2766
13
                }
2767
25
            }
2768
111
        }
2769
2770
197
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
197
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
197
        const auto& result = results.back();
2777
2778
197
        if ( result.second != std::nullopt ) {
2779
52
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
52
        }
2786
2787
197
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
197
        if ( options.disableTests == false ) {
2796
197
            tests::test(op, result.second);
2797
197
        }
2798
2799
197
        postprocess(module, op, result);
2800
197
    }
2801
2802
187
    if ( options.noCompare == false ) {
2803
86
        compare(operations, results, data, size);
2804
86
    }
2805
187
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
545
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
545
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
545
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
4.71k
    do {
2691
4.71k
        auto op = getOp(&parentDs, data, size);
2692
4.71k
        auto module = getModule(parentDs);
2693
4.71k
        if ( module == nullptr ) {
2694
2.63k
            continue;
2695
2.63k
        }
2696
2697
2.08k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
2.08k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
4.71k
    } while ( parentDs.Get<bool>() == true );
2704
2705
545
    if ( operations.empty() == true ) {
2706
13
        return;
2707
13
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
532
#if 1
2711
532
    {
2712
532
        std::set<uint64_t> moduleIDs;
2713
798
        for (const auto& m : modules ) {
2714
798
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
798
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
798
            moduleIDs.insert(moduleID);
2722
798
        }
2723
2724
532
        std::set<uint64_t> operationModuleIDs;
2725
1.74k
        for (const auto& op : operations) {
2726
1.74k
            operationModuleIDs.insert(op.first->ID);
2727
1.74k
        }
2728
2729
532
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
532
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
532
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
532
        for (const auto& id : addModuleIDs) {
2734
377
            operations.push_back({ modules.at(id), operations[0].second});
2735
377
        }
2736
532
    }
2737
532
#endif
2738
2739
532
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
532
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
2.65k
    for (size_t i = 0; i < operations.size(); i++) {
2747
2.12k
        auto& operation = operations[i];
2748
2749
2.12k
        auto& module = operation.first;
2750
2.12k
        auto& op = operation.second;
2751
2752
2.12k
        if ( i > 0 ) {
2753
1.72k
            auto& prevModule = operations[i-1].first;
2754
1.72k
            auto& prevOp = operations[i].second;
2755
2756
1.72k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
1.29k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
1.29k
                if ( curModifier.size() == 0 ) {
2759
519k
                    for (size_t j = 0; j < 512; j++) {
2760
518k
                        curModifier.push_back(1);
2761
518k
                    }
2762
1.01k
                } else {
2763
531
                    for (auto& c : curModifier) {
2764
531
                        c++;
2765
531
                    }
2766
280
                }
2767
1.29k
            }
2768
1.72k
        }
2769
2770
2.12k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
2.12k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
2.12k
        const auto& result = results.back();
2777
2778
2.12k
        if ( result.second != std::nullopt ) {
2779
997
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
997
        }
2786
2787
2.12k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
2.12k
        if ( options.disableTests == false ) {
2796
2.12k
            tests::test(op, result.second);
2797
2.12k
        }
2798
2799
2.12k
        postprocess(module, op, result);
2800
2.12k
    }
2801
2802
532
    if ( options.noCompare == false ) {
2803
399
        compare(operations, results, data, size);
2804
399
    }
2805
532
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
1.04k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
1.04k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
1.04k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.95k
    do {
2691
2.95k
        auto op = getOp(&parentDs, data, size);
2692
2.95k
        auto module = getModule(parentDs);
2693
2.95k
        if ( module == nullptr ) {
2694
1.48k
            continue;
2695
1.48k
        }
2696
2697
1.47k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
1.47k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
24
            break;
2702
24
        }
2703
2.93k
    } while ( parentDs.Get<bool>() == true );
2704
2705
1.04k
    if ( operations.empty() == true ) {
2706
20
        return;
2707
20
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
1.02k
#if 1
2711
1.02k
    {
2712
1.02k
        std::set<uint64_t> moduleIDs;
2713
1.87k
        for (const auto& m : modules ) {
2714
1.87k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.87k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.87k
            moduleIDs.insert(moduleID);
2722
1.87k
        }
2723
2724
1.02k
        std::set<uint64_t> operationModuleIDs;
2725
1.37k
        for (const auto& op : operations) {
2726
1.37k
            operationModuleIDs.insert(op.first->ID);
2727
1.37k
        }
2728
2729
1.02k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
1.02k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
1.02k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
1.02k
        for (const auto& id : addModuleIDs) {
2734
922
            operations.push_back({ modules.at(id), operations[0].second});
2735
922
        }
2736
1.02k
    }
2737
1.02k
#endif
2738
2739
1.02k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
1.02k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
3.32k
    for (size_t i = 0; i < operations.size(); i++) {
2747
2.29k
        auto& operation = operations[i];
2748
2749
2.29k
        auto& module = operation.first;
2750
2.29k
        auto& op = operation.second;
2751
2752
2.29k
        if ( i > 0 ) {
2753
1.36k
            auto& prevModule = operations[i-1].first;
2754
1.36k
            auto& prevOp = operations[i].second;
2755
2756
1.36k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
417
                auto& curModifier = op.modifier.GetVectorPtr();
2758
417
                if ( curModifier.size() == 0 ) {
2759
162k
                    for (size_t j = 0; j < 512; j++) {
2760
161k
                        curModifier.push_back(1);
2761
161k
                    }
2762
316
                } else {
2763
1.28k
                    for (auto& c : curModifier) {
2764
1.28k
                        c++;
2765
1.28k
                    }
2766
101
                }
2767
417
            }
2768
1.36k
        }
2769
2770
2.29k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
2.29k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
2.29k
        const auto& result = results.back();
2777
2778
2.29k
        if ( result.second != std::nullopt ) {
2779
977
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
977
        }
2786
2787
2.29k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
2.29k
        if ( options.disableTests == false ) {
2796
2.29k
            tests::test(op, result.second);
2797
2.29k
        }
2798
2799
2.29k
        postprocess(module, op, result);
2800
2.29k
    }
2801
2802
1.02k
    if ( options.noCompare == false ) {
2803
936
        compare(operations, results, data, size);
2804
936
    }
2805
1.02k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
1.04k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
1.04k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
1.04k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.97k
    do {
2691
2.97k
        auto op = getOp(&parentDs, data, size);
2692
2.97k
        auto module = getModule(parentDs);
2693
2.97k
        if ( module == nullptr ) {
2694
1.72k
            continue;
2695
1.72k
        }
2696
2697
1.25k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
1.25k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
9
            break;
2702
9
        }
2703
2.96k
    } while ( parentDs.Get<bool>() == true );
2704
2705
1.04k
    if ( operations.empty() == true ) {
2706
24
        return;
2707
24
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
1.01k
#if 1
2711
1.01k
    {
2712
1.01k
        std::set<uint64_t> moduleIDs;
2713
1.82k
        for (const auto& m : modules ) {
2714
1.82k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.82k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.82k
            moduleIDs.insert(moduleID);
2722
1.82k
        }
2723
2724
1.01k
        std::set<uint64_t> operationModuleIDs;
2725
1.14k
        for (const auto& op : operations) {
2726
1.14k
            operationModuleIDs.insert(op.first->ID);
2727
1.14k
        }
2728
2729
1.01k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
1.01k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
1.01k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
1.01k
        for (const auto& id : addModuleIDs) {
2734
899
            operations.push_back({ modules.at(id), operations[0].second});
2735
899
        }
2736
1.01k
    }
2737
1.01k
#endif
2738
2739
1.01k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
1.01k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
3.06k
    for (size_t i = 0; i < operations.size(); i++) {
2747
2.04k
        auto& operation = operations[i];
2748
2749
2.04k
        auto& module = operation.first;
2750
2.04k
        auto& op = operation.second;
2751
2752
2.04k
        if ( i > 0 ) {
2753
1.13k
            auto& prevModule = operations[i-1].first;
2754
1.13k
            auto& prevOp = operations[i].second;
2755
2756
1.13k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
218
                auto& curModifier = op.modifier.GetVectorPtr();
2758
218
                if ( curModifier.size() == 0 ) {
2759
96.4k
                    for (size_t j = 0; j < 512; j++) {
2760
96.2k
                        curModifier.push_back(1);
2761
96.2k
                    }
2762
188
                } else {
2763
371
                    for (auto& c : curModifier) {
2764
371
                        c++;
2765
371
                    }
2766
30
                }
2767
218
            }
2768
1.13k
        }
2769
2770
2.04k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
2.04k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
2.04k
        const auto& result = results.back();
2777
2778
2.04k
        if ( result.second != std::nullopt ) {
2779
1.80k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
1.80k
        }
2786
2787
2.04k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
2.04k
        if ( options.disableTests == false ) {
2796
2.04k
            tests::test(op, result.second);
2797
2.04k
        }
2798
2799
2.04k
        postprocess(module, op, result);
2800
2.04k
    }
2801
2802
1.01k
    if ( options.noCompare == false ) {
2803
911
        compare(operations, results, data, size);
2804
911
    }
2805
1.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
1.05k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
1.05k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
1.05k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.68k
    do {
2691
2.68k
        auto op = getOp(&parentDs, data, size);
2692
2.68k
        auto module = getModule(parentDs);
2693
2.68k
        if ( module == nullptr ) {
2694
1.55k
            continue;
2695
1.55k
        }
2696
2697
1.12k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
1.12k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
18
            break;
2702
18
        }
2703
2.66k
    } while ( parentDs.Get<bool>() == true );
2704
2705
1.05k
    if ( operations.empty() == true ) {
2706
24
        return;
2707
24
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
1.02k
#if 1
2711
1.02k
    {
2712
1.02k
        std::set<uint64_t> moduleIDs;
2713
1.67k
        for (const auto& m : modules ) {
2714
1.67k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.67k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.67k
            moduleIDs.insert(moduleID);
2722
1.67k
        }
2723
2724
1.02k
        std::set<uint64_t> operationModuleIDs;
2725
1.04k
        for (const auto& op : operations) {
2726
1.04k
            operationModuleIDs.insert(op.first->ID);
2727
1.04k
        }
2728
2729
1.02k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
1.02k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
1.02k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
1.02k
        for (const auto& id : addModuleIDs) {
2734
824
            operations.push_back({ modules.at(id), operations[0].second});
2735
824
        }
2736
1.02k
    }
2737
1.02k
#endif
2738
2739
1.02k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
1.02k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
2.89k
    for (size_t i = 0; i < operations.size(); i++) {
2747
1.86k
        auto& operation = operations[i];
2748
2749
1.86k
        auto& module = operation.first;
2750
1.86k
        auto& op = operation.second;
2751
2752
1.86k
        if ( i > 0 ) {
2753
1.02k
            auto& prevModule = operations[i-1].first;
2754
1.02k
            auto& prevOp = operations[i].second;
2755
2756
1.02k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
183
                auto& curModifier = op.modifier.GetVectorPtr();
2758
183
                if ( curModifier.size() == 0 ) {
2759
76.4k
                    for (size_t j = 0; j < 512; j++) {
2760
76.2k
                        curModifier.push_back(1);
2761
76.2k
                    }
2762
149
                } else {
2763
243
                    for (auto& c : curModifier) {
2764
243
                        c++;
2765
243
                    }
2766
34
                }
2767
183
            }
2768
1.02k
        }
2769
2770
1.86k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
1.86k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
1.86k
        const auto& result = results.back();
2777
2778
1.86k
        if ( result.second != std::nullopt ) {
2779
435
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
435
        }
2786
2787
1.86k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
1.86k
        if ( options.disableTests == false ) {
2796
1.86k
            tests::test(op, result.second);
2797
1.86k
        }
2798
2799
1.86k
        postprocess(module, op, result);
2800
1.86k
    }
2801
2802
1.02k
    if ( options.noCompare == false ) {
2803
838
        compare(operations, results, data, size);
2804
838
    }
2805
1.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
153
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
153
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
153
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.13k
    do {
2691
3.13k
        auto op = getOp(&parentDs, data, size);
2692
3.13k
        auto module = getModule(parentDs);
2693
3.13k
        if ( module == nullptr ) {
2694
2.85k
            continue;
2695
2.85k
        }
2696
2697
274
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
274
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
10
            break;
2702
10
        }
2703
3.12k
    } while ( parentDs.Get<bool>() == true );
2704
2705
153
    if ( operations.empty() == true ) {
2706
9
        return;
2707
9
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
144
#if 1
2711
144
    {
2712
144
        std::set<uint64_t> moduleIDs;
2713
144
        for (const auto& m : modules ) {
2714
110
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
110
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
110
            moduleIDs.insert(moduleID);
2722
110
        }
2723
2724
144
        std::set<uint64_t> operationModuleIDs;
2725
158
        for (const auto& op : operations) {
2726
158
            operationModuleIDs.insert(op.first->ID);
2727
158
        }
2728
2729
144
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
144
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
144
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
144
        for (const auto& id : addModuleIDs) {
2734
42
            operations.push_back({ modules.at(id), operations[0].second});
2735
42
        }
2736
144
    }
2737
144
#endif
2738
2739
144
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
144
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
344
    for (size_t i = 0; i < operations.size(); i++) {
2747
200
        auto& operation = operations[i];
2748
2749
200
        auto& module = operation.first;
2750
200
        auto& op = operation.second;
2751
2752
200
        if ( i > 0 ) {
2753
145
            auto& prevModule = operations[i-1].first;
2754
145
            auto& prevOp = operations[i].second;
2755
2756
145
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
84
                auto& curModifier = op.modifier.GetVectorPtr();
2758
84
                if ( curModifier.size() == 0 ) {
2759
24.1k
                    for (size_t j = 0; j < 512; j++) {
2760
24.0k
                        curModifier.push_back(1);
2761
24.0k
                    }
2762
47
                } else {
2763
269
                    for (auto& c : curModifier) {
2764
269
                        c++;
2765
269
                    }
2766
37
                }
2767
84
            }
2768
145
        }
2769
2770
200
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
200
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
200
        const auto& result = results.back();
2777
2778
200
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
200
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
200
        if ( options.disableTests == false ) {
2796
200
            tests::test(op, result.second);
2797
200
        }
2798
2799
200
        postprocess(module, op, result);
2800
200
    }
2801
2802
144
    if ( options.noCompare == false ) {
2803
55
        compare(operations, results, data, size);
2804
55
    }
2805
144
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
912
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
912
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
912
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.81k
    do {
2691
3.81k
        auto op = getOp(&parentDs, data, size);
2692
3.81k
        auto module = getModule(parentDs);
2693
3.81k
        if ( module == nullptr ) {
2694
2.17k
            continue;
2695
2.17k
        }
2696
2697
1.64k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
1.64k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
62
            break;
2702
62
        }
2703
3.75k
    } while ( parentDs.Get<bool>() == true );
2704
2705
912
    if ( operations.empty() == true ) {
2706
10
        return;
2707
10
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
902
#if 1
2711
902
    {
2712
902
        std::set<uint64_t> moduleIDs;
2713
1.61k
        for (const auto& m : modules ) {
2714
1.61k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.61k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.61k
            moduleIDs.insert(moduleID);
2722
1.61k
        }
2723
2724
902
        std::set<uint64_t> operationModuleIDs;
2725
1.50k
        for (const auto& op : operations) {
2726
1.50k
            operationModuleIDs.insert(op.first->ID);
2727
1.50k
        }
2728
2729
902
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
902
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
902
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
902
        for (const auto& id : addModuleIDs) {
2734
793
            operations.push_back({ modules.at(id), operations[0].second});
2735
793
        }
2736
902
    }
2737
902
#endif
2738
2739
902
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
902
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
3.20k
    for (size_t i = 0; i < operations.size(); i++) {
2747
2.30k
        auto& operation = operations[i];
2748
2749
2.30k
        auto& module = operation.first;
2750
2.30k
        auto& op = operation.second;
2751
2752
2.30k
        if ( i > 0 ) {
2753
1.49k
            auto& prevModule = operations[i-1].first;
2754
1.49k
            auto& prevOp = operations[i].second;
2755
2756
1.49k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
674
                auto& curModifier = op.modifier.GetVectorPtr();
2758
674
                if ( curModifier.size() == 0 ) {
2759
258k
                    for (size_t j = 0; j < 512; j++) {
2760
258k
                        curModifier.push_back(1);
2761
258k
                    }
2762
504
                } else {
2763
16.4k
                    for (auto& c : curModifier) {
2764
16.4k
                        c++;
2765
16.4k
                    }
2766
170
                }
2767
674
            }
2768
1.49k
        }
2769
2770
2.30k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
2.30k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
2.30k
        const auto& result = results.back();
2777
2778
2.30k
        if ( result.second != std::nullopt ) {
2779
1.07k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
1.07k
        }
2786
2787
2.30k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
2.30k
        if ( options.disableTests == false ) {
2796
2.30k
            tests::test(op, result.second);
2797
2.30k
        }
2798
2799
2.30k
        postprocess(module, op, result);
2800
2.30k
    }
2801
2802
902
    if ( options.noCompare == false ) {
2803
809
        compare(operations, results, data, size);
2804
809
    }
2805
902
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
257
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
257
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
257
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.26k
    do {
2691
3.26k
        auto op = getOp(&parentDs, data, size);
2692
3.26k
        auto module = getModule(parentDs);
2693
3.26k
        if ( module == nullptr ) {
2694
2.76k
            continue;
2695
2.76k
        }
2696
2697
503
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
503
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
9
            break;
2702
9
        }
2703
3.25k
    } while ( parentDs.Get<bool>() == true );
2704
2705
257
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
252
#if 1
2711
252
    {
2712
252
        std::set<uint64_t> moduleIDs;
2713
332
        for (const auto& m : modules ) {
2714
332
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
332
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
332
            moduleIDs.insert(moduleID);
2722
332
        }
2723
2724
252
        std::set<uint64_t> operationModuleIDs;
2725
383
        for (const auto& op : operations) {
2726
383
            operationModuleIDs.insert(op.first->ID);
2727
383
        }
2728
2729
252
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
252
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
252
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
252
        for (const auto& id : addModuleIDs) {
2734
153
            operations.push_back({ modules.at(id), operations[0].second});
2735
153
        }
2736
252
    }
2737
252
#endif
2738
2739
252
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
252
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
788
    for (size_t i = 0; i < operations.size(); i++) {
2747
536
        auto& operation = operations[i];
2748
2749
536
        auto& module = operation.first;
2750
536
        auto& op = operation.second;
2751
2752
536
        if ( i > 0 ) {
2753
370
            auto& prevModule = operations[i-1].first;
2754
370
            auto& prevOp = operations[i].second;
2755
2756
370
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
198
                auto& curModifier = op.modifier.GetVectorPtr();
2758
198
                if ( curModifier.size() == 0 ) {
2759
39.5k
                    for (size_t j = 0; j < 512; j++) {
2760
39.4k
                        curModifier.push_back(1);
2761
39.4k
                    }
2762
121
                } else {
2763
17.5k
                    for (auto& c : curModifier) {
2764
17.5k
                        c++;
2765
17.5k
                    }
2766
121
                }
2767
198
            }
2768
370
        }
2769
2770
536
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
536
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
536
        const auto& result = results.back();
2777
2778
536
        if ( result.second != std::nullopt ) {
2779
88
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
88
        }
2786
2787
536
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
536
        if ( options.disableTests == false ) {
2796
536
            tests::test(op, result.second);
2797
536
        }
2798
2799
536
        postprocess(module, op, result);
2800
536
    }
2801
2802
252
    if ( options.noCompare == false ) {
2803
166
        compare(operations, results, data, size);
2804
166
    }
2805
252
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
142
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
142
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
142
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.86k
    do {
2691
2.86k
        auto op = getOp(&parentDs, data, size);
2692
2.86k
        auto module = getModule(parentDs);
2693
2.86k
        if ( module == nullptr ) {
2694
2.62k
            continue;
2695
2.62k
        }
2696
2697
238
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
238
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
2.85k
    } while ( parentDs.Get<bool>() == true );
2704
2705
142
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
137
#if 1
2711
137
    {
2712
137
        std::set<uint64_t> moduleIDs;
2713
137
        for (const auto& m : modules ) {
2714
96
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
96
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
96
            moduleIDs.insert(moduleID);
2722
96
        }
2723
2724
137
        std::set<uint64_t> operationModuleIDs;
2725
140
        for (const auto& op : operations) {
2726
140
            operationModuleIDs.insert(op.first->ID);
2727
140
        }
2728
2729
137
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
137
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
137
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
137
        for (const auto& id : addModuleIDs) {
2734
34
            operations.push_back({ modules.at(id), operations[0].second});
2735
34
        }
2736
137
    }
2737
137
#endif
2738
2739
137
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
137
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
311
    for (size_t i = 0; i < operations.size(); i++) {
2747
174
        auto& operation = operations[i];
2748
2749
174
        auto& module = operation.first;
2750
174
        auto& op = operation.second;
2751
2752
174
        if ( i > 0 ) {
2753
126
            auto& prevModule = operations[i-1].first;
2754
126
            auto& prevOp = operations[i].second;
2755
2756
126
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
67
                auto& curModifier = op.modifier.GetVectorPtr();
2758
67
                if ( curModifier.size() == 0 ) {
2759
14.3k
                    for (size_t j = 0; j < 512; j++) {
2760
14.3k
                        curModifier.push_back(1);
2761
14.3k
                    }
2762
39
                } else {
2763
629
                    for (auto& c : curModifier) {
2764
629
                        c++;
2765
629
                    }
2766
39
                }
2767
67
            }
2768
126
        }
2769
2770
174
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
174
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
174
        const auto& result = results.back();
2777
2778
174
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
174
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
174
        if ( options.disableTests == false ) {
2796
174
            tests::test(op, result.second);
2797
174
        }
2798
2799
174
        postprocess(module, op, result);
2800
174
    }
2801
2802
137
    if ( options.noCompare == false ) {
2803
48
        compare(operations, results, data, size);
2804
48
    }
2805
137
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
147
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
147
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
147
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.02k
    do {
2691
3.02k
        auto op = getOp(&parentDs, data, size);
2692
3.02k
        auto module = getModule(parentDs);
2693
3.02k
        if ( module == nullptr ) {
2694
2.77k
            continue;
2695
2.77k
        }
2696
2697
254
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
254
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
3.02k
    } while ( parentDs.Get<bool>() == true );
2704
2705
147
    if ( operations.empty() == true ) {
2706
9
        return;
2707
9
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
138
#if 1
2711
138
    {
2712
138
        std::set<uint64_t> moduleIDs;
2713
138
        for (const auto& m : modules ) {
2714
112
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
112
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
112
            moduleIDs.insert(moduleID);
2722
112
        }
2723
2724
138
        std::set<uint64_t> operationModuleIDs;
2725
165
        for (const auto& op : operations) {
2726
165
            operationModuleIDs.insert(op.first->ID);
2727
165
        }
2728
2729
138
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
138
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
138
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
138
        for (const auto& id : addModuleIDs) {
2734
42
            operations.push_back({ modules.at(id), operations[0].second});
2735
42
        }
2736
138
    }
2737
138
#endif
2738
2739
138
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
138
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
345
    for (size_t i = 0; i < operations.size(); i++) {
2747
207
        auto& operation = operations[i];
2748
2749
207
        auto& module = operation.first;
2750
207
        auto& op = operation.second;
2751
2752
207
        if ( i > 0 ) {
2753
151
            auto& prevModule = operations[i-1].first;
2754
151
            auto& prevOp = operations[i].second;
2755
2756
151
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
87
                auto& curModifier = op.modifier.GetVectorPtr();
2758
87
                if ( curModifier.size() == 0 ) {
2759
21.5k
                    for (size_t j = 0; j < 512; j++) {
2760
21.5k
                        curModifier.push_back(1);
2761
21.5k
                    }
2762
45
                } else {
2763
353
                    for (auto& c : curModifier) {
2764
353
                        c++;
2765
353
                    }
2766
45
                }
2767
87
            }
2768
151
        }
2769
2770
207
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
207
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
207
        const auto& result = results.back();
2777
2778
207
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
207
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
207
        if ( options.disableTests == false ) {
2796
207
            tests::test(op, result.second);
2797
207
        }
2798
2799
207
        postprocess(module, op, result);
2800
207
    }
2801
2802
138
    if ( options.noCompare == false ) {
2803
56
        compare(operations, results, data, size);
2804
56
    }
2805
138
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
146
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
146
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
146
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.49k
    do {
2691
3.49k
        auto op = getOp(&parentDs, data, size);
2692
3.49k
        auto module = getModule(parentDs);
2693
3.49k
        if ( module == nullptr ) {
2694
3.26k
            continue;
2695
3.26k
        }
2696
2697
235
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
235
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
3.48k
    } while ( parentDs.Get<bool>() == true );
2704
2705
146
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
143
#if 1
2711
143
    {
2712
143
        std::set<uint64_t> moduleIDs;
2713
143
        for (const auto& m : modules ) {
2714
90
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
90
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
90
            moduleIDs.insert(moduleID);
2722
90
        }
2723
2724
143
        std::set<uint64_t> operationModuleIDs;
2725
143
        for (const auto& op : operations) {
2726
129
            operationModuleIDs.insert(op.first->ID);
2727
129
        }
2728
2729
143
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
143
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
143
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
143
        for (const auto& id : addModuleIDs) {
2734
33
            operations.push_back({ modules.at(id), operations[0].second});
2735
33
        }
2736
143
    }
2737
143
#endif
2738
2739
143
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
143
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
305
    for (size_t i = 0; i < operations.size(); i++) {
2747
162
        auto& operation = operations[i];
2748
2749
162
        auto& module = operation.first;
2750
162
        auto& op = operation.second;
2751
2752
162
        if ( i > 0 ) {
2753
117
            auto& prevModule = operations[i-1].first;
2754
117
            auto& prevOp = operations[i].second;
2755
2756
117
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
66
                auto& curModifier = op.modifier.GetVectorPtr();
2758
66
                if ( curModifier.size() == 0 ) {
2759
21.0k
                    for (size_t j = 0; j < 512; j++) {
2760
20.9k
                        curModifier.push_back(1);
2761
20.9k
                    }
2762
41
                } else {
2763
282
                    for (auto& c : curModifier) {
2764
282
                        c++;
2765
282
                    }
2766
25
                }
2767
66
            }
2768
117
        }
2769
2770
162
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
162
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
162
        const auto& result = results.back();
2777
2778
162
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
162
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
162
        if ( options.disableTests == false ) {
2796
162
            tests::test(op, result.second);
2797
162
        }
2798
2799
162
        postprocess(module, op, result);
2800
162
    }
2801
2802
143
    if ( options.noCompare == false ) {
2803
45
        compare(operations, results, data, size);
2804
45
    }
2805
143
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
465
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
465
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
465
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.24k
    do {
2691
3.24k
        auto op = getOp(&parentDs, data, size);
2692
3.24k
        auto module = getModule(parentDs);
2693
3.24k
        if ( module == nullptr ) {
2694
2.39k
            continue;
2695
2.39k
        }
2696
2697
850
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
850
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
13
            break;
2702
13
        }
2703
3.23k
    } while ( parentDs.Get<bool>() == true );
2704
2705
465
    if ( operations.empty() == true ) {
2706
18
        return;
2707
18
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
447
#if 1
2711
447
    {
2712
447
        std::set<uint64_t> moduleIDs;
2713
724
        for (const auto& m : modules ) {
2714
724
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
724
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
724
            moduleIDs.insert(moduleID);
2722
724
        }
2723
2724
447
        std::set<uint64_t> operationModuleIDs;
2725
758
        for (const auto& op : operations) {
2726
758
            operationModuleIDs.insert(op.first->ID);
2727
758
        }
2728
2729
447
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
447
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
447
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
447
        for (const auto& id : addModuleIDs) {
2734
347
            operations.push_back({ modules.at(id), operations[0].second});
2735
347
        }
2736
447
    }
2737
447
#endif
2738
2739
447
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
447
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
1.55k
    for (size_t i = 0; i < operations.size(); i++) {
2747
1.10k
        auto& operation = operations[i];
2748
2749
1.10k
        auto& module = operation.first;
2750
1.10k
        auto& op = operation.second;
2751
2752
1.10k
        if ( i > 0 ) {
2753
743
            auto& prevModule = operations[i-1].first;
2754
743
            auto& prevOp = operations[i].second;
2755
2756
743
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
369
                auto& curModifier = op.modifier.GetVectorPtr();
2758
369
                if ( curModifier.size() == 0 ) {
2759
135k
                    for (size_t j = 0; j < 512; j++) {
2760
135k
                        curModifier.push_back(1);
2761
135k
                    }
2762
265
                } else {
2763
448
                    for (auto& c : curModifier) {
2764
448
                        c++;
2765
448
                    }
2766
104
                }
2767
369
            }
2768
743
        }
2769
2770
1.10k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
1.10k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
1.10k
        const auto& result = results.back();
2777
2778
1.10k
        if ( result.second != std::nullopt ) {
2779
570
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
570
        }
2786
2787
1.10k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
1.10k
        if ( options.disableTests == false ) {
2796
1.10k
            tests::test(op, result.second);
2797
1.10k
        }
2798
2799
1.10k
        postprocess(module, op, result);
2800
1.10k
    }
2801
2802
447
    if ( options.noCompare == false ) {
2803
362
        compare(operations, results, data, size);
2804
362
    }
2805
447
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
298
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
298
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
298
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.10k
    do {
2691
3.10k
        auto op = getOp(&parentDs, data, size);
2692
3.10k
        auto module = getModule(parentDs);
2693
3.10k
        if ( module == nullptr ) {
2694
2.60k
            continue;
2695
2.60k
        }
2696
2697
498
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
498
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
11
            break;
2702
11
        }
2703
3.08k
    } while ( parentDs.Get<bool>() == true );
2704
2705
298
    if ( operations.empty() == true ) {
2706
9
        return;
2707
9
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
289
#if 1
2711
289
    {
2712
289
        std::set<uint64_t> moduleIDs;
2713
410
        for (const auto& m : modules ) {
2714
410
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
410
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
410
            moduleIDs.insert(moduleID);
2722
410
        }
2723
2724
289
        std::set<uint64_t> operationModuleIDs;
2725
402
        for (const auto& op : operations) {
2726
402
            operationModuleIDs.insert(op.first->ID);
2727
402
        }
2728
2729
289
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
289
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
289
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
289
        for (const auto& id : addModuleIDs) {
2734
193
            operations.push_back({ modules.at(id), operations[0].second});
2735
193
        }
2736
289
    }
2737
289
#endif
2738
2739
289
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
289
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
884
    for (size_t i = 0; i < operations.size(); i++) {
2747
595
        auto& operation = operations[i];
2748
2749
595
        auto& module = operation.first;
2750
595
        auto& op = operation.second;
2751
2752
595
        if ( i > 0 ) {
2753
390
            auto& prevModule = operations[i-1].first;
2754
390
            auto& prevOp = operations[i].second;
2755
2756
390
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
176
                auto& curModifier = op.modifier.GetVectorPtr();
2758
176
                if ( curModifier.size() == 0 ) {
2759
62.0k
                    for (size_t j = 0; j < 512; j++) {
2760
61.9k
                        curModifier.push_back(1);
2761
61.9k
                    }
2762
121
                } else {
2763
356
                    for (auto& c : curModifier) {
2764
356
                        c++;
2765
356
                    }
2766
55
                }
2767
176
            }
2768
390
        }
2769
2770
595
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
595
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
595
        const auto& result = results.back();
2777
2778
595
        if ( result.second != std::nullopt ) {
2779
174
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
174
        }
2786
2787
595
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
595
        if ( options.disableTests == false ) {
2796
595
            tests::test(op, result.second);
2797
595
        }
2798
2799
595
        postprocess(module, op, result);
2800
595
    }
2801
2802
289
    if ( options.noCompare == false ) {
2803
205
        compare(operations, results, data, size);
2804
205
    }
2805
289
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
132
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
132
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
132
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.86k
    do {
2691
2.86k
        auto op = getOp(&parentDs, data, size);
2692
2.86k
        auto module = getModule(parentDs);
2693
2.86k
        if ( module == nullptr ) {
2694
2.64k
            continue;
2695
2.64k
        }
2696
2697
224
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
224
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.86k
    } while ( parentDs.Get<bool>() == true );
2704
2705
132
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
125
#if 1
2711
125
    {
2712
125
        std::set<uint64_t> moduleIDs;
2713
125
        for (const auto& m : modules ) {
2714
80
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
80
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
80
            moduleIDs.insert(moduleID);
2722
80
        }
2723
2724
125
        std::set<uint64_t> operationModuleIDs;
2725
125
        for (const auto& op : operations) {
2726
112
            operationModuleIDs.insert(op.first->ID);
2727
112
        }
2728
2729
125
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
125
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
125
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
125
        for (const auto& id : addModuleIDs) {
2734
28
            operations.push_back({ modules.at(id), operations[0].second});
2735
28
        }
2736
125
    }
2737
125
#endif
2738
2739
125
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
125
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
265
    for (size_t i = 0; i < operations.size(); i++) {
2747
140
        auto& operation = operations[i];
2748
2749
140
        auto& module = operation.first;
2750
140
        auto& op = operation.second;
2751
2752
140
        if ( i > 0 ) {
2753
100
            auto& prevModule = operations[i-1].first;
2754
100
            auto& prevOp = operations[i].second;
2755
2756
100
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
54
                auto& curModifier = op.modifier.GetVectorPtr();
2758
54
                if ( curModifier.size() == 0 ) {
2759
12.8k
                    for (size_t j = 0; j < 512; j++) {
2760
12.8k
                        curModifier.push_back(1);
2761
12.8k
                    }
2762
29
                } else {
2763
350
                    for (auto& c : curModifier) {
2764
350
                        c++;
2765
350
                    }
2766
29
                }
2767
54
            }
2768
100
        }
2769
2770
140
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
140
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
140
        const auto& result = results.back();
2777
2778
140
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
140
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
140
        if ( options.disableTests == false ) {
2796
140
            tests::test(op, result.second);
2797
140
        }
2798
2799
140
        postprocess(module, op, result);
2800
140
    }
2801
2802
125
    if ( options.noCompare == false ) {
2803
40
        compare(operations, results, data, size);
2804
40
    }
2805
125
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
121
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
121
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
121
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.60k
    do {
2691
2.60k
        auto op = getOp(&parentDs, data, size);
2692
2.60k
        auto module = getModule(parentDs);
2693
2.60k
        if ( module == nullptr ) {
2694
2.39k
            continue;
2695
2.39k
        }
2696
2697
212
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
212
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
2.60k
    } while ( parentDs.Get<bool>() == true );
2704
2705
121
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
117
#if 1
2711
117
    {
2712
117
        std::set<uint64_t> moduleIDs;
2713
117
        for (const auto& m : modules ) {
2714
86
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
86
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
86
            moduleIDs.insert(moduleID);
2722
86
        }
2723
2724
117
        std::set<uint64_t> operationModuleIDs;
2725
127
        for (const auto& op : operations) {
2726
127
            operationModuleIDs.insert(op.first->ID);
2727
127
        }
2728
2729
117
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
117
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
117
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
117
        for (const auto& id : addModuleIDs) {
2734
29
            operations.push_back({ modules.at(id), operations[0].second});
2735
29
        }
2736
117
    }
2737
117
#endif
2738
2739
117
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
117
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
273
    for (size_t i = 0; i < operations.size(); i++) {
2747
156
        auto& operation = operations[i];
2748
2749
156
        auto& module = operation.first;
2750
156
        auto& op = operation.second;
2751
2752
156
        if ( i > 0 ) {
2753
113
            auto& prevModule = operations[i-1].first;
2754
113
            auto& prevOp = operations[i].second;
2755
2756
113
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
61
                auto& curModifier = op.modifier.GetVectorPtr();
2758
61
                if ( curModifier.size() == 0 ) {
2759
18.4k
                    for (size_t j = 0; j < 512; j++) {
2760
18.4k
                        curModifier.push_back(1);
2761
18.4k
                    }
2762
36
                } else {
2763
248
                    for (auto& c : curModifier) {
2764
248
                        c++;
2765
248
                    }
2766
25
                }
2767
61
            }
2768
113
        }
2769
2770
156
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
156
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
156
        const auto& result = results.back();
2777
2778
156
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
156
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
156
        if ( options.disableTests == false ) {
2796
156
            tests::test(op, result.second);
2797
156
        }
2798
2799
156
        postprocess(module, op, result);
2800
156
    }
2801
2802
117
    if ( options.noCompare == false ) {
2803
43
        compare(operations, results, data, size);
2804
43
    }
2805
117
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
775
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
775
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
775
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.94k
    do {
2691
3.94k
        auto op = getOp(&parentDs, data, size);
2692
3.94k
        auto module = getModule(parentDs);
2693
3.94k
        if ( module == nullptr ) {
2694
2.77k
            continue;
2695
2.77k
        }
2696
2697
1.17k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
1.17k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
22
            break;
2702
22
        }
2703
3.92k
    } while ( parentDs.Get<bool>() == true );
2704
2705
775
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
768
#if 1
2711
768
    {
2712
768
        std::set<uint64_t> moduleIDs;
2713
1.36k
        for (const auto& m : modules ) {
2714
1.36k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.36k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.36k
            moduleIDs.insert(moduleID);
2722
1.36k
        }
2723
2724
768
        std::set<uint64_t> operationModuleIDs;
2725
1.07k
        for (const auto& op : operations) {
2726
1.07k
            operationModuleIDs.insert(op.first->ID);
2727
1.07k
        }
2728
2729
768
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
768
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
768
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
768
        for (const auto& id : addModuleIDs) {
2734
670
            operations.push_back({ modules.at(id), operations[0].second});
2735
670
        }
2736
768
    }
2737
768
#endif
2738
2739
768
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
768
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
2.51k
    for (size_t i = 0; i < operations.size(); i++) {
2747
1.74k
        auto& operation = operations[i];
2748
2749
1.74k
        auto& module = operation.first;
2750
1.74k
        auto& op = operation.second;
2751
2752
1.74k
        if ( i > 0 ) {
2753
1.06k
            auto& prevModule = operations[i-1].first;
2754
1.06k
            auto& prevOp = operations[i].second;
2755
2756
1.06k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
372
                auto& curModifier = op.modifier.GetVectorPtr();
2758
372
                if ( curModifier.size() == 0 ) {
2759
163k
                    for (size_t j = 0; j < 512; j++) {
2760
162k
                        curModifier.push_back(1);
2761
162k
                    }
2762
318
                } else {
2763
330
                    for (auto& c : curModifier) {
2764
330
                        c++;
2765
330
                    }
2766
54
                }
2767
372
            }
2768
1.06k
        }
2769
2770
1.74k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
1.74k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
1.74k
        const auto& result = results.back();
2777
2778
1.74k
        if ( result.second != std::nullopt ) {
2779
723
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
723
        }
2786
2787
1.74k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
1.74k
        if ( options.disableTests == false ) {
2796
1.74k
            tests::test(op, result.second);
2797
1.74k
        }
2798
2799
1.74k
        postprocess(module, op, result);
2800
1.74k
    }
2801
2802
768
    if ( options.noCompare == false ) {
2803
684
        compare(operations, results, data, size);
2804
684
    }
2805
768
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
397
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
397
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
397
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.19k
    do {
2691
3.19k
        auto op = getOp(&parentDs, data, size);
2692
3.19k
        auto module = getModule(parentDs);
2693
3.19k
        if ( module == nullptr ) {
2694
2.51k
            continue;
2695
2.51k
        }
2696
2697
671
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
671
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
10
            break;
2702
10
        }
2703
3.18k
    } while ( parentDs.Get<bool>() == true );
2704
2705
397
    if ( operations.empty() == true ) {
2706
6
        return;
2707
6
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
391
#if 1
2711
391
    {
2712
391
        std::set<uint64_t> moduleIDs;
2713
612
        for (const auto& m : modules ) {
2714
612
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
612
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
612
            moduleIDs.insert(moduleID);
2722
612
        }
2723
2724
391
        std::set<uint64_t> operationModuleIDs;
2725
574
        for (const auto& op : operations) {
2726
574
            operationModuleIDs.insert(op.first->ID);
2727
574
        }
2728
2729
391
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
391
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
391
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
391
        for (const auto& id : addModuleIDs) {
2734
294
            operations.push_back({ modules.at(id), operations[0].second});
2735
294
        }
2736
391
    }
2737
391
#endif
2738
2739
391
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
391
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
1.25k
    for (size_t i = 0; i < operations.size(); i++) {
2747
868
        auto& operation = operations[i];
2748
2749
868
        auto& module = operation.first;
2750
868
        auto& op = operation.second;
2751
2752
868
        if ( i > 0 ) {
2753
562
            auto& prevModule = operations[i-1].first;
2754
562
            auto& prevOp = operations[i].second;
2755
2756
562
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
248
                auto& curModifier = op.modifier.GetVectorPtr();
2758
248
                if ( curModifier.size() == 0 ) {
2759
98.4k
                    for (size_t j = 0; j < 512; j++) {
2760
98.3k
                        curModifier.push_back(1);
2761
98.3k
                    }
2762
192
                } else {
2763
676
                    for (auto& c : curModifier) {
2764
676
                        c++;
2765
676
                    }
2766
56
                }
2767
248
            }
2768
562
        }
2769
2770
868
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
868
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
868
        const auto& result = results.back();
2777
2778
868
        if ( result.second != std::nullopt ) {
2779
340
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
340
        }
2786
2787
868
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
868
        if ( options.disableTests == false ) {
2796
868
            tests::test(op, result.second);
2797
868
        }
2798
2799
868
        postprocess(module, op, result);
2800
868
    }
2801
2802
391
    if ( options.noCompare == false ) {
2803
306
        compare(operations, results, data, size);
2804
306
    }
2805
391
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
232
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
232
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
232
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.35k
    do {
2691
3.35k
        auto op = getOp(&parentDs, data, size);
2692
3.35k
        auto module = getModule(parentDs);
2693
3.35k
        if ( module == nullptr ) {
2694
3.03k
            continue;
2695
3.03k
        }
2696
2697
321
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
321
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
3.34k
    } while ( parentDs.Get<bool>() == true );
2704
2705
232
    if ( operations.empty() == true ) {
2706
13
        return;
2707
13
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
219
#if 1
2711
219
    {
2712
219
        std::set<uint64_t> moduleIDs;
2713
219
        for (const auto& m : modules ) {
2714
170
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
170
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
170
            moduleIDs.insert(moduleID);
2722
170
        }
2723
2724
219
        std::set<uint64_t> operationModuleIDs;
2725
219
        for (const auto& op : operations) {
2726
196
            operationModuleIDs.insert(op.first->ID);
2727
196
        }
2728
2729
219
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
219
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
219
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
219
        for (const auto& id : addModuleIDs) {
2734
72
            operations.push_back({ modules.at(id), operations[0].second});
2735
72
        }
2736
219
    }
2737
219
#endif
2738
2739
219
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
219
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
487
    for (size_t i = 0; i < operations.size(); i++) {
2747
268
        auto& operation = operations[i];
2748
2749
268
        auto& module = operation.first;
2750
268
        auto& op = operation.second;
2751
2752
268
        if ( i > 0 ) {
2753
183
            auto& prevModule = operations[i-1].first;
2754
183
            auto& prevOp = operations[i].second;
2755
2756
183
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
90
                auto& curModifier = op.modifier.GetVectorPtr();
2758
90
                if ( curModifier.size() == 0 ) {
2759
29.7k
                    for (size_t j = 0; j < 512; j++) {
2760
29.6k
                        curModifier.push_back(1);
2761
29.6k
                    }
2762
58
                } else {
2763
395
                    for (auto& c : curModifier) {
2764
395
                        c++;
2765
395
                    }
2766
32
                }
2767
90
            }
2768
183
        }
2769
2770
268
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
268
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
268
        const auto& result = results.back();
2777
2778
268
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
268
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
268
        if ( options.disableTests == false ) {
2796
268
            tests::test(op, result.second);
2797
268
        }
2798
2799
268
        postprocess(module, op, result);
2800
268
    }
2801
2802
219
    if ( options.noCompare == false ) {
2803
85
        compare(operations, results, data, size);
2804
85
    }
2805
219
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
253
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
253
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
253
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.85k
    do {
2691
1.85k
        auto op = getOp(&parentDs, data, size);
2692
1.85k
        auto module = getModule(parentDs);
2693
1.85k
        if ( module == nullptr ) {
2694
1.64k
            continue;
2695
1.64k
        }
2696
2697
210
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
210
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
1.84k
    } while ( parentDs.Get<bool>() == true );
2704
2705
253
    if ( operations.empty() == true ) {
2706
13
        return;
2707
13
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
240
#if 1
2711
240
    {
2712
240
        std::set<uint64_t> moduleIDs;
2713
240
        for (const auto& m : modules ) {
2714
82
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
82
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
82
            moduleIDs.insert(moduleID);
2722
82
        }
2723
2724
240
        std::set<uint64_t> operationModuleIDs;
2725
240
        for (const auto& op : operations) {
2726
120
            operationModuleIDs.insert(op.first->ID);
2727
120
        }
2728
2729
240
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
240
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
240
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
240
        for (const auto& id : addModuleIDs) {
2734
29
            operations.push_back({ modules.at(id), operations[0].second});
2735
29
        }
2736
240
    }
2737
240
#endif
2738
2739
240
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
240
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
389
    for (size_t i = 0; i < operations.size(); i++) {
2747
149
        auto& operation = operations[i];
2748
2749
149
        auto& module = operation.first;
2750
149
        auto& op = operation.second;
2751
2752
149
        if ( i > 0 ) {
2753
108
            auto& prevModule = operations[i-1].first;
2754
108
            auto& prevOp = operations[i].second;
2755
2756
108
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
59
                auto& curModifier = op.modifier.GetVectorPtr();
2758
59
                if ( curModifier.size() == 0 ) {
2759
20.0k
                    for (size_t j = 0; j < 512; j++) {
2760
19.9k
                        curModifier.push_back(1);
2761
19.9k
                    }
2762
39
                } else {
2763
253
                    for (auto& c : curModifier) {
2764
253
                        c++;
2765
253
                    }
2766
20
                }
2767
59
            }
2768
108
        }
2769
2770
149
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
149
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
149
        const auto& result = results.back();
2777
2778
149
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
149
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
149
        if ( options.disableTests == false ) {
2796
149
            tests::test(op, result.second);
2797
149
        }
2798
2799
149
        postprocess(module, op, result);
2800
149
    }
2801
2802
240
    if ( options.noCompare == false ) {
2803
41
        compare(operations, results, data, size);
2804
41
    }
2805
240
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
237
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
237
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
237
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.62k
    do {
2691
3.62k
        auto op = getOp(&parentDs, data, size);
2692
3.62k
        auto module = getModule(parentDs);
2693
3.62k
        if ( module == nullptr ) {
2694
3.37k
            continue;
2695
3.37k
        }
2696
2697
250
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
250
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
3.62k
    } while ( parentDs.Get<bool>() == true );
2704
2705
237
    if ( operations.empty() == true ) {
2706
8
        return;
2707
8
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
229
#if 1
2711
229
    {
2712
229
        std::set<uint64_t> moduleIDs;
2713
229
        for (const auto& m : modules ) {
2714
88
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
88
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
88
            moduleIDs.insert(moduleID);
2722
88
        }
2723
2724
229
        std::set<uint64_t> operationModuleIDs;
2725
229
        for (const auto& op : operations) {
2726
121
            operationModuleIDs.insert(op.first->ID);
2727
121
        }
2728
2729
229
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
229
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
229
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
229
        for (const auto& id : addModuleIDs) {
2734
29
            operations.push_back({ modules.at(id), operations[0].second});
2735
29
        }
2736
229
    }
2737
229
#endif
2738
2739
229
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
229
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
379
    for (size_t i = 0; i < operations.size(); i++) {
2747
150
        auto& operation = operations[i];
2748
2749
150
        auto& module = operation.first;
2750
150
        auto& op = operation.second;
2751
2752
150
        if ( i > 0 ) {
2753
106
            auto& prevModule = operations[i-1].first;
2754
106
            auto& prevOp = operations[i].second;
2755
2756
106
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
56
                auto& curModifier = op.modifier.GetVectorPtr();
2758
56
                if ( curModifier.size() == 0 ) {
2759
17.4k
                    for (size_t j = 0; j < 512; j++) {
2760
17.4k
                        curModifier.push_back(1);
2761
17.4k
                    }
2762
34
                } else {
2763
312
                    for (auto& c : curModifier) {
2764
312
                        c++;
2765
312
                    }
2766
22
                }
2767
56
            }
2768
106
        }
2769
2770
150
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
150
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
150
        const auto& result = results.back();
2777
2778
150
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
150
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
150
        if ( options.disableTests == false ) {
2796
150
            tests::test(op, result.second);
2797
150
        }
2798
2799
150
        postprocess(module, op, result);
2800
150
    }
2801
2802
229
    if ( options.noCompare == false ) {
2803
44
        compare(operations, results, data, size);
2804
44
    }
2805
229
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
305
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
305
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
305
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.87k
    do {
2691
2.87k
        auto op = getOp(&parentDs, data, size);
2692
2.87k
        auto module = getModule(parentDs);
2693
2.87k
        if ( module == nullptr ) {
2694
2.54k
            continue;
2695
2.54k
        }
2696
2697
335
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
335
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
11
            break;
2702
11
        }
2703
2.86k
    } while ( parentDs.Get<bool>() == true );
2704
2705
305
    if ( operations.empty() == true ) {
2706
8
        return;
2707
8
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
297
#if 1
2711
297
    {
2712
297
        std::set<uint64_t> moduleIDs;
2713
297
        for (const auto& m : modules ) {
2714
146
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
146
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
146
            moduleIDs.insert(moduleID);
2722
146
        }
2723
2724
297
        std::set<uint64_t> operationModuleIDs;
2725
297
        for (const auto& op : operations) {
2726
192
            operationModuleIDs.insert(op.first->ID);
2727
192
        }
2728
2729
297
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
297
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
297
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
297
        for (const auto& id : addModuleIDs) {
2734
58
            operations.push_back({ modules.at(id), operations[0].second});
2735
58
        }
2736
297
    }
2737
297
#endif
2738
2739
297
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
297
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
547
    for (size_t i = 0; i < operations.size(); i++) {
2747
250
        auto& operation = operations[i];
2748
2749
250
        auto& module = operation.first;
2750
250
        auto& op = operation.second;
2751
2752
250
        if ( i > 0 ) {
2753
177
            auto& prevModule = operations[i-1].first;
2754
177
            auto& prevOp = operations[i].second;
2755
2756
177
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
96
                auto& curModifier = op.modifier.GetVectorPtr();
2758
96
                if ( curModifier.size() == 0 ) {
2759
31.2k
                    for (size_t j = 0; j < 512; j++) {
2760
31.2k
                        curModifier.push_back(1);
2761
31.2k
                    }
2762
61
                } else {
2763
299
                    for (auto& c : curModifier) {
2764
299
                        c++;
2765
299
                    }
2766
35
                }
2767
96
            }
2768
177
        }
2769
2770
250
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
250
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
250
        const auto& result = results.back();
2777
2778
250
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
250
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
250
        if ( options.disableTests == false ) {
2796
250
            tests::test(op, result.second);
2797
250
        }
2798
2799
250
        postprocess(module, op, result);
2800
250
    }
2801
2802
297
    if ( options.noCompare == false ) {
2803
73
        compare(operations, results, data, size);
2804
73
    }
2805
297
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
276
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
276
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
276
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.81k
    do {
2691
2.81k
        auto op = getOp(&parentDs, data, size);
2692
2.81k
        auto module = getModule(parentDs);
2693
2.81k
        if ( module == nullptr ) {
2694
2.55k
            continue;
2695
2.55k
        }
2696
2697
260
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
260
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
2.80k
    } while ( parentDs.Get<bool>() == true );
2704
2705
276
    if ( operations.empty() == true ) {
2706
40
        return;
2707
40
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
236
#if 1
2711
236
    {
2712
236
        std::set<uint64_t> moduleIDs;
2713
236
        for (const auto& m : modules ) {
2714
92
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
92
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
92
            moduleIDs.insert(moduleID);
2722
92
        }
2723
2724
236
        std::set<uint64_t> operationModuleIDs;
2725
236
        for (const auto& op : operations) {
2726
130
            operationModuleIDs.insert(op.first->ID);
2727
130
        }
2728
2729
236
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
236
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
236
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
236
        for (const auto& id : addModuleIDs) {
2734
31
            operations.push_back({ modules.at(id), operations[0].second});
2735
31
        }
2736
236
    }
2737
236
#endif
2738
2739
236
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
236
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
397
    for (size_t i = 0; i < operations.size(); i++) {
2747
161
        auto& operation = operations[i];
2748
2749
161
        auto& module = operation.first;
2750
161
        auto& op = operation.second;
2751
2752
161
        if ( i > 0 ) {
2753
115
            auto& prevModule = operations[i-1].first;
2754
115
            auto& prevOp = operations[i].second;
2755
2756
115
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
63
                auto& curModifier = op.modifier.GetVectorPtr();
2758
63
                if ( curModifier.size() == 0 ) {
2759
18.9k
                    for (size_t j = 0; j < 512; j++) {
2760
18.9k
                        curModifier.push_back(1);
2761
18.9k
                    }
2762
37
                } else {
2763
248
                    for (auto& c : curModifier) {
2764
248
                        c++;
2765
248
                    }
2766
26
                }
2767
63
            }
2768
115
        }
2769
2770
161
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
161
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
161
        const auto& result = results.back();
2777
2778
161
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
161
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
161
        if ( options.disableTests == false ) {
2796
161
            tests::test(op, result.second);
2797
161
        }
2798
2799
161
        postprocess(module, op, result);
2800
161
    }
2801
2802
236
    if ( options.noCompare == false ) {
2803
46
        compare(operations, results, data, size);
2804
46
    }
2805
236
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
163
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
163
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
163
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.55k
    do {
2691
3.55k
        auto op = getOp(&parentDs, data, size);
2692
3.55k
        auto module = getModule(parentDs);
2693
3.55k
        if ( module == nullptr ) {
2694
3.25k
            continue;
2695
3.25k
        }
2696
2697
293
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
293
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
3.54k
    } while ( parentDs.Get<bool>() == true );
2704
2705
163
    if ( operations.empty() == true ) {
2706
8
        return;
2707
8
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
155
#if 1
2711
155
    {
2712
155
        std::set<uint64_t> moduleIDs;
2713
155
        for (const auto& m : modules ) {
2714
114
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
114
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
114
            moduleIDs.insert(moduleID);
2722
114
        }
2723
2724
155
        std::set<uint64_t> operationModuleIDs;
2725
161
        for (const auto& op : operations) {
2726
161
            operationModuleIDs.insert(op.first->ID);
2727
161
        }
2728
2729
155
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
155
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
155
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
155
        for (const auto& id : addModuleIDs) {
2734
43
            operations.push_back({ modules.at(id), operations[0].second});
2735
43
        }
2736
155
    }
2737
155
#endif
2738
2739
155
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
155
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
359
    for (size_t i = 0; i < operations.size(); i++) {
2747
204
        auto& operation = operations[i];
2748
2749
204
        auto& module = operation.first;
2750
204
        auto& op = operation.second;
2751
2752
204
        if ( i > 0 ) {
2753
147
            auto& prevModule = operations[i-1].first;
2754
147
            auto& prevOp = operations[i].second;
2755
2756
147
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
81
                auto& curModifier = op.modifier.GetVectorPtr();
2758
81
                if ( curModifier.size() == 0 ) {
2759
22.0k
                    for (size_t j = 0; j < 512; j++) {
2760
22.0k
                        curModifier.push_back(1);
2761
22.0k
                    }
2762
43
                } else {
2763
602
                    for (auto& c : curModifier) {
2764
602
                        c++;
2765
602
                    }
2766
38
                }
2767
81
            }
2768
147
        }
2769
2770
204
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
204
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
204
        const auto& result = results.back();
2777
2778
204
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
204
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
204
        if ( options.disableTests == false ) {
2796
204
            tests::test(op, result.second);
2797
204
        }
2798
2799
204
        postprocess(module, op, result);
2800
204
    }
2801
2802
155
    if ( options.noCompare == false ) {
2803
57
        compare(operations, results, data, size);
2804
57
    }
2805
155
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
160
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
160
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
160
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.76k
    do {
2691
3.76k
        auto op = getOp(&parentDs, data, size);
2692
3.76k
        auto module = getModule(parentDs);
2693
3.76k
        if ( module == nullptr ) {
2694
3.49k
            continue;
2695
3.49k
        }
2696
2697
270
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
270
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
11
            break;
2702
11
        }
2703
3.75k
    } while ( parentDs.Get<bool>() == true );
2704
2705
160
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
153
#if 1
2711
153
    {
2712
153
        std::set<uint64_t> moduleIDs;
2713
153
        for (const auto& m : modules ) {
2714
102
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
102
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
102
            moduleIDs.insert(moduleID);
2722
102
        }
2723
2724
153
        std::set<uint64_t> operationModuleIDs;
2725
153
        for (const auto& op : operations) {
2726
149
            operationModuleIDs.insert(op.first->ID);
2727
149
        }
2728
2729
153
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
153
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
153
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
153
        for (const auto& id : addModuleIDs) {
2734
36
            operations.push_back({ modules.at(id), operations[0].second});
2735
36
        }
2736
153
    }
2737
153
#endif
2738
2739
153
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
153
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
338
    for (size_t i = 0; i < operations.size(); i++) {
2747
185
        auto& operation = operations[i];
2748
2749
185
        auto& module = operation.first;
2750
185
        auto& op = operation.second;
2751
2752
185
        if ( i > 0 ) {
2753
134
            auto& prevModule = operations[i-1].first;
2754
134
            auto& prevOp = operations[i].second;
2755
2756
134
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
75
                auto& curModifier = op.modifier.GetVectorPtr();
2758
75
                if ( curModifier.size() == 0 ) {
2759
22.0k
                    for (size_t j = 0; j < 512; j++) {
2760
22.0k
                        curModifier.push_back(1);
2761
22.0k
                    }
2762
43
                } else {
2763
546
                    for (auto& c : curModifier) {
2764
546
                        c++;
2765
546
                    }
2766
32
                }
2767
75
            }
2768
134
        }
2769
2770
185
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
185
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
185
        const auto& result = results.back();
2777
2778
185
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
185
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
185
        if ( options.disableTests == false ) {
2796
185
            tests::test(op, result.second);
2797
185
        }
2798
2799
185
        postprocess(module, op, result);
2800
185
    }
2801
2802
153
    if ( options.noCompare == false ) {
2803
51
        compare(operations, results, data, size);
2804
51
    }
2805
153
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
221
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
221
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
221
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.42k
    do {
2691
2.42k
        auto op = getOp(&parentDs, data, size);
2692
2.42k
        auto module = getModule(parentDs);
2693
2.42k
        if ( module == nullptr ) {
2694
2.04k
            continue;
2695
2.04k
        }
2696
2697
387
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
387
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
11
            break;
2702
11
        }
2703
2.41k
    } while ( parentDs.Get<bool>() == true );
2704
2705
221
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
216
#if 1
2711
216
    {
2712
216
        std::set<uint64_t> moduleIDs;
2713
216
        for (const auto& m : modules ) {
2714
180
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
180
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
180
            moduleIDs.insert(moduleID);
2722
180
        }
2723
2724
216
        std::set<uint64_t> operationModuleIDs;
2725
252
        for (const auto& op : operations) {
2726
252
            operationModuleIDs.insert(op.first->ID);
2727
252
        }
2728
2729
216
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
216
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
216
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
216
        for (const auto& id : addModuleIDs) {
2734
77
            operations.push_back({ modules.at(id), operations[0].second});
2735
77
        }
2736
216
    }
2737
216
#endif
2738
2739
216
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
216
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
545
    for (size_t i = 0; i < operations.size(); i++) {
2747
329
        auto& operation = operations[i];
2748
2749
329
        auto& module = operation.first;
2750
329
        auto& op = operation.second;
2751
2752
329
        if ( i > 0 ) {
2753
239
            auto& prevModule = operations[i-1].first;
2754
239
            auto& prevOp = operations[i].second;
2755
2756
239
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
142
                auto& curModifier = op.modifier.GetVectorPtr();
2758
142
                if ( curModifier.size() == 0 ) {
2759
48.2k
                    for (size_t j = 0; j < 512; j++) {
2760
48.1k
                        curModifier.push_back(1);
2761
48.1k
                    }
2762
94
                } else {
2763
277
                    for (auto& c : curModifier) {
2764
277
                        c++;
2765
277
                    }
2766
48
                }
2767
142
            }
2768
239
        }
2769
2770
329
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
329
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
329
        const auto& result = results.back();
2777
2778
329
        if ( result.second != std::nullopt ) {
2779
29
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
29
        }
2786
2787
329
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
329
        if ( options.disableTests == false ) {
2796
329
            tests::test(op, result.second);
2797
329
        }
2798
2799
329
        postprocess(module, op, result);
2800
329
    }
2801
2802
216
    if ( options.noCompare == false ) {
2803
90
        compare(operations, results, data, size);
2804
90
    }
2805
216
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
225
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
225
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
225
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.82k
    do {
2691
2.82k
        auto op = getOp(&parentDs, data, size);
2692
2.82k
        auto module = getModule(parentDs);
2693
2.82k
        if ( module == nullptr ) {
2694
2.41k
            continue;
2695
2.41k
        }
2696
2697
410
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
410
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
13
            break;
2702
13
        }
2703
2.81k
    } while ( parentDs.Get<bool>() == true );
2704
2705
225
    if ( operations.empty() == true ) {
2706
8
        return;
2707
8
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
217
#if 1
2711
217
    {
2712
217
        std::set<uint64_t> moduleIDs;
2713
217
        for (const auto& m : modules ) {
2714
200
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
200
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
200
            moduleIDs.insert(moduleID);
2722
200
        }
2723
2724
217
        std::set<uint64_t> operationModuleIDs;
2725
277
        for (const auto& op : operations) {
2726
277
            operationModuleIDs.insert(op.first->ID);
2727
277
        }
2728
2729
217
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
217
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
217
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
217
        for (const auto& id : addModuleIDs) {
2734
87
            operations.push_back({ modules.at(id), operations[0].second});
2735
87
        }
2736
217
    }
2737
217
#endif
2738
2739
217
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
217
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
581
    for (size_t i = 0; i < operations.size(); i++) {
2747
364
        auto& operation = operations[i];
2748
2749
364
        auto& module = operation.first;
2750
364
        auto& op = operation.second;
2751
2752
364
        if ( i > 0 ) {
2753
264
            auto& prevModule = operations[i-1].first;
2754
264
            auto& prevOp = operations[i].second;
2755
2756
264
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
156
                auto& curModifier = op.modifier.GetVectorPtr();
2758
156
                if ( curModifier.size() == 0 ) {
2759
59.5k
                    for (size_t j = 0; j < 512; j++) {
2760
59.3k
                        curModifier.push_back(1);
2761
59.3k
                    }
2762
116
                } else {
2763
558
                    for (auto& c : curModifier) {
2764
558
                        c++;
2765
558
                    }
2766
40
                }
2767
156
            }
2768
264
        }
2769
2770
364
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
364
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
364
        const auto& result = results.back();
2777
2778
364
        if ( result.second != std::nullopt ) {
2779
52
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
52
        }
2786
2787
364
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
364
        if ( options.disableTests == false ) {
2796
364
            tests::test(op, result.second);
2797
364
        }
2798
2799
364
        postprocess(module, op, result);
2800
364
    }
2801
2802
217
    if ( options.noCompare == false ) {
2803
100
        compare(operations, results, data, size);
2804
100
    }
2805
217
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
398
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
398
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
398
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.08k
    do {
2691
3.08k
        auto op = getOp(&parentDs, data, size);
2692
3.08k
        auto module = getModule(parentDs);
2693
3.08k
        if ( module == nullptr ) {
2694
2.38k
            continue;
2695
2.38k
        }
2696
2697
699
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
699
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
16
            break;
2702
16
        }
2703
3.07k
    } while ( parentDs.Get<bool>() == true );
2704
2705
398
    if ( operations.empty() == true ) {
2706
19
        return;
2707
19
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
379
#if 1
2711
379
    {
2712
379
        std::set<uint64_t> moduleIDs;
2713
532
        for (const auto& m : modules ) {
2714
532
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
532
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
532
            moduleIDs.insert(moduleID);
2722
532
        }
2723
2724
379
        std::set<uint64_t> operationModuleIDs;
2725
592
        for (const auto& op : operations) {
2726
592
            operationModuleIDs.insert(op.first->ID);
2727
592
        }
2728
2729
379
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
379
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
379
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
379
        for (const auto& id : addModuleIDs) {
2734
252
            operations.push_back({ modules.at(id), operations[0].second});
2735
252
        }
2736
379
    }
2737
379
#endif
2738
2739
379
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
379
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
1.22k
    for (size_t i = 0; i < operations.size(); i++) {
2747
844
        auto& operation = operations[i];
2748
2749
844
        auto& module = operation.first;
2750
844
        auto& op = operation.second;
2751
2752
844
        if ( i > 0 ) {
2753
578
            auto& prevModule = operations[i-1].first;
2754
578
            auto& prevOp = operations[i].second;
2755
2756
578
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
306
                auto& curModifier = op.modifier.GetVectorPtr();
2758
306
                if ( curModifier.size() == 0 ) {
2759
136k
                    for (size_t j = 0; j < 512; j++) {
2760
136k
                        curModifier.push_back(1);
2761
136k
                    }
2762
267
                } else {
2763
400
                    for (auto& c : curModifier) {
2764
400
                        c++;
2765
400
                    }
2766
39
                }
2767
306
            }
2768
578
        }
2769
2770
844
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
844
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
844
        const auto& result = results.back();
2777
2778
844
        if ( result.second != std::nullopt ) {
2779
183
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
183
        }
2786
2787
844
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
844
        if ( options.disableTests == false ) {
2796
844
            tests::test(op, result.second);
2797
844
        }
2798
2799
844
        postprocess(module, op, result);
2800
844
    }
2801
2802
379
    if ( options.noCompare == false ) {
2803
266
        compare(operations, results, data, size);
2804
266
    }
2805
379
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
233
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
233
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
233
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.26k
    do {
2691
2.26k
        auto op = getOp(&parentDs, data, size);
2692
2.26k
        auto module = getModule(parentDs);
2693
2.26k
        if ( module == nullptr ) {
2694
1.92k
            continue;
2695
1.92k
        }
2696
2697
338
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
338
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
9
            break;
2702
9
        }
2703
2.25k
    } while ( parentDs.Get<bool>() == true );
2704
2705
233
    if ( operations.empty() == true ) {
2706
13
        return;
2707
13
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
220
#if 1
2711
220
    {
2712
220
        std::set<uint64_t> moduleIDs;
2713
220
        for (const auto& m : modules ) {
2714
180
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
180
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
180
            moduleIDs.insert(moduleID);
2722
180
        }
2723
2724
220
        std::set<uint64_t> operationModuleIDs;
2725
239
        for (const auto& op : operations) {
2726
239
            operationModuleIDs.insert(op.first->ID);
2727
239
        }
2728
2729
220
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
220
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
220
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
220
        for (const auto& id : addModuleIDs) {
2734
78
            operations.push_back({ modules.at(id), operations[0].second});
2735
78
        }
2736
220
    }
2737
220
#endif
2738
2739
220
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
220
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
537
    for (size_t i = 0; i < operations.size(); i++) {
2747
317
        auto& operation = operations[i];
2748
2749
317
        auto& module = operation.first;
2750
317
        auto& op = operation.second;
2751
2752
317
        if ( i > 0 ) {
2753
227
            auto& prevModule = operations[i-1].first;
2754
227
            auto& prevOp = operations[i].second;
2755
2756
227
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
131
                auto& curModifier = op.modifier.GetVectorPtr();
2758
131
                if ( curModifier.size() == 0 ) {
2759
46.6k
                    for (size_t j = 0; j < 512; j++) {
2760
46.5k
                        curModifier.push_back(1);
2761
46.5k
                    }
2762
91
                } else {
2763
307
                    for (auto& c : curModifier) {
2764
307
                        c++;
2765
307
                    }
2766
40
                }
2767
131
            }
2768
227
        }
2769
2770
317
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
317
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
317
        const auto& result = results.back();
2777
2778
317
        if ( result.second != std::nullopt ) {
2779
66
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
66
        }
2786
2787
317
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
317
        if ( options.disableTests == false ) {
2796
317
            tests::test(op, result.second);
2797
317
        }
2798
2799
317
        postprocess(module, op, result);
2800
317
    }
2801
2802
220
    if ( options.noCompare == false ) {
2803
90
        compare(operations, results, data, size);
2804
90
    }
2805
220
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
294
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
294
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
294
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.64k
    do {
2691
2.64k
        auto op = getOp(&parentDs, data, size);
2692
2.64k
        auto module = getModule(parentDs);
2693
2.64k
        if ( module == nullptr ) {
2694
2.30k
            continue;
2695
2.30k
        }
2696
2697
339
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
339
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
9
            break;
2702
9
        }
2703
2.63k
    } while ( parentDs.Get<bool>() == true );
2704
2705
294
    if ( operations.empty() == true ) {
2706
43
        return;
2707
43
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
251
#if 1
2711
251
    {
2712
251
        std::set<uint64_t> moduleIDs;
2713
251
        for (const auto& m : modules ) {
2714
162
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
162
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
162
            moduleIDs.insert(moduleID);
2722
162
        }
2723
2724
251
        std::set<uint64_t> operationModuleIDs;
2725
251
        for (const auto& op : operations) {
2726
213
            operationModuleIDs.insert(op.first->ID);
2727
213
        }
2728
2729
251
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
251
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
251
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
251
        for (const auto& id : addModuleIDs) {
2734
67
            operations.push_back({ modules.at(id), operations[0].second});
2735
67
        }
2736
251
    }
2737
251
#endif
2738
2739
251
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
251
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
531
    for (size_t i = 0; i < operations.size(); i++) {
2747
280
        auto& operation = operations[i];
2748
2749
280
        auto& module = operation.first;
2750
280
        auto& op = operation.second;
2751
2752
280
        if ( i > 0 ) {
2753
199
            auto& prevModule = operations[i-1].first;
2754
199
            auto& prevOp = operations[i].second;
2755
2756
199
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
112
                auto& curModifier = op.modifier.GetVectorPtr();
2758
112
                if ( curModifier.size() == 0 ) {
2759
41.0k
                    for (size_t j = 0; j < 512; j++) {
2760
40.9k
                        curModifier.push_back(1);
2761
40.9k
                    }
2762
80
                } else {
2763
354
                    for (auto& c : curModifier) {
2764
354
                        c++;
2765
354
                    }
2766
32
                }
2767
112
            }
2768
199
        }
2769
2770
280
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
280
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
280
        const auto& result = results.back();
2777
2778
280
        if ( result.second != std::nullopt ) {
2779
35
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
35
        }
2786
2787
280
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
280
        if ( options.disableTests == false ) {
2796
280
            tests::test(op, result.second);
2797
280
        }
2798
2799
280
        postprocess(module, op, result);
2800
280
    }
2801
2802
251
    if ( options.noCompare == false ) {
2803
81
        compare(operations, results, data, size);
2804
81
    }
2805
251
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
206
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
206
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
206
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.39k
    do {
2691
2.39k
        auto op = getOp(&parentDs, data, size);
2692
2.39k
        auto module = getModule(parentDs);
2693
2.39k
        if ( module == nullptr ) {
2694
2.03k
            continue;
2695
2.03k
        }
2696
2697
364
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
364
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
9
            break;
2702
9
        }
2703
2.38k
    } while ( parentDs.Get<bool>() == true );
2704
2705
206
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
202
#if 1
2711
202
    {
2712
202
        std::set<uint64_t> moduleIDs;
2713
202
        for (const auto& m : modules ) {
2714
168
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
168
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
168
            moduleIDs.insert(moduleID);
2722
168
        }
2723
2724
202
        std::set<uint64_t> operationModuleIDs;
2725
238
        for (const auto& op : operations) {
2726
238
            operationModuleIDs.insert(op.first->ID);
2727
238
        }
2728
2729
202
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
202
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
202
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
202
        for (const auto& id : addModuleIDs) {
2734
68
            operations.push_back({ modules.at(id), operations[0].second});
2735
68
        }
2736
202
    }
2737
202
#endif
2738
2739
202
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
202
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
508
    for (size_t i = 0; i < operations.size(); i++) {
2747
306
        auto& operation = operations[i];
2748
2749
306
        auto& module = operation.first;
2750
306
        auto& op = operation.second;
2751
2752
306
        if ( i > 0 ) {
2753
222
            auto& prevModule = operations[i-1].first;
2754
222
            auto& prevOp = operations[i].second;
2755
2756
222
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
129
                auto& curModifier = op.modifier.GetVectorPtr();
2758
129
                if ( curModifier.size() == 0 ) {
2759
47.1k
                    for (size_t j = 0; j < 512; j++) {
2760
47.1k
                        curModifier.push_back(1);
2761
47.1k
                    }
2762
92
                } else {
2763
345
                    for (auto& c : curModifier) {
2764
345
                        c++;
2765
345
                    }
2766
37
                }
2767
129
            }
2768
222
        }
2769
2770
306
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
306
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
306
        const auto& result = results.back();
2777
2778
306
        if ( result.second != std::nullopt ) {
2779
23
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
23
        }
2786
2787
306
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
306
        if ( options.disableTests == false ) {
2796
306
            tests::test(op, result.second);
2797
306
        }
2798
2799
306
        postprocess(module, op, result);
2800
306
    }
2801
2802
202
    if ( options.noCompare == false ) {
2803
84
        compare(operations, results, data, size);
2804
84
    }
2805
202
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
297
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
297
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
297
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.95k
    do {
2691
2.95k
        auto op = getOp(&parentDs, data, size);
2692
2.95k
        auto module = getModule(parentDs);
2693
2.95k
        if ( module == nullptr ) {
2694
2.64k
            continue;
2695
2.64k
        }
2696
2697
311
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
311
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
2.94k
    } while ( parentDs.Get<bool>() == true );
2704
2705
297
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
292
#if 1
2711
292
    {
2712
292
        std::set<uint64_t> moduleIDs;
2713
292
        for (const auto& m : modules ) {
2714
142
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
142
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
142
            moduleIDs.insert(moduleID);
2722
142
        }
2723
2724
292
        std::set<uint64_t> operationModuleIDs;
2725
292
        for (const auto& op : operations) {
2726
184
            operationModuleIDs.insert(op.first->ID);
2727
184
        }
2728
2729
292
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
292
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
292
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
292
        for (const auto& id : addModuleIDs) {
2734
56
            operations.push_back({ modules.at(id), operations[0].second});
2735
56
        }
2736
292
    }
2737
292
#endif
2738
2739
292
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
292
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
532
    for (size_t i = 0; i < operations.size(); i++) {
2747
240
        auto& operation = operations[i];
2748
2749
240
        auto& module = operation.first;
2750
240
        auto& op = operation.second;
2751
2752
240
        if ( i > 0 ) {
2753
169
            auto& prevModule = operations[i-1].first;
2754
169
            auto& prevOp = operations[i].second;
2755
2756
169
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
90
                auto& curModifier = op.modifier.GetVectorPtr();
2758
90
                if ( curModifier.size() == 0 ) {
2759
24.1k
                    for (size_t j = 0; j < 512; j++) {
2760
24.0k
                        curModifier.push_back(1);
2761
24.0k
                    }
2762
47
                } else {
2763
418
                    for (auto& c : curModifier) {
2764
418
                        c++;
2765
418
                    }
2766
43
                }
2767
90
            }
2768
169
        }
2769
2770
240
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
240
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
240
        const auto& result = results.back();
2777
2778
240
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
240
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
240
        if ( options.disableTests == false ) {
2796
240
            tests::test(op, result.second);
2797
240
        }
2798
2799
240
        postprocess(module, op, result);
2800
240
    }
2801
2802
292
    if ( options.noCompare == false ) {
2803
71
        compare(operations, results, data, size);
2804
71
    }
2805
292
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
499
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
499
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
499
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
4.11k
    do {
2691
4.11k
        auto op = getOp(&parentDs, data, size);
2692
4.11k
        auto module = getModule(parentDs);
2693
4.11k
        if ( module == nullptr ) {
2694
3.41k
            continue;
2695
3.41k
        }
2696
2697
698
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
698
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
11
            break;
2702
11
        }
2703
4.10k
    } while ( parentDs.Get<bool>() == true );
2704
2705
499
    if ( operations.empty() == true ) {
2706
8
        return;
2707
8
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
491
#if 1
2711
491
    {
2712
491
        std::set<uint64_t> moduleIDs;
2713
550
        for (const auto& m : modules ) {
2714
550
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
550
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
550
            moduleIDs.insert(moduleID);
2722
550
        }
2723
2724
491
        std::set<uint64_t> operationModuleIDs;
2725
573
        for (const auto& op : operations) {
2726
573
            operationModuleIDs.insert(op.first->ID);
2727
573
        }
2728
2729
491
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
491
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
491
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
491
        for (const auto& id : addModuleIDs) {
2734
260
            operations.push_back({ modules.at(id), operations[0].second});
2735
260
        }
2736
491
    }
2737
491
#endif
2738
2739
491
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
491
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
1.32k
    for (size_t i = 0; i < operations.size(); i++) {
2747
833
        auto& operation = operations[i];
2748
2749
833
        auto& module = operation.first;
2750
833
        auto& op = operation.second;
2751
2752
833
        if ( i > 0 ) {
2753
558
            auto& prevModule = operations[i-1].first;
2754
558
            auto& prevOp = operations[i].second;
2755
2756
558
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
272
                auto& curModifier = op.modifier.GetVectorPtr();
2758
272
                if ( curModifier.size() == 0 ) {
2759
91.8k
                    for (size_t j = 0; j < 512; j++) {
2760
91.6k
                        curModifier.push_back(1);
2761
91.6k
                    }
2762
179
                } else {
2763
2.56k
                    for (auto& c : curModifier) {
2764
2.56k
                        c++;
2765
2.56k
                    }
2766
93
                }
2767
272
            }
2768
558
        }
2769
2770
833
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
833
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
833
        const auto& result = results.back();
2777
2778
833
        if ( result.second != std::nullopt ) {
2779
43
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
43
        }
2786
2787
833
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
833
        if ( options.disableTests == false ) {
2796
833
            tests::test(op, result.second);
2797
833
        }
2798
2799
833
        postprocess(module, op, result);
2800
833
    }
2801
2802
491
    if ( options.noCompare == false ) {
2803
275
        compare(operations, results, data, size);
2804
275
    }
2805
491
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
9.38k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
9.38k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
9.38k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
21.9k
    do {
2691
21.9k
        auto op = getOp(&parentDs, data, size);
2692
21.9k
        auto module = getModule(parentDs);
2693
21.9k
        if ( module == nullptr ) {
2694
9.10k
            continue;
2695
9.10k
        }
2696
2697
12.7k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
12.7k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
124
            break;
2702
124
        }
2703
21.7k
    } while ( parentDs.Get<bool>() == true );
2704
2705
9.38k
    if ( operations.empty() == true ) {
2706
29
        return;
2707
29
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
9.35k
#if 1
2711
9.35k
    {
2712
9.35k
        std::set<uint64_t> moduleIDs;
2713
18.0k
        for (const auto& m : modules ) {
2714
18.0k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
18.0k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
18.0k
            moduleIDs.insert(moduleID);
2722
18.0k
        }
2723
2724
9.35k
        std::set<uint64_t> operationModuleIDs;
2725
12.3k
        for (const auto& op : operations) {
2726
12.3k
            operationModuleIDs.insert(op.first->ID);
2727
12.3k
        }
2728
2729
9.35k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
9.35k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
9.35k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
9.35k
        for (const auto& id : addModuleIDs) {
2734
8.99k
            operations.push_back({ modules.at(id), operations[0].second});
2735
8.99k
        }
2736
9.35k
    }
2737
9.35k
#endif
2738
2739
9.35k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
9.35k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
30.7k
    for (size_t i = 0; i < operations.size(); i++) {
2747
21.3k
        auto& operation = operations[i];
2748
2749
21.3k
        auto& module = operation.first;
2750
21.3k
        auto& op = operation.second;
2751
2752
21.3k
        if ( i > 0 ) {
2753
12.3k
            auto& prevModule = operations[i-1].first;
2754
12.3k
            auto& prevOp = operations[i].second;
2755
2756
12.3k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
3.32k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
3.32k
                if ( curModifier.size() == 0 ) {
2759
1.05M
                    for (size_t j = 0; j < 512; j++) {
2760
1.05M
                        curModifier.push_back(1);
2761
1.05M
                    }
2762
2.06k
                } else {
2763
64.5k
                    for (auto& c : curModifier) {
2764
64.5k
                        c++;
2765
64.5k
                    }
2766
1.26k
                }
2767
3.32k
            }
2768
12.3k
        }
2769
2770
21.3k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
21.3k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
21.3k
        const auto& result = results.back();
2777
2778
21.3k
        if ( result.second != std::nullopt ) {
2779
5.11k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
5.11k
        }
2786
2787
21.3k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
21.3k
        if ( options.disableTests == false ) {
2796
21.3k
            tests::test(op, result.second);
2797
21.3k
        }
2798
2799
21.3k
        postprocess(module, op, result);
2800
21.3k
    }
2801
2802
9.35k
    if ( options.noCompare == false ) {
2803
9.02k
        compare(operations, results, data, size);
2804
9.02k
    }
2805
9.35k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
167
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
167
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
167
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.05k
    do {
2691
2.05k
        auto op = getOp(&parentDs, data, size);
2692
2.05k
        auto module = getModule(parentDs);
2693
2.05k
        if ( module == nullptr ) {
2694
1.73k
            continue;
2695
1.73k
        }
2696
2697
319
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
319
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
13
            break;
2702
13
        }
2703
2.04k
    } while ( parentDs.Get<bool>() == true );
2704
2705
167
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
162
#if 1
2711
162
    {
2712
162
        std::set<uint64_t> moduleIDs;
2713
178
        for (const auto& m : modules ) {
2714
178
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
178
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
178
            moduleIDs.insert(moduleID);
2722
178
        }
2723
2724
162
        std::set<uint64_t> operationModuleIDs;
2725
230
        for (const auto& op : operations) {
2726
230
            operationModuleIDs.insert(op.first->ID);
2727
230
        }
2728
2729
162
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
162
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
162
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
162
        for (const auto& id : addModuleIDs) {
2734
74
            operations.push_back({ modules.at(id), operations[0].second});
2735
74
        }
2736
162
    }
2737
162
#endif
2738
2739
162
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
162
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
466
    for (size_t i = 0; i < operations.size(); i++) {
2747
304
        auto& operation = operations[i];
2748
2749
304
        auto& module = operation.first;
2750
304
        auto& op = operation.second;
2751
2752
304
        if ( i > 0 ) {
2753
215
            auto& prevModule = operations[i-1].first;
2754
215
            auto& prevOp = operations[i].second;
2755
2756
215
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
116
                auto& curModifier = op.modifier.GetVectorPtr();
2758
116
                if ( curModifier.size() == 0 ) {
2759
29.7k
                    for (size_t j = 0; j < 512; j++) {
2760
29.6k
                        curModifier.push_back(1);
2761
29.6k
                    }
2762
58
                } else {
2763
938
                    for (auto& c : curModifier) {
2764
938
                        c++;
2765
938
                    }
2766
58
                }
2767
116
            }
2768
215
        }
2769
2770
304
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
304
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
304
        const auto& result = results.back();
2777
2778
304
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
304
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
304
        if ( options.disableTests == false ) {
2796
304
            tests::test(op, result.second);
2797
304
        }
2798
2799
304
        postprocess(module, op, result);
2800
304
    }
2801
2802
162
    if ( options.noCompare == false ) {
2803
89
        compare(operations, results, data, size);
2804
89
    }
2805
162
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
415
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
415
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
415
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.10k
    do {
2691
3.10k
        auto op = getOp(&parentDs, data, size);
2692
3.10k
        auto module = getModule(parentDs);
2693
3.10k
        if ( module == nullptr ) {
2694
2.41k
            continue;
2695
2.41k
        }
2696
2697
693
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
693
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
10
            break;
2702
10
        }
2703
3.09k
    } while ( parentDs.Get<bool>() == true );
2704
2705
415
    if ( operations.empty() == true ) {
2706
8
        return;
2707
8
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
407
#if 1
2711
407
    {
2712
407
        std::set<uint64_t> moduleIDs;
2713
576
        for (const auto& m : modules ) {
2714
576
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
576
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
576
            moduleIDs.insert(moduleID);
2722
576
        }
2723
2724
407
        std::set<uint64_t> operationModuleIDs;
2725
568
        for (const auto& op : operations) {
2726
568
            operationModuleIDs.insert(op.first->ID);
2727
568
        }
2728
2729
407
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
407
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
407
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
407
        for (const auto& id : addModuleIDs) {
2734
276
            operations.push_back({ modules.at(id), operations[0].second});
2735
276
        }
2736
407
    }
2737
407
#endif
2738
2739
407
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
407
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
1.25k
    for (size_t i = 0; i < operations.size(); i++) {
2747
844
        auto& operation = operations[i];
2748
2749
844
        auto& module = operation.first;
2750
844
        auto& op = operation.second;
2751
2752
844
        if ( i > 0 ) {
2753
556
            auto& prevModule = operations[i-1].first;
2754
556
            auto& prevOp = operations[i].second;
2755
2756
556
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
262
                auto& curModifier = op.modifier.GetVectorPtr();
2758
262
                if ( curModifier.size() == 0 ) {
2759
39.5k
                    for (size_t j = 0; j < 512; j++) {
2760
39.4k
                        curModifier.push_back(1);
2761
39.4k
                    }
2762
185
                } else {
2763
914
                    for (auto& c : curModifier) {
2764
914
                        c++;
2765
914
                    }
2766
185
                }
2767
262
            }
2768
556
        }
2769
2770
844
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
844
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
844
        const auto& result = results.back();
2777
2778
844
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
844
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
844
        if ( options.disableTests == false ) {
2796
844
            tests::test(op, result.second);
2797
844
        }
2798
2799
844
        postprocess(module, op, result);
2800
844
    }
2801
2802
407
    if ( options.noCompare == false ) {
2803
288
        compare(operations, results, data, size);
2804
288
    }
2805
407
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
149
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
149
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
149
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.85k
    do {
2691
1.85k
        auto op = getOp(&parentDs, data, size);
2692
1.85k
        auto module = getModule(parentDs);
2693
1.85k
        if ( module == nullptr ) {
2694
1.63k
            continue;
2695
1.63k
        }
2696
2697
225
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
225
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
1.85k
    } while ( parentDs.Get<bool>() == true );
2704
2705
149
    if ( operations.empty() == true ) {
2706
9
        return;
2707
9
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
140
#if 1
2711
140
    {
2712
140
        std::set<uint64_t> moduleIDs;
2713
140
        for (const auto& m : modules ) {
2714
108
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
108
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
108
            moduleIDs.insert(moduleID);
2722
108
        }
2723
2724
140
        std::set<uint64_t> operationModuleIDs;
2725
140
        for (const auto& op : operations) {
2726
131
            operationModuleIDs.insert(op.first->ID);
2727
131
        }
2728
2729
140
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
140
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
140
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
140
        for (const auto& id : addModuleIDs) {
2734
42
            operations.push_back({ modules.at(id), operations[0].second});
2735
42
        }
2736
140
    }
2737
140
#endif
2738
2739
140
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
140
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
313
    for (size_t i = 0; i < operations.size(); i++) {
2747
173
        auto& operation = operations[i];
2748
2749
173
        auto& module = operation.first;
2750
173
        auto& op = operation.second;
2751
2752
173
        if ( i > 0 ) {
2753
119
            auto& prevModule = operations[i-1].first;
2754
119
            auto& prevOp = operations[i].second;
2755
2756
119
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
59
                auto& curModifier = op.modifier.GetVectorPtr();
2758
59
                if ( curModifier.size() == 0 ) {
2759
19.4k
                    for (size_t j = 0; j < 512; j++) {
2760
19.4k
                        curModifier.push_back(1);
2761
19.4k
                    }
2762
38
                } else {
2763
255
                    for (auto& c : curModifier) {
2764
255
                        c++;
2765
255
                    }
2766
21
                }
2767
59
            }
2768
119
        }
2769
2770
173
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
173
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
173
        const auto& result = results.back();
2777
2778
173
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
173
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
173
        if ( options.disableTests == false ) {
2796
173
            tests::test(op, result.second);
2797
173
        }
2798
2799
173
        postprocess(module, op, result);
2800
173
    }
2801
2802
140
    if ( options.noCompare == false ) {
2803
54
        compare(operations, results, data, size);
2804
54
    }
2805
140
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
230
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
230
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
230
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.26k
    do {
2691
2.26k
        auto op = getOp(&parentDs, data, size);
2692
2.26k
        auto module = getModule(parentDs);
2693
2.26k
        if ( module == nullptr ) {
2694
2.01k
            continue;
2695
2.01k
        }
2696
2697
247
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
247
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
2.25k
    } while ( parentDs.Get<bool>() == true );
2704
2705
230
    if ( operations.empty() == true ) {
2706
14
        return;
2707
14
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
216
#if 1
2711
216
    {
2712
216
        std::set<uint64_t> moduleIDs;
2713
216
        for (const auto& m : modules ) {
2714
118
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
118
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
118
            moduleIDs.insert(moduleID);
2722
118
        }
2723
2724
216
        std::set<uint64_t> operationModuleIDs;
2725
216
        for (const auto& op : operations) {
2726
151
            operationModuleIDs.insert(op.first->ID);
2727
151
        }
2728
2729
216
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
216
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
216
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
216
        for (const auto& id : addModuleIDs) {
2734
46
            operations.push_back({ modules.at(id), operations[0].second});
2735
46
        }
2736
216
    }
2737
216
#endif
2738
2739
216
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
216
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
413
    for (size_t i = 0; i < operations.size(); i++) {
2747
197
        auto& operation = operations[i];
2748
2749
197
        auto& module = operation.first;
2750
197
        auto& op = operation.second;
2751
2752
197
        if ( i > 0 ) {
2753
138
            auto& prevModule = operations[i-1].first;
2754
138
            auto& prevOp = operations[i].second;
2755
2756
138
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
70
                auto& curModifier = op.modifier.GetVectorPtr();
2758
70
                if ( curModifier.size() == 0 ) {
2759
16.4k
                    for (size_t j = 0; j < 512; j++) {
2760
16.3k
                        curModifier.push_back(1);
2761
16.3k
                    }
2762
38
                } else {
2763
332
                    for (auto& c : curModifier) {
2764
332
                        c++;
2765
332
                    }
2766
38
                }
2767
70
            }
2768
138
        }
2769
2770
197
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
197
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
197
        const auto& result = results.back();
2777
2778
197
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
197
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
197
        if ( options.disableTests == false ) {
2796
197
            tests::test(op, result.second);
2797
197
        }
2798
2799
197
        postprocess(module, op, result);
2800
197
    }
2801
2802
216
    if ( options.noCompare == false ) {
2803
59
        compare(operations, results, data, size);
2804
59
    }
2805
216
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
144
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
144
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
144
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.62k
    do {
2691
2.62k
        auto op = getOp(&parentDs, data, size);
2692
2.62k
        auto module = getModule(parentDs);
2693
2.62k
        if ( module == nullptr ) {
2694
2.38k
            continue;
2695
2.38k
        }
2696
2697
239
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
239
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
2.61k
    } while ( parentDs.Get<bool>() == true );
2704
2705
144
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
139
#if 1
2711
139
    {
2712
139
        std::set<uint64_t> moduleIDs;
2713
139
        for (const auto& m : modules ) {
2714
108
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
108
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
108
            moduleIDs.insert(moduleID);
2722
108
        }
2723
2724
139
        std::set<uint64_t> operationModuleIDs;
2725
145
        for (const auto& op : operations) {
2726
145
            operationModuleIDs.insert(op.first->ID);
2727
145
        }
2728
2729
139
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
139
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
139
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
139
        for (const auto& id : addModuleIDs) {
2734
42
            operations.push_back({ modules.at(id), operations[0].second});
2735
42
        }
2736
139
    }
2737
139
#endif
2738
2739
139
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
139
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
326
    for (size_t i = 0; i < operations.size(); i++) {
2747
187
        auto& operation = operations[i];
2748
2749
187
        auto& module = operation.first;
2750
187
        auto& op = operation.second;
2751
2752
187
        if ( i > 0 ) {
2753
133
            auto& prevModule = operations[i-1].first;
2754
133
            auto& prevOp = operations[i].second;
2755
2756
133
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
73
                auto& curModifier = op.modifier.GetVectorPtr();
2758
73
                if ( curModifier.size() == 0 ) {
2759
20.5k
                    for (size_t j = 0; j < 512; j++) {
2760
20.4k
                        curModifier.push_back(1);
2761
20.4k
                    }
2762
40
                } else {
2763
882
                    for (auto& c : curModifier) {
2764
882
                        c++;
2765
882
                    }
2766
33
                }
2767
73
            }
2768
133
        }
2769
2770
187
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
187
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
187
        const auto& result = results.back();
2777
2778
187
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
187
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
187
        if ( options.disableTests == false ) {
2796
187
            tests::test(op, result.second);
2797
187
        }
2798
2799
187
        postprocess(module, op, result);
2800
187
    }
2801
2802
139
    if ( options.noCompare == false ) {
2803
54
        compare(operations, results, data, size);
2804
54
    }
2805
139
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
208
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
208
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
208
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.08k
    do {
2691
3.08k
        auto op = getOp(&parentDs, data, size);
2692
3.08k
        auto module = getModule(parentDs);
2693
3.08k
        if ( module == nullptr ) {
2694
2.84k
            continue;
2695
2.84k
        }
2696
2697
246
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
246
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
9
            break;
2702
9
        }
2703
3.07k
    } while ( parentDs.Get<bool>() == true );
2704
2705
208
    if ( operations.empty() == true ) {
2706
29
        return;
2707
29
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
179
#if 1
2711
179
    {
2712
179
        std::set<uint64_t> moduleIDs;
2713
179
        for (const auto& m : modules ) {
2714
104
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
104
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
104
            moduleIDs.insert(moduleID);
2722
104
        }
2723
2724
179
        std::set<uint64_t> operationModuleIDs;
2725
179
        for (const auto& op : operations) {
2726
137
            operationModuleIDs.insert(op.first->ID);
2727
137
        }
2728
2729
179
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
179
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
179
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
179
        for (const auto& id : addModuleIDs) {
2734
38
            operations.push_back({ modules.at(id), operations[0].second});
2735
38
        }
2736
179
    }
2737
179
#endif
2738
2739
179
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
179
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
354
    for (size_t i = 0; i < operations.size(); i++) {
2747
175
        auto& operation = operations[i];
2748
2749
175
        auto& module = operation.first;
2750
175
        auto& op = operation.second;
2751
2752
175
        if ( i > 0 ) {
2753
123
            auto& prevModule = operations[i-1].first;
2754
123
            auto& prevOp = operations[i].second;
2755
2756
123
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
65
                auto& curModifier = op.modifier.GetVectorPtr();
2758
65
                if ( curModifier.size() == 0 ) {
2759
17.9k
                    for (size_t j = 0; j < 512; j++) {
2760
17.9k
                        curModifier.push_back(1);
2761
17.9k
                    }
2762
35
                } else {
2763
396
                    for (auto& c : curModifier) {
2764
396
                        c++;
2765
396
                    }
2766
30
                }
2767
65
            }
2768
123
        }
2769
2770
175
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
175
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
175
        const auto& result = results.back();
2777
2778
175
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
175
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
175
        if ( options.disableTests == false ) {
2796
175
            tests::test(op, result.second);
2797
175
        }
2798
2799
175
        postprocess(module, op, result);
2800
175
    }
2801
2802
179
    if ( options.noCompare == false ) {
2803
52
        compare(operations, results, data, size);
2804
52
    }
2805
179
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
369
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
369
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
369
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.77k
    do {
2691
2.77k
        auto op = getOp(&parentDs, data, size);
2692
2.77k
        auto module = getModule(parentDs);
2693
2.77k
        if ( module == nullptr ) {
2694
2.36k
            continue;
2695
2.36k
        }
2696
2697
414
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
414
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
9
            break;
2702
9
        }
2703
2.76k
    } while ( parentDs.Get<bool>() == true );
2704
2705
369
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
362
#if 1
2711
362
    {
2712
362
        std::set<uint64_t> moduleIDs;
2713
362
        for (const auto& m : modules ) {
2714
132
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
132
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
132
            moduleIDs.insert(moduleID);
2722
132
        }
2723
2724
362
        std::set<uint64_t> operationModuleIDs;
2725
362
        for (const auto& op : operations) {
2726
173
            operationModuleIDs.insert(op.first->ID);
2727
173
        }
2728
2729
362
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
362
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
362
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
362
        for (const auto& id : addModuleIDs) {
2734
51
            operations.push_back({ modules.at(id), operations[0].second});
2735
51
        }
2736
362
    }
2737
362
#endif
2738
2739
362
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
362
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
586
    for (size_t i = 0; i < operations.size(); i++) {
2747
224
        auto& operation = operations[i];
2748
2749
224
        auto& module = operation.first;
2750
224
        auto& op = operation.second;
2751
2752
224
        if ( i > 0 ) {
2753
158
            auto& prevModule = operations[i-1].first;
2754
158
            auto& prevOp = operations[i].second;
2755
2756
158
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
82
                auto& curModifier = op.modifier.GetVectorPtr();
2758
82
                if ( curModifier.size() == 0 ) {
2759
25.6k
                    for (size_t j = 0; j < 512; j++) {
2760
25.6k
                        curModifier.push_back(1);
2761
25.6k
                    }
2762
50
                } else {
2763
344
                    for (auto& c : curModifier) {
2764
344
                        c++;
2765
344
                    }
2766
32
                }
2767
82
            }
2768
158
        }
2769
2770
224
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
224
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
224
        const auto& result = results.back();
2777
2778
224
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
224
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
224
        if ( options.disableTests == false ) {
2796
224
            tests::test(op, result.second);
2797
224
        }
2798
2799
224
        postprocess(module, op, result);
2800
224
    }
2801
2802
362
    if ( options.noCompare == false ) {
2803
66
        compare(operations, results, data, size);
2804
66
    }
2805
362
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
330
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
330
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
330
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.39k
    do {
2691
2.39k
        auto op = getOp(&parentDs, data, size);
2692
2.39k
        auto module = getModule(parentDs);
2693
2.39k
        if ( module == nullptr ) {
2694
2.05k
            continue;
2695
2.05k
        }
2696
2697
342
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
342
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
12
            break;
2702
12
        }
2703
2.38k
    } while ( parentDs.Get<bool>() == true );
2704
2705
330
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
325
#if 1
2711
325
    {
2712
325
        std::set<uint64_t> moduleIDs;
2713
325
        for (const auto& m : modules ) {
2714
106
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
106
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
106
            moduleIDs.insert(moduleID);
2722
106
        }
2723
2724
325
        std::set<uint64_t> operationModuleIDs;
2725
325
        for (const auto& op : operations) {
2726
163
            operationModuleIDs.insert(op.first->ID);
2727
163
        }
2728
2729
325
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
325
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
325
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
325
        for (const auto& id : addModuleIDs) {
2734
37
            operations.push_back({ modules.at(id), operations[0].second});
2735
37
        }
2736
325
    }
2737
325
#endif
2738
2739
325
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
325
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
525
    for (size_t i = 0; i < operations.size(); i++) {
2747
200
        auto& operation = operations[i];
2748
2749
200
        auto& module = operation.first;
2750
200
        auto& op = operation.second;
2751
2752
200
        if ( i > 0 ) {
2753
147
            auto& prevModule = operations[i-1].first;
2754
147
            auto& prevOp = operations[i].second;
2755
2756
147
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
85
                auto& curModifier = op.modifier.GetVectorPtr();
2758
85
                if ( curModifier.size() == 0 ) {
2759
27.7k
                    for (size_t j = 0; j < 512; j++) {
2760
27.6k
                        curModifier.push_back(1);
2761
27.6k
                    }
2762
54
                } else {
2763
310
                    for (auto& c : curModifier) {
2764
310
                        c++;
2765
310
                    }
2766
31
                }
2767
85
            }
2768
147
        }
2769
2770
200
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
200
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
200
        const auto& result = results.back();
2777
2778
200
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
200
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
200
        if ( options.disableTests == false ) {
2796
200
            tests::test(op, result.second);
2797
200
        }
2798
2799
200
        postprocess(module, op, result);
2800
200
    }
2801
2802
325
    if ( options.noCompare == false ) {
2803
53
        compare(operations, results, data, size);
2804
53
    }
2805
325
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
242
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
242
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
242
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.76k
    do {
2691
2.76k
        auto op = getOp(&parentDs, data, size);
2692
2.76k
        auto module = getModule(parentDs);
2693
2.76k
        if ( module == nullptr ) {
2694
2.41k
            continue;
2695
2.41k
        }
2696
2697
345
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
345
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
10
            break;
2702
10
        }
2703
2.75k
    } while ( parentDs.Get<bool>() == true );
2704
2705
242
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
239
#if 1
2711
239
    {
2712
239
        std::set<uint64_t> moduleIDs;
2713
239
        for (const auto& m : modules ) {
2714
98
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
98
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
98
            moduleIDs.insert(moduleID);
2722
98
        }
2723
2724
239
        std::set<uint64_t> operationModuleIDs;
2725
239
        for (const auto& op : operations) {
2726
139
            operationModuleIDs.insert(op.first->ID);
2727
139
        }
2728
2729
239
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
239
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
239
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
239
        for (const auto& id : addModuleIDs) {
2734
33
            operations.push_back({ modules.at(id), operations[0].second});
2735
33
        }
2736
239
    }
2737
239
#endif
2738
2739
239
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
239
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
411
    for (size_t i = 0; i < operations.size(); i++) {
2747
172
        auto& operation = operations[i];
2748
2749
172
        auto& module = operation.first;
2750
172
        auto& op = operation.second;
2751
2752
172
        if ( i > 0 ) {
2753
123
            auto& prevModule = operations[i-1].first;
2754
123
            auto& prevOp = operations[i].second;
2755
2756
123
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
62
                auto& curModifier = op.modifier.GetVectorPtr();
2758
62
                if ( curModifier.size() == 0 ) {
2759
17.9k
                    for (size_t j = 0; j < 512; j++) {
2760
17.9k
                        curModifier.push_back(1);
2761
17.9k
                    }
2762
35
                } else {
2763
268
                    for (auto& c : curModifier) {
2764
268
                        c++;
2765
268
                    }
2766
27
                }
2767
62
            }
2768
123
        }
2769
2770
172
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
172
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
172
        const auto& result = results.back();
2777
2778
172
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
172
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
172
        if ( options.disableTests == false ) {
2796
172
            tests::test(op, result.second);
2797
172
        }
2798
2799
172
        postprocess(module, op, result);
2800
172
    }
2801
2802
239
    if ( options.noCompare == false ) {
2803
49
        compare(operations, results, data, size);
2804
49
    }
2805
239
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
195
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
195
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
195
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.09k
    do {
2691
2.09k
        auto op = getOp(&parentDs, data, size);
2692
2.09k
        auto module = getModule(parentDs);
2693
2.09k
        if ( module == nullptr ) {
2694
1.83k
            continue;
2695
1.83k
        }
2696
2697
265
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
265
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
2.08k
    } while ( parentDs.Get<bool>() == true );
2704
2705
195
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
192
#if 1
2711
192
    {
2712
192
        std::set<uint64_t> moduleIDs;
2713
192
        for (const auto& m : modules ) {
2714
100
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
100
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
100
            moduleIDs.insert(moduleID);
2722
100
        }
2723
2724
192
        std::set<uint64_t> operationModuleIDs;
2725
192
        for (const auto& op : operations) {
2726
141
            operationModuleIDs.insert(op.first->ID);
2727
141
        }
2728
2729
192
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
192
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
192
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
192
        for (const auto& id : addModuleIDs) {
2734
37
            operations.push_back({ modules.at(id), operations[0].second});
2735
37
        }
2736
192
    }
2737
192
#endif
2738
2739
192
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
192
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
370
    for (size_t i = 0; i < operations.size(); i++) {
2747
178
        auto& operation = operations[i];
2748
2749
178
        auto& module = operation.first;
2750
178
        auto& op = operation.second;
2751
2752
178
        if ( i > 0 ) {
2753
128
            auto& prevModule = operations[i-1].first;
2754
128
            auto& prevOp = operations[i].second;
2755
2756
128
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
70
                auto& curModifier = op.modifier.GetVectorPtr();
2758
70
                if ( curModifier.size() == 0 ) {
2759
17.9k
                    for (size_t j = 0; j < 512; j++) {
2760
17.9k
                        curModifier.push_back(1);
2761
17.9k
                    }
2762
35
                } else {
2763
423
                    for (auto& c : curModifier) {
2764
423
                        c++;
2765
423
                    }
2766
35
                }
2767
70
            }
2768
128
        }
2769
2770
178
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
178
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
178
        const auto& result = results.back();
2777
2778
178
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
178
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
178
        if ( options.disableTests == false ) {
2796
178
            tests::test(op, result.second);
2797
178
        }
2798
2799
178
        postprocess(module, op, result);
2800
178
    }
2801
2802
192
    if ( options.noCompare == false ) {
2803
50
        compare(operations, results, data, size);
2804
50
    }
2805
192
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
237
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
237
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
237
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.32k
    do {
2691
3.32k
        auto op = getOp(&parentDs, data, size);
2692
3.32k
        auto module = getModule(parentDs);
2693
3.32k
        if ( module == nullptr ) {
2694
3.04k
            continue;
2695
3.04k
        }
2696
2697
283
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
283
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
3.32k
    } while ( parentDs.Get<bool>() == true );
2704
2705
237
    if ( operations.empty() == true ) {
2706
19
        return;
2707
19
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
218
#if 1
2711
218
    {
2712
218
        std::set<uint64_t> moduleIDs;
2713
218
        for (const auto& m : modules ) {
2714
86
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
86
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
86
            moduleIDs.insert(moduleID);
2722
86
        }
2723
2724
218
        std::set<uint64_t> operationModuleIDs;
2725
218
        for (const auto& op : operations) {
2726
133
            operationModuleIDs.insert(op.first->ID);
2727
133
        }
2728
2729
218
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
218
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
218
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
218
        for (const auto& id : addModuleIDs) {
2734
28
            operations.push_back({ modules.at(id), operations[0].second});
2735
28
        }
2736
218
    }
2737
218
#endif
2738
2739
218
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
218
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
379
    for (size_t i = 0; i < operations.size(); i++) {
2747
161
        auto& operation = operations[i];
2748
2749
161
        auto& module = operation.first;
2750
161
        auto& op = operation.second;
2751
2752
161
        if ( i > 0 ) {
2753
118
            auto& prevModule = operations[i-1].first;
2754
118
            auto& prevOp = operations[i].second;
2755
2756
118
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
63
                auto& curModifier = op.modifier.GetVectorPtr();
2758
63
                if ( curModifier.size() == 0 ) {
2759
15.3k
                    for (size_t j = 0; j < 512; j++) {
2760
15.3k
                        curModifier.push_back(1);
2761
15.3k
                    }
2762
33
                } else {
2763
380
                    for (auto& c : curModifier) {
2764
380
                        c++;
2765
380
                    }
2766
33
                }
2767
63
            }
2768
118
        }
2769
2770
161
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
161
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
161
        const auto& result = results.back();
2777
2778
161
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
161
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
161
        if ( options.disableTests == false ) {
2796
161
            tests::test(op, result.second);
2797
161
        }
2798
2799
161
        postprocess(module, op, result);
2800
161
    }
2801
2802
218
    if ( options.noCompare == false ) {
2803
43
        compare(operations, results, data, size);
2804
43
    }
2805
218
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
186
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
186
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
186
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.13k
    do {
2691
3.13k
        auto op = getOp(&parentDs, data, size);
2692
3.13k
        auto module = getModule(parentDs);
2693
3.13k
        if ( module == nullptr ) {
2694
2.86k
            continue;
2695
2.86k
        }
2696
2697
272
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
272
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
3.13k
    } while ( parentDs.Get<bool>() == true );
2704
2705
186
    if ( operations.empty() == true ) {
2706
8
        return;
2707
8
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
178
#if 1
2711
178
    {
2712
178
        std::set<uint64_t> moduleIDs;
2713
178
        for (const auto& m : modules ) {
2714
84
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
84
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
84
            moduleIDs.insert(moduleID);
2722
84
        }
2723
2724
178
        std::set<uint64_t> operationModuleIDs;
2725
178
        for (const auto& op : operations) {
2726
131
            operationModuleIDs.insert(op.first->ID);
2727
131
        }
2728
2729
178
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
178
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
178
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
178
        for (const auto& id : addModuleIDs) {
2734
29
            operations.push_back({ modules.at(id), operations[0].second});
2735
29
        }
2736
178
    }
2737
178
#endif
2738
2739
178
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
178
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
338
    for (size_t i = 0; i < operations.size(); i++) {
2747
160
        auto& operation = operations[i];
2748
2749
160
        auto& module = operation.first;
2750
160
        auto& op = operation.second;
2751
2752
160
        if ( i > 0 ) {
2753
118
            auto& prevModule = operations[i-1].first;
2754
118
            auto& prevOp = operations[i].second;
2755
2756
118
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
68
                auto& curModifier = op.modifier.GetVectorPtr();
2758
68
                if ( curModifier.size() == 0 ) {
2759
20.0k
                    for (size_t j = 0; j < 512; j++) {
2760
19.9k
                        curModifier.push_back(1);
2761
19.9k
                    }
2762
39
                } else {
2763
614
                    for (auto& c : curModifier) {
2764
614
                        c++;
2765
614
                    }
2766
29
                }
2767
68
            }
2768
118
        }
2769
2770
160
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
160
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
160
        const auto& result = results.back();
2777
2778
160
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
160
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
160
        if ( options.disableTests == false ) {
2796
160
            tests::test(op, result.second);
2797
160
        }
2798
2799
160
        postprocess(module, op, result);
2800
160
    }
2801
2802
178
    if ( options.noCompare == false ) {
2803
42
        compare(operations, results, data, size);
2804
42
    }
2805
178
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
198
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
198
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
198
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.64k
    do {
2691
2.64k
        auto op = getOp(&parentDs, data, size);
2692
2.64k
        auto module = getModule(parentDs);
2693
2.64k
        if ( module == nullptr ) {
2694
2.30k
            continue;
2695
2.30k
        }
2696
2697
339
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
339
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
10
            break;
2702
10
        }
2703
2.63k
    } while ( parentDs.Get<bool>() == true );
2704
2705
198
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
195
#if 1
2711
195
    {
2712
195
        std::set<uint64_t> moduleIDs;
2713
195
        for (const auto& m : modules ) {
2714
144
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
144
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
144
            moduleIDs.insert(moduleID);
2722
144
        }
2723
2724
195
        std::set<uint64_t> operationModuleIDs;
2725
195
        for (const auto& op : operations) {
2726
185
            operationModuleIDs.insert(op.first->ID);
2727
185
        }
2728
2729
195
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
195
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
195
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
195
        for (const auto& id : addModuleIDs) {
2734
60
            operations.push_back({ modules.at(id), operations[0].second});
2735
60
        }
2736
195
    }
2737
195
#endif
2738
2739
195
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
195
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
440
    for (size_t i = 0; i < operations.size(); i++) {
2747
245
        auto& operation = operations[i];
2748
2749
245
        auto& module = operation.first;
2750
245
        auto& op = operation.second;
2751
2752
245
        if ( i > 0 ) {
2753
173
            auto& prevModule = operations[i-1].first;
2754
173
            auto& prevOp = operations[i].second;
2755
2756
173
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
95
                auto& curModifier = op.modifier.GetVectorPtr();
2758
95
                if ( curModifier.size() == 0 ) {
2759
29.7k
                    for (size_t j = 0; j < 512; j++) {
2760
29.6k
                        curModifier.push_back(1);
2761
29.6k
                    }
2762
58
                } else {
2763
341
                    for (auto& c : curModifier) {
2764
341
                        c++;
2765
341
                    }
2766
37
                }
2767
95
            }
2768
173
        }
2769
2770
245
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
245
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
245
        const auto& result = results.back();
2777
2778
245
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
245
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
245
        if ( options.disableTests == false ) {
2796
245
            tests::test(op, result.second);
2797
245
        }
2798
2799
245
        postprocess(module, op, result);
2800
245
    }
2801
2802
195
    if ( options.noCompare == false ) {
2803
72
        compare(operations, results, data, size);
2804
72
    }
2805
195
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
161
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
161
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
161
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.53k
    do {
2691
3.53k
        auto op = getOp(&parentDs, data, size);
2692
3.53k
        auto module = getModule(parentDs);
2693
3.53k
        if ( module == nullptr ) {
2694
3.25k
            continue;
2695
3.25k
        }
2696
2697
282
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
282
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
3.53k
    } while ( parentDs.Get<bool>() == true );
2704
2705
161
    if ( operations.empty() == true ) {
2706
9
        return;
2707
9
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
152
#if 1
2711
152
    {
2712
152
        std::set<uint64_t> moduleIDs;
2713
152
        for (const auto& m : modules ) {
2714
94
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
94
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
94
            moduleIDs.insert(moduleID);
2722
94
        }
2723
2724
152
        std::set<uint64_t> operationModuleIDs;
2725
152
        for (const auto& op : operations) {
2726
135
            operationModuleIDs.insert(op.first->ID);
2727
135
        }
2728
2729
152
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
152
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
152
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
152
        for (const auto& id : addModuleIDs) {
2734
35
            operations.push_back({ modules.at(id), operations[0].second});
2735
35
        }
2736
152
    }
2737
152
#endif
2738
2739
152
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
152
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
322
    for (size_t i = 0; i < operations.size(); i++) {
2747
170
        auto& operation = operations[i];
2748
2749
170
        auto& module = operation.first;
2750
170
        auto& op = operation.second;
2751
2752
170
        if ( i > 0 ) {
2753
123
            auto& prevModule = operations[i-1].first;
2754
123
            auto& prevOp = operations[i].second;
2755
2756
123
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
67
                auto& curModifier = op.modifier.GetVectorPtr();
2758
67
                if ( curModifier.size() == 0 ) {
2759
20.5k
                    for (size_t j = 0; j < 512; j++) {
2760
20.4k
                        curModifier.push_back(1);
2761
20.4k
                    }
2762
40
                } else {
2763
268
                    for (auto& c : curModifier) {
2764
268
                        c++;
2765
268
                    }
2766
27
                }
2767
67
            }
2768
123
        }
2769
2770
170
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
170
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
170
        const auto& result = results.back();
2777
2778
170
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
170
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
170
        if ( options.disableTests == false ) {
2796
170
            tests::test(op, result.second);
2797
170
        }
2798
2799
170
        postprocess(module, op, result);
2800
170
    }
2801
2802
152
    if ( options.noCompare == false ) {
2803
47
        compare(operations, results, data, size);
2804
47
    }
2805
152
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
172
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
172
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
172
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.51k
    do {
2691
3.51k
        auto op = getOp(&parentDs, data, size);
2692
3.51k
        auto module = getModule(parentDs);
2693
3.51k
        if ( module == nullptr ) {
2694
3.29k
            continue;
2695
3.29k
        }
2696
2697
221
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
221
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
3.51k
    } while ( parentDs.Get<bool>() == true );
2704
2705
172
    if ( operations.empty() == true ) {
2706
12
        return;
2707
12
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
160
#if 1
2711
160
    {
2712
160
        std::set<uint64_t> moduleIDs;
2713
160
        for (const auto& m : modules ) {
2714
78
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
78
            moduleIDs.insert(moduleID);
2722
78
        }
2723
2724
160
        std::set<uint64_t> operationModuleIDs;
2725
160
        for (const auto& op : operations) {
2726
113
            operationModuleIDs.insert(op.first->ID);
2727
113
        }
2728
2729
160
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
160
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
160
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
160
        for (const auto& id : addModuleIDs) {
2734
26
            operations.push_back({ modules.at(id), operations[0].second});
2735
26
        }
2736
160
    }
2737
160
#endif
2738
2739
160
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
160
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
299
    for (size_t i = 0; i < operations.size(); i++) {
2747
139
        auto& operation = operations[i];
2748
2749
139
        auto& module = operation.first;
2750
139
        auto& op = operation.second;
2751
2752
139
        if ( i > 0 ) {
2753
100
            auto& prevModule = operations[i-1].first;
2754
100
            auto& prevOp = operations[i].second;
2755
2756
100
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
53
                auto& curModifier = op.modifier.GetVectorPtr();
2758
53
                if ( curModifier.size() == 0 ) {
2759
11.7k
                    for (size_t j = 0; j < 512; j++) {
2760
11.7k
                        curModifier.push_back(1);
2761
11.7k
                    }
2762
30
                } else {
2763
276
                    for (auto& c : curModifier) {
2764
276
                        c++;
2765
276
                    }
2766
30
                }
2767
53
            }
2768
100
        }
2769
2770
139
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
139
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
139
        const auto& result = results.back();
2777
2778
139
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
139
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
139
        if ( options.disableTests == false ) {
2796
139
            tests::test(op, result.second);
2797
139
        }
2798
2799
139
        postprocess(module, op, result);
2800
139
    }
2801
2802
160
    if ( options.noCompare == false ) {
2803
39
        compare(operations, results, data, size);
2804
39
    }
2805
160
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
152
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
152
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
152
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.89k
    do {
2691
2.89k
        auto op = getOp(&parentDs, data, size);
2692
2.89k
        auto module = getModule(parentDs);
2693
2.89k
        if ( module == nullptr ) {
2694
2.65k
            continue;
2695
2.65k
        }
2696
2697
242
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
242
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
2.88k
    } while ( parentDs.Get<bool>() == true );
2704
2705
152
    if ( operations.empty() == true ) {
2706
12
        return;
2707
12
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
140
#if 1
2711
140
    {
2712
140
        std::set<uint64_t> moduleIDs;
2713
140
        for (const auto& m : modules ) {
2714
94
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
94
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
94
            moduleIDs.insert(moduleID);
2722
94
        }
2723
2724
140
        std::set<uint64_t> operationModuleIDs;
2725
140
        for (const auto& op : operations) {
2726
132
            operationModuleIDs.insert(op.first->ID);
2727
132
        }
2728
2729
140
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
140
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
140
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
140
        for (const auto& id : addModuleIDs) {
2734
32
            operations.push_back({ modules.at(id), operations[0].second});
2735
32
        }
2736
140
    }
2737
140
#endif
2738
2739
140
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
140
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
304
    for (size_t i = 0; i < operations.size(); i++) {
2747
164
        auto& operation = operations[i];
2748
2749
164
        auto& module = operation.first;
2750
164
        auto& op = operation.second;
2751
2752
164
        if ( i > 0 ) {
2753
117
            auto& prevModule = operations[i-1].first;
2754
117
            auto& prevOp = operations[i].second;
2755
2756
117
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
58
                auto& curModifier = op.modifier.GetVectorPtr();
2758
58
                if ( curModifier.size() == 0 ) {
2759
12.3k
                    for (size_t j = 0; j < 512; j++) {
2760
12.2k
                        curModifier.push_back(1);
2761
12.2k
                    }
2762
34
                } else {
2763
517
                    for (auto& c : curModifier) {
2764
517
                        c++;
2765
517
                    }
2766
34
                }
2767
58
            }
2768
117
        }
2769
2770
164
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
164
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
164
        const auto& result = results.back();
2777
2778
164
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
164
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
164
        if ( options.disableTests == false ) {
2796
164
            tests::test(op, result.second);
2797
164
        }
2798
2799
164
        postprocess(module, op, result);
2800
164
    }
2801
2802
140
    if ( options.noCompare == false ) {
2803
47
        compare(operations, results, data, size);
2804
47
    }
2805
140
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
165
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
165
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
165
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.36k
    do {
2691
2.36k
        auto op = getOp(&parentDs, data, size);
2692
2.36k
        auto module = getModule(parentDs);
2693
2.36k
        if ( module == nullptr ) {
2694
2.12k
            continue;
2695
2.12k
        }
2696
2697
244
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
244
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
2.36k
    } while ( parentDs.Get<bool>() == true );
2704
2705
165
    if ( operations.empty() == true ) {
2706
6
        return;
2707
6
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
159
#if 1
2711
159
    {
2712
159
        std::set<uint64_t> moduleIDs;
2713
159
        for (const auto& m : modules ) {
2714
86
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
86
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
86
            moduleIDs.insert(moduleID);
2722
86
        }
2723
2724
159
        std::set<uint64_t> operationModuleIDs;
2725
159
        for (const auto& op : operations) {
2726
132
            operationModuleIDs.insert(op.first->ID);
2727
132
        }
2728
2729
159
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
159
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
159
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
159
        for (const auto& id : addModuleIDs) {
2734
27
            operations.push_back({ modules.at(id), operations[0].second});
2735
27
        }
2736
159
    }
2737
159
#endif
2738
2739
159
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
159
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
318
    for (size_t i = 0; i < operations.size(); i++) {
2747
159
        auto& operation = operations[i];
2748
2749
159
        auto& module = operation.first;
2750
159
        auto& op = operation.second;
2751
2752
159
        if ( i > 0 ) {
2753
116
            auto& prevModule = operations[i-1].first;
2754
116
            auto& prevOp = operations[i].second;
2755
2756
116
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
65
                auto& curModifier = op.modifier.GetVectorPtr();
2758
65
                if ( curModifier.size() == 0 ) {
2759
15.3k
                    for (size_t j = 0; j < 512; j++) {
2760
15.3k
                        curModifier.push_back(1);
2761
15.3k
                    }
2762
35
                } else {
2763
823
                    for (auto& c : curModifier) {
2764
823
                        c++;
2765
823
                    }
2766
35
                }
2767
65
            }
2768
116
        }
2769
2770
159
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
159
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
159
        const auto& result = results.back();
2777
2778
159
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
159
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
159
        if ( options.disableTests == false ) {
2796
159
            tests::test(op, result.second);
2797
159
        }
2798
2799
159
        postprocess(module, op, result);
2800
159
    }
2801
2802
159
    if ( options.noCompare == false ) {
2803
43
        compare(operations, results, data, size);
2804
43
    }
2805
159
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
275
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
275
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
275
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.47k
    do {
2691
2.47k
        auto op = getOp(&parentDs, data, size);
2692
2.47k
        auto module = getModule(parentDs);
2693
2.47k
        if ( module == nullptr ) {
2694
2.22k
            continue;
2695
2.22k
        }
2696
2697
252
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
252
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.47k
    } while ( parentDs.Get<bool>() == true );
2704
2705
275
    if ( operations.empty() == true ) {
2706
21
        return;
2707
21
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
254
#if 1
2711
254
    {
2712
254
        std::set<uint64_t> moduleIDs;
2713
254
        for (const auto& m : modules ) {
2714
94
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
94
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
94
            moduleIDs.insert(moduleID);
2722
94
        }
2723
2724
254
        std::set<uint64_t> operationModuleIDs;
2725
254
        for (const auto& op : operations) {
2726
133
            operationModuleIDs.insert(op.first->ID);
2727
133
        }
2728
2729
254
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
254
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
254
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
254
        for (const auto& id : addModuleIDs) {
2734
33
            operations.push_back({ modules.at(id), operations[0].second});
2735
33
        }
2736
254
    }
2737
254
#endif
2738
2739
254
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
254
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
420
    for (size_t i = 0; i < operations.size(); i++) {
2747
166
        auto& operation = operations[i];
2748
2749
166
        auto& module = operation.first;
2750
166
        auto& op = operation.second;
2751
2752
166
        if ( i > 0 ) {
2753
119
            auto& prevModule = operations[i-1].first;
2754
119
            auto& prevOp = operations[i].second;
2755
2756
119
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
65
                auto& curModifier = op.modifier.GetVectorPtr();
2758
65
                if ( curModifier.size() == 0 ) {
2759
16.4k
                    for (size_t j = 0; j < 512; j++) {
2760
16.3k
                        curModifier.push_back(1);
2761
16.3k
                    }
2762
33
                } else {
2763
261
                    for (auto& c : curModifier) {
2764
261
                        c++;
2765
261
                    }
2766
33
                }
2767
65
            }
2768
119
        }
2769
2770
166
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
166
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
166
        const auto& result = results.back();
2777
2778
166
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
166
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
166
        if ( options.disableTests == false ) {
2796
166
            tests::test(op, result.second);
2797
166
        }
2798
2799
166
        postprocess(module, op, result);
2800
166
    }
2801
2802
254
    if ( options.noCompare == false ) {
2803
47
        compare(operations, results, data, size);
2804
47
    }
2805
254
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
257
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
257
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
257
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.05k
    do {
2691
2.05k
        auto op = getOp(&parentDs, data, size);
2692
2.05k
        auto module = getModule(parentDs);
2693
2.05k
        if ( module == nullptr ) {
2694
1.75k
            continue;
2695
1.75k
        }
2696
2697
304
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
304
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
2.05k
    } while ( parentDs.Get<bool>() == true );
2704
2705
257
    if ( operations.empty() == true ) {
2706
21
        return;
2707
21
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
236
#if 1
2711
236
    {
2712
236
        std::set<uint64_t> moduleIDs;
2713
236
        for (const auto& m : modules ) {
2714
138
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
138
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
138
            moduleIDs.insert(moduleID);
2722
138
        }
2723
2724
236
        std::set<uint64_t> operationModuleIDs;
2725
236
        for (const auto& op : operations) {
2726
163
            operationModuleIDs.insert(op.first->ID);
2727
163
        }
2728
2729
236
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
236
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
236
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
236
        for (const auto& id : addModuleIDs) {
2734
56
            operations.push_back({ modules.at(id), operations[0].second});
2735
56
        }
2736
236
    }
2737
236
#endif
2738
2739
236
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
236
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
455
    for (size_t i = 0; i < operations.size(); i++) {
2747
219
        auto& operation = operations[i];
2748
2749
219
        auto& module = operation.first;
2750
219
        auto& op = operation.second;
2751
2752
219
        if ( i > 0 ) {
2753
150
            auto& prevModule = operations[i-1].first;
2754
150
            auto& prevOp = operations[i].second;
2755
2756
150
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
74
                auto& curModifier = op.modifier.GetVectorPtr();
2758
74
                if ( curModifier.size() == 0 ) {
2759
23.0k
                    for (size_t j = 0; j < 512; j++) {
2760
23.0k
                        curModifier.push_back(1);
2761
23.0k
                    }
2762
45
                } else {
2763
354
                    for (auto& c : curModifier) {
2764
354
                        c++;
2765
354
                    }
2766
29
                }
2767
74
            }
2768
150
        }
2769
2770
219
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
219
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
219
        const auto& result = results.back();
2777
2778
219
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
219
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
219
        if ( options.disableTests == false ) {
2796
219
            tests::test(op, result.second);
2797
219
        }
2798
2799
219
        postprocess(module, op, result);
2800
219
    }
2801
2802
236
    if ( options.noCompare == false ) {
2803
69
        compare(operations, results, data, size);
2804
69
    }
2805
236
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
146
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
146
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
146
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.84k
    do {
2691
2.84k
        auto op = getOp(&parentDs, data, size);
2692
2.84k
        auto module = getModule(parentDs);
2693
2.84k
        if ( module == nullptr ) {
2694
2.61k
            continue;
2695
2.61k
        }
2696
2697
225
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
225
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
2.83k
    } while ( parentDs.Get<bool>() == true );
2704
2705
146
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
144
#if 1
2711
144
    {
2712
144
        std::set<uint64_t> moduleIDs;
2713
144
        for (const auto& m : modules ) {
2714
92
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
92
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
92
            moduleIDs.insert(moduleID);
2722
92
        }
2723
2724
144
        std::set<uint64_t> operationModuleIDs;
2725
144
        for (const auto& op : operations) {
2726
126
            operationModuleIDs.insert(op.first->ID);
2727
126
        }
2728
2729
144
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
144
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
144
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
144
        for (const auto& id : addModuleIDs) {
2734
32
            operations.push_back({ modules.at(id), operations[0].second});
2735
32
        }
2736
144
    }
2737
144
#endif
2738
2739
144
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
144
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
302
    for (size_t i = 0; i < operations.size(); i++) {
2747
158
        auto& operation = operations[i];
2748
2749
158
        auto& module = operation.first;
2750
158
        auto& op = operation.second;
2751
2752
158
        if ( i > 0 ) {
2753
112
            auto& prevModule = operations[i-1].first;
2754
112
            auto& prevOp = operations[i].second;
2755
2756
112
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
57
                auto& curModifier = op.modifier.GetVectorPtr();
2758
57
                if ( curModifier.size() == 0 ) {
2759
13.3k
                    for (size_t j = 0; j < 512; j++) {
2760
13.3k
                        curModifier.push_back(1);
2761
13.3k
                    }
2762
31
                } else {
2763
269
                    for (auto& c : curModifier) {
2764
269
                        c++;
2765
269
                    }
2766
31
                }
2767
57
            }
2768
112
        }
2769
2770
158
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
158
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
158
        const auto& result = results.back();
2777
2778
158
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
158
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
158
        if ( options.disableTests == false ) {
2796
158
            tests::test(op, result.second);
2797
158
        }
2798
2799
158
        postprocess(module, op, result);
2800
158
    }
2801
2802
144
    if ( options.noCompare == false ) {
2803
46
        compare(operations, results, data, size);
2804
46
    }
2805
144
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
234
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
234
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
234
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.76k
    do {
2691
1.76k
        auto op = getOp(&parentDs, data, size);
2692
1.76k
        auto module = getModule(parentDs);
2693
1.76k
        if ( module == nullptr ) {
2694
1.54k
            continue;
2695
1.54k
        }
2696
2697
216
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
216
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
1.75k
    } while ( parentDs.Get<bool>() == true );
2704
2705
234
    if ( operations.empty() == true ) {
2706
6
        return;
2707
6
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
228
#if 1
2711
228
    {
2712
228
        std::set<uint64_t> moduleIDs;
2713
228
        for (const auto& m : modules ) {
2714
94
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
94
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
94
            moduleIDs.insert(moduleID);
2722
94
        }
2723
2724
228
        std::set<uint64_t> operationModuleIDs;
2725
228
        for (const auto& op : operations) {
2726
125
            operationModuleIDs.insert(op.first->ID);
2727
125
        }
2728
2729
228
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
228
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
228
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
228
        for (const auto& id : addModuleIDs) {
2734
35
            operations.push_back({ modules.at(id), operations[0].second});
2735
35
        }
2736
228
    }
2737
228
#endif
2738
2739
228
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
228
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
388
    for (size_t i = 0; i < operations.size(); i++) {
2747
160
        auto& operation = operations[i];
2748
2749
160
        auto& module = operation.first;
2750
160
        auto& op = operation.second;
2751
2752
160
        if ( i > 0 ) {
2753
113
            auto& prevModule = operations[i-1].first;
2754
113
            auto& prevOp = operations[i].second;
2755
2756
113
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
59
                auto& curModifier = op.modifier.GetVectorPtr();
2758
59
                if ( curModifier.size() == 0 ) {
2759
19.4k
                    for (size_t j = 0; j < 512; j++) {
2760
19.4k
                        curModifier.push_back(1);
2761
19.4k
                    }
2762
38
                } else {
2763
234
                    for (auto& c : curModifier) {
2764
234
                        c++;
2765
234
                    }
2766
21
                }
2767
59
            }
2768
113
        }
2769
2770
160
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
160
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
160
        const auto& result = results.back();
2777
2778
160
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
160
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
160
        if ( options.disableTests == false ) {
2796
160
            tests::test(op, result.second);
2797
160
        }
2798
2799
160
        postprocess(module, op, result);
2800
160
    }
2801
2802
228
    if ( options.noCompare == false ) {
2803
47
        compare(operations, results, data, size);
2804
47
    }
2805
228
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
173
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
173
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
173
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.31k
    do {
2691
2.31k
        auto op = getOp(&parentDs, data, size);
2692
2.31k
        auto module = getModule(parentDs);
2693
2.31k
        if ( module == nullptr ) {
2694
2.07k
            continue;
2695
2.07k
        }
2696
2697
245
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
245
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
2.30k
    } while ( parentDs.Get<bool>() == true );
2704
2705
173
    if ( operations.empty() == true ) {
2706
8
        return;
2707
8
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
165
#if 1
2711
165
    {
2712
165
        std::set<uint64_t> moduleIDs;
2713
165
        for (const auto& m : modules ) {
2714
78
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
78
            moduleIDs.insert(moduleID);
2722
78
        }
2723
2724
165
        std::set<uint64_t> operationModuleIDs;
2725
165
        for (const auto& op : operations) {
2726
123
            operationModuleIDs.insert(op.first->ID);
2727
123
        }
2728
2729
165
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
165
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
165
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
165
        for (const auto& id : addModuleIDs) {
2734
24
            operations.push_back({ modules.at(id), operations[0].second});
2735
24
        }
2736
165
    }
2737
165
#endif
2738
2739
165
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
165
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
312
    for (size_t i = 0; i < operations.size(); i++) {
2747
147
        auto& operation = operations[i];
2748
2749
147
        auto& module = operation.first;
2750
147
        auto& op = operation.second;
2751
2752
147
        if ( i > 0 ) {
2753
108
            auto& prevModule = operations[i-1].first;
2754
108
            auto& prevOp = operations[i].second;
2755
2756
108
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
59
                auto& curModifier = op.modifier.GetVectorPtr();
2758
59
                if ( curModifier.size() == 0 ) {
2759
13.8k
                    for (size_t j = 0; j < 512; j++) {
2760
13.8k
                        curModifier.push_back(1);
2761
13.8k
                    }
2762
32
                } else {
2763
676
                    for (auto& c : curModifier) {
2764
676
                        c++;
2765
676
                    }
2766
32
                }
2767
59
            }
2768
108
        }
2769
2770
147
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
147
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
147
        const auto& result = results.back();
2777
2778
147
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
147
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
147
        if ( options.disableTests == false ) {
2796
147
            tests::test(op, result.second);
2797
147
        }
2798
2799
147
        postprocess(module, op, result);
2800
147
    }
2801
2802
165
    if ( options.noCompare == false ) {
2803
39
        compare(operations, results, data, size);
2804
39
    }
2805
165
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
165
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
165
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
165
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.06k
    do {
2691
2.06k
        auto op = getOp(&parentDs, data, size);
2692
2.06k
        auto module = getModule(parentDs);
2693
2.06k
        if ( module == nullptr ) {
2694
1.84k
            continue;
2695
1.84k
        }
2696
2697
221
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
221
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.06k
    } while ( parentDs.Get<bool>() == true );
2704
2705
165
    if ( operations.empty() == true ) {
2706
14
        return;
2707
14
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
151
#if 1
2711
151
    {
2712
151
        std::set<uint64_t> moduleIDs;
2713
151
        for (const auto& m : modules ) {
2714
86
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
86
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
86
            moduleIDs.insert(moduleID);
2722
86
        }
2723
2724
151
        std::set<uint64_t> operationModuleIDs;
2725
151
        for (const auto& op : operations) {
2726
128
            operationModuleIDs.insert(op.first->ID);
2727
128
        }
2728
2729
151
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
151
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
151
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
151
        for (const auto& id : addModuleIDs) {
2734
28
            operations.push_back({ modules.at(id), operations[0].second});
2735
28
        }
2736
151
    }
2737
151
#endif
2738
2739
151
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
151
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
307
    for (size_t i = 0; i < operations.size(); i++) {
2747
156
        auto& operation = operations[i];
2748
2749
156
        auto& module = operation.first;
2750
156
        auto& op = operation.second;
2751
2752
156
        if ( i > 0 ) {
2753
113
            auto& prevModule = operations[i-1].first;
2754
113
            auto& prevOp = operations[i].second;
2755
2756
113
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
61
                auto& curModifier = op.modifier.GetVectorPtr();
2758
61
                if ( curModifier.size() == 0 ) {
2759
18.4k
                    for (size_t j = 0; j < 512; j++) {
2760
18.4k
                        curModifier.push_back(1);
2761
18.4k
                    }
2762
36
                } else {
2763
797
                    for (auto& c : curModifier) {
2764
797
                        c++;
2765
797
                    }
2766
25
                }
2767
61
            }
2768
113
        }
2769
2770
156
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
156
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
156
        const auto& result = results.back();
2777
2778
156
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
156
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
156
        if ( options.disableTests == false ) {
2796
156
            tests::test(op, result.second);
2797
156
        }
2798
2799
156
        postprocess(module, op, result);
2800
156
    }
2801
2802
151
    if ( options.noCompare == false ) {
2803
43
        compare(operations, results, data, size);
2804
43
    }
2805
151
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
168
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
168
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
168
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.32k
    do {
2691
2.32k
        auto op = getOp(&parentDs, data, size);
2692
2.32k
        auto module = getModule(parentDs);
2693
2.32k
        if ( module == nullptr ) {
2694
2.06k
            continue;
2695
2.06k
        }
2696
2697
265
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
265
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.32k
    } while ( parentDs.Get<bool>() == true );
2704
2705
168
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
163
#if 1
2711
163
    {
2712
163
        std::set<uint64_t> moduleIDs;
2713
163
        for (const auto& m : modules ) {
2714
98
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
98
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
98
            moduleIDs.insert(moduleID);
2722
98
        }
2723
2724
163
        std::set<uint64_t> operationModuleIDs;
2725
163
        for (const auto& op : operations) {
2726
145
            operationModuleIDs.insert(op.first->ID);
2727
145
        }
2728
2729
163
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
163
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
163
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
163
        for (const auto& id : addModuleIDs) {
2734
34
            operations.push_back({ modules.at(id), operations[0].second});
2735
34
        }
2736
163
    }
2737
163
#endif
2738
2739
163
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
163
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
342
    for (size_t i = 0; i < operations.size(); i++) {
2747
179
        auto& operation = operations[i];
2748
2749
179
        auto& module = operation.first;
2750
179
        auto& op = operation.second;
2751
2752
179
        if ( i > 0 ) {
2753
130
            auto& prevModule = operations[i-1].first;
2754
130
            auto& prevOp = operations[i].second;
2755
2756
130
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
75
                auto& curModifier = op.modifier.GetVectorPtr();
2758
75
                if ( curModifier.size() == 0 ) {
2759
22.5k
                    for (size_t j = 0; j < 512; j++) {
2760
22.5k
                        curModifier.push_back(1);
2761
22.5k
                    }
2762
44
                } else {
2763
566
                    for (auto& c : curModifier) {
2764
566
                        c++;
2765
566
                    }
2766
31
                }
2767
75
            }
2768
130
        }
2769
2770
179
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
179
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
179
        const auto& result = results.back();
2777
2778
179
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
179
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
179
        if ( options.disableTests == false ) {
2796
179
            tests::test(op, result.second);
2797
179
        }
2798
2799
179
        postprocess(module, op, result);
2800
179
    }
2801
2802
163
    if ( options.noCompare == false ) {
2803
49
        compare(operations, results, data, size);
2804
49
    }
2805
163
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
213
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
213
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
213
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.64k
    do {
2691
2.64k
        auto op = getOp(&parentDs, data, size);
2692
2.64k
        auto module = getModule(parentDs);
2693
2.64k
        if ( module == nullptr ) {
2694
2.32k
            continue;
2695
2.32k
        }
2696
2697
319
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
319
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
2.64k
    } while ( parentDs.Get<bool>() == true );
2704
2705
213
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
211
#if 1
2711
211
    {
2712
211
        std::set<uint64_t> moduleIDs;
2713
211
        for (const auto& m : modules ) {
2714
132
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
132
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
132
            moduleIDs.insert(moduleID);
2722
132
        }
2723
2724
211
        std::set<uint64_t> operationModuleIDs;
2725
211
        for (const auto& op : operations) {
2726
157
            operationModuleIDs.insert(op.first->ID);
2727
157
        }
2728
2729
211
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
211
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
211
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
211
        for (const auto& id : addModuleIDs) {
2734
52
            operations.push_back({ modules.at(id), operations[0].second});
2735
52
        }
2736
211
    }
2737
211
#endif
2738
2739
211
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
211
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
420
    for (size_t i = 0; i < operations.size(); i++) {
2747
209
        auto& operation = operations[i];
2748
2749
209
        auto& module = operation.first;
2750
209
        auto& op = operation.second;
2751
2752
209
        if ( i > 0 ) {
2753
143
            auto& prevModule = operations[i-1].first;
2754
143
            auto& prevOp = operations[i].second;
2755
2756
143
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
71
                auto& curModifier = op.modifier.GetVectorPtr();
2758
71
                if ( curModifier.size() == 0 ) {
2759
23.0k
                    for (size_t j = 0; j < 512; j++) {
2760
23.0k
                        curModifier.push_back(1);
2761
23.0k
                    }
2762
45
                } else {
2763
492
                    for (auto& c : curModifier) {
2764
492
                        c++;
2765
492
                    }
2766
26
                }
2767
71
            }
2768
143
        }
2769
2770
209
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
209
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
209
        const auto& result = results.back();
2777
2778
209
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
209
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
209
        if ( options.disableTests == false ) {
2796
209
            tests::test(op, result.second);
2797
209
        }
2798
2799
209
        postprocess(module, op, result);
2800
209
    }
2801
2802
211
    if ( options.noCompare == false ) {
2803
66
        compare(operations, results, data, size);
2804
66
    }
2805
211
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
169
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
169
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
169
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.17k
    do {
2691
3.17k
        auto op = getOp(&parentDs, data, size);
2692
3.17k
        auto module = getModule(parentDs);
2693
3.17k
        if ( module == nullptr ) {
2694
2.91k
            continue;
2695
2.91k
        }
2696
2697
257
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
257
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
3.16k
    } while ( parentDs.Get<bool>() == true );
2704
2705
169
    if ( operations.empty() == true ) {
2706
10
        return;
2707
10
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
159
#if 1
2711
159
    {
2712
159
        std::set<uint64_t> moduleIDs;
2713
159
        for (const auto& m : modules ) {
2714
108
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
108
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
108
            moduleIDs.insert(moduleID);
2722
108
        }
2723
2724
159
        std::set<uint64_t> operationModuleIDs;
2725
159
        for (const auto& op : operations) {
2726
138
            operationModuleIDs.insert(op.first->ID);
2727
138
        }
2728
2729
159
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
159
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
159
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
159
        for (const auto& id : addModuleIDs) {
2734
40
            operations.push_back({ modules.at(id), operations[0].second});
2735
40
        }
2736
159
    }
2737
159
#endif
2738
2739
159
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
159
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
337
    for (size_t i = 0; i < operations.size(); i++) {
2747
178
        auto& operation = operations[i];
2748
2749
178
        auto& module = operation.first;
2750
178
        auto& op = operation.second;
2751
2752
178
        if ( i > 0 ) {
2753
124
            auto& prevModule = operations[i-1].first;
2754
124
            auto& prevOp = operations[i].second;
2755
2756
124
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
63
                auto& curModifier = op.modifier.GetVectorPtr();
2758
63
                if ( curModifier.size() == 0 ) {
2759
13.8k
                    for (size_t j = 0; j < 512; j++) {
2760
13.8k
                        curModifier.push_back(1);
2761
13.8k
                    }
2762
36
                } else {
2763
465
                    for (auto& c : curModifier) {
2764
465
                        c++;
2765
465
                    }
2766
36
                }
2767
63
            }
2768
124
        }
2769
2770
178
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
178
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
178
        const auto& result = results.back();
2777
2778
178
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
178
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
178
        if ( options.disableTests == false ) {
2796
178
            tests::test(op, result.second);
2797
178
        }
2798
2799
178
        postprocess(module, op, result);
2800
178
    }
2801
2802
159
    if ( options.noCompare == false ) {
2803
54
        compare(operations, results, data, size);
2804
54
    }
2805
159
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
203
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
203
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
203
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.46k
    do {
2691
2.46k
        auto op = getOp(&parentDs, data, size);
2692
2.46k
        auto module = getModule(parentDs);
2693
2.46k
        if ( module == nullptr ) {
2694
2.16k
            continue;
2695
2.16k
        }
2696
2697
300
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
300
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
2.45k
    } while ( parentDs.Get<bool>() == true );
2704
2705
203
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
198
#if 1
2711
198
    {
2712
198
        std::set<uint64_t> moduleIDs;
2713
198
        for (const auto& m : modules ) {
2714
164
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
164
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
164
            moduleIDs.insert(moduleID);
2722
164
        }
2723
2724
198
        std::set<uint64_t> operationModuleIDs;
2725
198
        for (const auto& op : operations) {
2726
180
            operationModuleIDs.insert(op.first->ID);
2727
180
        }
2728
2729
198
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
198
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
198
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
198
        for (const auto& id : addModuleIDs) {
2734
68
            operations.push_back({ modules.at(id), operations[0].second});
2735
68
        }
2736
198
    }
2737
198
#endif
2738
2739
198
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
198
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
446
    for (size_t i = 0; i < operations.size(); i++) {
2747
248
        auto& operation = operations[i];
2748
2749
248
        auto& module = operation.first;
2750
248
        auto& op = operation.second;
2751
2752
248
        if ( i > 0 ) {
2753
166
            auto& prevModule = operations[i-1].first;
2754
166
            auto& prevOp = operations[i].second;
2755
2756
166
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
76
                auto& curModifier = op.modifier.GetVectorPtr();
2758
76
                if ( curModifier.size() == 0 ) {
2759
21.5k
                    for (size_t j = 0; j < 512; j++) {
2760
21.5k
                        curModifier.push_back(1);
2761
21.5k
                    }
2762
42
                } else {
2763
249
                    for (auto& c : curModifier) {
2764
249
                        c++;
2765
249
                    }
2766
34
                }
2767
76
            }
2768
166
        }
2769
2770
248
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
248
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
248
        const auto& result = results.back();
2777
2778
248
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
248
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
248
        if ( options.disableTests == false ) {
2796
248
            tests::test(op, result.second);
2797
248
        }
2798
2799
248
        postprocess(module, op, result);
2800
248
    }
2801
2802
198
    if ( options.noCompare == false ) {
2803
82
        compare(operations, results, data, size);
2804
82
    }
2805
198
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
178
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
178
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
178
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.83k
    do {
2691
1.83k
        auto op = getOp(&parentDs, data, size);
2692
1.83k
        auto module = getModule(parentDs);
2693
1.83k
        if ( module == nullptr ) {
2694
1.59k
            continue;
2695
1.59k
        }
2696
2697
240
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
240
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
1.83k
    } while ( parentDs.Get<bool>() == true );
2704
2705
178
    if ( operations.empty() == true ) {
2706
10
        return;
2707
10
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
168
#if 1
2711
168
    {
2712
168
        std::set<uint64_t> moduleIDs;
2713
168
        for (const auto& m : modules ) {
2714
92
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
92
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
92
            moduleIDs.insert(moduleID);
2722
92
        }
2723
2724
168
        std::set<uint64_t> operationModuleIDs;
2725
168
        for (const auto& op : operations) {
2726
120
            operationModuleIDs.insert(op.first->ID);
2727
120
        }
2728
2729
168
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
168
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
168
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
168
        for (const auto& id : addModuleIDs) {
2734
32
            operations.push_back({ modules.at(id), operations[0].second});
2735
32
        }
2736
168
    }
2737
168
#endif
2738
2739
168
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
168
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
320
    for (size_t i = 0; i < operations.size(); i++) {
2747
152
        auto& operation = operations[i];
2748
2749
152
        auto& module = operation.first;
2750
152
        auto& op = operation.second;
2751
2752
152
        if ( i > 0 ) {
2753
106
            auto& prevModule = operations[i-1].first;
2754
106
            auto& prevOp = operations[i].second;
2755
2756
106
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
53
                auto& curModifier = op.modifier.GetVectorPtr();
2758
53
                if ( curModifier.size() == 0 ) {
2759
16.4k
                    for (size_t j = 0; j < 512; j++) {
2760
16.3k
                        curModifier.push_back(1);
2761
16.3k
                    }
2762
32
                } else {
2763
362
                    for (auto& c : curModifier) {
2764
362
                        c++;
2765
362
                    }
2766
21
                }
2767
53
            }
2768
106
        }
2769
2770
152
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
152
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
152
        const auto& result = results.back();
2777
2778
152
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
152
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
152
        if ( options.disableTests == false ) {
2796
152
            tests::test(op, result.second);
2797
152
        }
2798
2799
152
        postprocess(module, op, result);
2800
152
    }
2801
2802
168
    if ( options.noCompare == false ) {
2803
46
        compare(operations, results, data, size);
2804
46
    }
2805
168
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
245
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
245
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
245
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.03k
    do {
2691
3.03k
        auto op = getOp(&parentDs, data, size);
2692
3.03k
        auto module = getModule(parentDs);
2693
3.03k
        if ( module == nullptr ) {
2694
2.70k
            continue;
2695
2.70k
        }
2696
2697
325
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
325
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
3.02k
    } while ( parentDs.Get<bool>() == true );
2704
2705
245
    if ( operations.empty() == true ) {
2706
11
        return;
2707
11
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
234
#if 1
2711
234
    {
2712
234
        std::set<uint64_t> moduleIDs;
2713
234
        for (const auto& m : modules ) {
2714
172
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
172
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
172
            moduleIDs.insert(moduleID);
2722
172
        }
2723
2724
234
        std::set<uint64_t> operationModuleIDs;
2725
234
        for (const auto& op : operations) {
2726
188
            operationModuleIDs.insert(op.first->ID);
2727
188
        }
2728
2729
234
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
234
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
234
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
234
        for (const auto& id : addModuleIDs) {
2734
73
            operations.push_back({ modules.at(id), operations[0].second});
2735
73
        }
2736
234
    }
2737
234
#endif
2738
2739
234
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
234
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
495
    for (size_t i = 0; i < operations.size(); i++) {
2747
261
        auto& operation = operations[i];
2748
2749
261
        auto& module = operation.first;
2750
261
        auto& op = operation.second;
2751
2752
261
        if ( i > 0 ) {
2753
175
            auto& prevModule = operations[i-1].first;
2754
175
            auto& prevOp = operations[i].second;
2755
2756
175
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
83
                auto& curModifier = op.modifier.GetVectorPtr();
2758
83
                if ( curModifier.size() == 0 ) {
2759
28.2k
                    for (size_t j = 0; j < 512; j++) {
2760
28.1k
                        curModifier.push_back(1);
2761
28.1k
                    }
2762
55
                } else {
2763
319
                    for (auto& c : curModifier) {
2764
319
                        c++;
2765
319
                    }
2766
28
                }
2767
83
            }
2768
175
        }
2769
2770
261
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
261
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
261
        const auto& result = results.back();
2777
2778
261
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
261
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
261
        if ( options.disableTests == false ) {
2796
261
            tests::test(op, result.second);
2797
261
        }
2798
2799
261
        postprocess(module, op, result);
2800
261
    }
2801
2802
234
    if ( options.noCompare == false ) {
2803
86
        compare(operations, results, data, size);
2804
86
    }
2805
234
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
168
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
168
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
168
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.77k
    do {
2691
2.77k
        auto op = getOp(&parentDs, data, size);
2692
2.77k
        auto module = getModule(parentDs);
2693
2.77k
        if ( module == nullptr ) {
2694
2.45k
            continue;
2695
2.45k
        }
2696
2697
328
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
328
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
2.77k
    } while ( parentDs.Get<bool>() == true );
2704
2705
168
    if ( operations.empty() == true ) {
2706
1
        return;
2707
1
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
167
#if 1
2711
167
    {
2712
167
        std::set<uint64_t> moduleIDs;
2713
167
        for (const auto& m : modules ) {
2714
152
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
152
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
152
            moduleIDs.insert(moduleID);
2722
152
        }
2723
2724
167
        std::set<uint64_t> operationModuleIDs;
2725
189
        for (const auto& op : operations) {
2726
189
            operationModuleIDs.insert(op.first->ID);
2727
189
        }
2728
2729
167
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
167
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
167
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
167
        for (const auto& id : addModuleIDs) {
2734
63
            operations.push_back({ modules.at(id), operations[0].second});
2735
63
        }
2736
167
    }
2737
167
#endif
2738
2739
167
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
167
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
419
    for (size_t i = 0; i < operations.size(); i++) {
2747
252
        auto& operation = operations[i];
2748
2749
252
        auto& module = operation.first;
2750
252
        auto& op = operation.second;
2751
2752
252
        if ( i > 0 ) {
2753
176
            auto& prevModule = operations[i-1].first;
2754
176
            auto& prevOp = operations[i].second;
2755
2756
176
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
94
                auto& curModifier = op.modifier.GetVectorPtr();
2758
94
                if ( curModifier.size() == 0 ) {
2759
25.1k
                    for (size_t j = 0; j < 512; j++) {
2760
25.0k
                        curModifier.push_back(1);
2761
25.0k
                    }
2762
49
                } else {
2763
274
                    for (auto& c : curModifier) {
2764
274
                        c++;
2765
274
                    }
2766
45
                }
2767
94
            }
2768
176
        }
2769
2770
252
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
252
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
252
        const auto& result = results.back();
2777
2778
252
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
252
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
252
        if ( options.disableTests == false ) {
2796
252
            tests::test(op, result.second);
2797
252
        }
2798
2799
252
        postprocess(module, op, result);
2800
252
    }
2801
2802
167
    if ( options.noCompare == false ) {
2803
76
        compare(operations, results, data, size);
2804
76
    }
2805
167
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
254
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
254
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
254
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.49k
    do {
2691
3.49k
        auto op = getOp(&parentDs, data, size);
2692
3.49k
        auto module = getModule(parentDs);
2693
3.49k
        if ( module == nullptr ) {
2694
3.13k
            continue;
2695
3.13k
        }
2696
2697
354
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
354
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
10
            break;
2702
10
        }
2703
3.48k
    } while ( parentDs.Get<bool>() == true );
2704
2705
254
    if ( operations.empty() == true ) {
2706
8
        return;
2707
8
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
246
#if 1
2711
246
    {
2712
246
        std::set<uint64_t> moduleIDs;
2713
246
        for (const auto& m : modules ) {
2714
180
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
180
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
180
            moduleIDs.insert(moduleID);
2722
180
        }
2723
2724
246
        std::set<uint64_t> operationModuleIDs;
2725
246
        for (const auto& op : operations) {
2726
212
            operationModuleIDs.insert(op.first->ID);
2727
212
        }
2728
2729
246
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
246
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
246
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
246
        for (const auto& id : addModuleIDs) {
2734
75
            operations.push_back({ modules.at(id), operations[0].second});
2735
75
        }
2736
246
    }
2737
246
#endif
2738
2739
246
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
246
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
533
    for (size_t i = 0; i < operations.size(); i++) {
2747
287
        auto& operation = operations[i];
2748
2749
287
        auto& module = operation.first;
2750
287
        auto& op = operation.second;
2751
2752
287
        if ( i > 0 ) {
2753
197
            auto& prevModule = operations[i-1].first;
2754
197
            auto& prevOp = operations[i].second;
2755
2756
197
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
101
                auto& curModifier = op.modifier.GetVectorPtr();
2758
101
                if ( curModifier.size() == 0 ) {
2759
32.8k
                    for (size_t j = 0; j < 512; j++) {
2760
32.7k
                        curModifier.push_back(1);
2761
32.7k
                    }
2762
64
                } else {
2763
742
                    for (auto& c : curModifier) {
2764
742
                        c++;
2765
742
                    }
2766
37
                }
2767
101
            }
2768
197
        }
2769
2770
287
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
287
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
287
        const auto& result = results.back();
2777
2778
287
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
287
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
287
        if ( options.disableTests == false ) {
2796
287
            tests::test(op, result.second);
2797
287
        }
2798
2799
287
        postprocess(module, op, result);
2800
287
    }
2801
2802
246
    if ( options.noCompare == false ) {
2803
90
        compare(operations, results, data, size);
2804
90
    }
2805
246
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
201
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
201
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
201
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.85k
    do {
2691
2.85k
        auto op = getOp(&parentDs, data, size);
2692
2.85k
        auto module = getModule(parentDs);
2693
2.85k
        if ( module == nullptr ) {
2694
2.57k
            continue;
2695
2.57k
        }
2696
2697
284
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
284
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.85k
    } while ( parentDs.Get<bool>() == true );
2704
2705
201
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
196
#if 1
2711
196
    {
2712
196
        std::set<uint64_t> moduleIDs;
2713
196
        for (const auto& m : modules ) {
2714
156
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
156
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
156
            moduleIDs.insert(moduleID);
2722
156
        }
2723
2724
196
        std::set<uint64_t> operationModuleIDs;
2725
196
        for (const auto& op : operations) {
2726
163
            operationModuleIDs.insert(op.first->ID);
2727
163
        }
2728
2729
196
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
196
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
196
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
196
        for (const auto& id : addModuleIDs) {
2734
66
            operations.push_back({ modules.at(id), operations[0].second});
2735
66
        }
2736
196
    }
2737
196
#endif
2738
2739
196
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
196
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
425
    for (size_t i = 0; i < operations.size(); i++) {
2747
229
        auto& operation = operations[i];
2748
2749
229
        auto& module = operation.first;
2750
229
        auto& op = operation.second;
2751
2752
229
        if ( i > 0 ) {
2753
151
            auto& prevModule = operations[i-1].first;
2754
151
            auto& prevOp = operations[i].second;
2755
2756
151
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
67
                auto& curModifier = op.modifier.GetVectorPtr();
2758
67
                if ( curModifier.size() == 0 ) {
2759
22.5k
                    for (size_t j = 0; j < 512; j++) {
2760
22.5k
                        curModifier.push_back(1);
2761
22.5k
                    }
2762
44
                } else {
2763
518
                    for (auto& c : curModifier) {
2764
518
                        c++;
2765
518
                    }
2766
23
                }
2767
67
            }
2768
151
        }
2769
2770
229
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
229
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
229
        const auto& result = results.back();
2777
2778
229
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
229
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
229
        if ( options.disableTests == false ) {
2796
229
            tests::test(op, result.second);
2797
229
        }
2798
2799
229
        postprocess(module, op, result);
2800
229
    }
2801
2802
196
    if ( options.noCompare == false ) {
2803
78
        compare(operations, results, data, size);
2804
78
    }
2805
196
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
245
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
245
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
245
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.30k
    do {
2691
2.30k
        auto op = getOp(&parentDs, data, size);
2692
2.30k
        auto module = getModule(parentDs);
2693
2.30k
        if ( module == nullptr ) {
2694
1.89k
            continue;
2695
1.89k
        }
2696
2697
412
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
412
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
9
            break;
2702
9
        }
2703
2.29k
    } while ( parentDs.Get<bool>() == true );
2704
2705
245
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
238
#if 1
2711
238
    {
2712
238
        std::set<uint64_t> moduleIDs;
2713
238
        for (const auto& m : modules ) {
2714
158
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
158
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
158
            moduleIDs.insert(moduleID);
2722
158
        }
2723
2724
238
        std::set<uint64_t> operationModuleIDs;
2725
238
        for (const auto& op : operations) {
2726
218
            operationModuleIDs.insert(op.first->ID);
2727
218
        }
2728
2729
238
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
238
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
238
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
238
        for (const auto& id : addModuleIDs) {
2734
63
            operations.push_back({ modules.at(id), operations[0].second});
2735
63
        }
2736
238
    }
2737
238
#endif
2738
2739
238
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
238
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
519
    for (size_t i = 0; i < operations.size(); i++) {
2747
281
        auto& operation = operations[i];
2748
2749
281
        auto& module = operation.first;
2750
281
        auto& op = operation.second;
2751
2752
281
        if ( i > 0 ) {
2753
202
            auto& prevModule = operations[i-1].first;
2754
202
            auto& prevOp = operations[i].second;
2755
2756
202
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
116
                auto& curModifier = op.modifier.GetVectorPtr();
2758
116
                if ( curModifier.size() == 0 ) {
2759
38.4k
                    for (size_t j = 0; j < 512; j++) {
2760
38.4k
                        curModifier.push_back(1);
2761
38.4k
                    }
2762
75
                } else {
2763
337
                    for (auto& c : curModifier) {
2764
337
                        c++;
2765
337
                    }
2766
41
                }
2767
116
            }
2768
202
        }
2769
2770
281
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
281
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
281
        const auto& result = results.back();
2777
2778
281
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
281
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
281
        if ( options.disableTests == false ) {
2796
281
            tests::test(op, result.second);
2797
281
        }
2798
2799
281
        postprocess(module, op, result);
2800
281
    }
2801
2802
238
    if ( options.noCompare == false ) {
2803
79
        compare(operations, results, data, size);
2804
79
    }
2805
238
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
210
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
210
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
210
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.27k
    do {
2691
2.27k
        auto op = getOp(&parentDs, data, size);
2692
2.27k
        auto module = getModule(parentDs);
2693
2.27k
        if ( module == nullptr ) {
2694
2.05k
            continue;
2695
2.05k
        }
2696
2697
213
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
213
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
2.26k
    } while ( parentDs.Get<bool>() == true );
2704
2705
210
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
206
#if 1
2711
206
    {
2712
206
        std::set<uint64_t> moduleIDs;
2713
206
        for (const auto& m : modules ) {
2714
74
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
74
            moduleIDs.insert(moduleID);
2722
74
        }
2723
2724
206
        std::set<uint64_t> operationModuleIDs;
2725
206
        for (const auto& op : operations) {
2726
107
            operationModuleIDs.insert(op.first->ID);
2727
107
        }
2728
2729
206
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
206
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
206
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
206
        for (const auto& id : addModuleIDs) {
2734
25
            operations.push_back({ modules.at(id), operations[0].second});
2735
25
        }
2736
206
    }
2737
206
#endif
2738
2739
206
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
206
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
338
    for (size_t i = 0; i < operations.size(); i++) {
2747
132
        auto& operation = operations[i];
2748
2749
132
        auto& module = operation.first;
2750
132
        auto& op = operation.second;
2751
2752
132
        if ( i > 0 ) {
2753
95
            auto& prevModule = operations[i-1].first;
2754
95
            auto& prevOp = operations[i].second;
2755
2756
95
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
50
                auto& curModifier = op.modifier.GetVectorPtr();
2758
50
                if ( curModifier.size() == 0 ) {
2759
13.8k
                    for (size_t j = 0; j < 512; j++) {
2760
13.8k
                        curModifier.push_back(1);
2761
13.8k
                    }
2762
27
                } else {
2763
249
                    for (auto& c : curModifier) {
2764
249
                        c++;
2765
249
                    }
2766
23
                }
2767
50
            }
2768
95
        }
2769
2770
132
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
132
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
132
        const auto& result = results.back();
2777
2778
132
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
132
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
132
        if ( options.disableTests == false ) {
2796
132
            tests::test(op, result.second);
2797
132
        }
2798
2799
132
        postprocess(module, op, result);
2800
132
    }
2801
2802
206
    if ( options.noCompare == false ) {
2803
37
        compare(operations, results, data, size);
2804
37
    }
2805
206
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
200
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
200
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
200
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.95k
    do {
2691
2.95k
        auto op = getOp(&parentDs, data, size);
2692
2.95k
        auto module = getModule(parentDs);
2693
2.95k
        if ( module == nullptr ) {
2694
2.65k
            continue;
2695
2.65k
        }
2696
2697
305
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
305
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
9
            break;
2702
9
        }
2703
2.94k
    } while ( parentDs.Get<bool>() == true );
2704
2705
200
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
196
#if 1
2711
196
    {
2712
196
        std::set<uint64_t> moduleIDs;
2713
196
        for (const auto& m : modules ) {
2714
92
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
92
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
92
            moduleIDs.insert(moduleID);
2722
92
        }
2723
2724
196
        std::set<uint64_t> operationModuleIDs;
2725
196
        for (const auto& op : operations) {
2726
138
            operationModuleIDs.insert(op.first->ID);
2727
138
        }
2728
2729
196
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
196
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
196
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
196
        for (const auto& id : addModuleIDs) {
2734
32
            operations.push_back({ modules.at(id), operations[0].second});
2735
32
        }
2736
196
    }
2737
196
#endif
2738
2739
196
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
196
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
366
    for (size_t i = 0; i < operations.size(); i++) {
2747
170
        auto& operation = operations[i];
2748
2749
170
        auto& module = operation.first;
2750
170
        auto& op = operation.second;
2751
2752
170
        if ( i > 0 ) {
2753
124
            auto& prevModule = operations[i-1].first;
2754
124
            auto& prevOp = operations[i].second;
2755
2756
124
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
72
                auto& curModifier = op.modifier.GetVectorPtr();
2758
72
                if ( curModifier.size() == 0 ) {
2759
20.0k
                    for (size_t j = 0; j < 512; j++) {
2760
19.9k
                        curModifier.push_back(1);
2761
19.9k
                    }
2762
39
                } else {
2763
315
                    for (auto& c : curModifier) {
2764
315
                        c++;
2765
315
                    }
2766
33
                }
2767
72
            }
2768
124
        }
2769
2770
170
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
170
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
170
        const auto& result = results.back();
2777
2778
170
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
170
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
170
        if ( options.disableTests == false ) {
2796
170
            tests::test(op, result.second);
2797
170
        }
2798
2799
170
        postprocess(module, op, result);
2800
170
    }
2801
2802
196
    if ( options.noCompare == false ) {
2803
46
        compare(operations, results, data, size);
2804
46
    }
2805
196
}
2806
2807
/* Explicit template instantiation */
2808
template class ExecutorBase<component::Digest, operation::Digest>;
2809
template class ExecutorBase<component::MAC, operation::HMAC>;
2810
template class ExecutorBase<component::MAC, operation::UMAC>;
2811
template class ExecutorBase<component::MAC, operation::CMAC>;
2812
template class ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>;
2813
template class ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>;
2814
template class ExecutorBase<component::Key, operation::KDF_SCRYPT>;
2815
template class ExecutorBase<component::Key, operation::KDF_HKDF>;
2816
template class ExecutorBase<component::Key, operation::KDF_TLS1_PRF>;
2817
template class ExecutorBase<component::Key, operation::KDF_PBKDF>;
2818
template class ExecutorBase<component::Key, operation::KDF_PBKDF1>;
2819
template class ExecutorBase<component::Key, operation::KDF_PBKDF2>;
2820
template class ExecutorBase<component::Key, operation::KDF_ARGON2>;
2821
template class ExecutorBase<component::Key, operation::KDF_SSH>;
2822
template class ExecutorBase<component::Key, operation::KDF_X963>;
2823
template class ExecutorBase<component::Key, operation::KDF_BCRYPT>;
2824
template class ExecutorBase<component::Key, operation::KDF_SP_800_108>;
2825
template class ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>;
2826
template class ExecutorBase<bool, operation::ECC_ValidatePubkey>;
2827
template class ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>;
2828
template class ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>;
2829
template class ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>;
2830
template class ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>;
2831
template class ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>;
2832
template class ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>;
2833
template class ExecutorBase<bool, operation::ECCSI_Verify>;
2834
template class ExecutorBase<bool, operation::ECDSA_Verify>;
2835
template class ExecutorBase<bool, operation::ECGDSA_Verify>;
2836
template class ExecutorBase<bool, operation::ECRDSA_Verify>;
2837
template class ExecutorBase<bool, operation::Schnorr_Verify>;
2838
template class ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>;
2839
template class ExecutorBase<bool, operation::DSA_Verify>;
2840
template class ExecutorBase<component::DSA_Signature, operation::DSA_Sign>;
2841
template class ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>;
2842
template class ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>;
2843
template class ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>;
2844
template class ExecutorBase<component::Secret, operation::ECDH_Derive>;
2845
template class ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>;
2846
template class ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>;
2847
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>;
2848
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>;
2849
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>;
2850
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>;
2851
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>;
2852
template class ExecutorBase<bool, operation::ECC_Point_Cmp>;
2853
template class ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>;
2854
template class ExecutorBase<component::Bignum, operation::DH_Derive>;
2855
template class ExecutorBase<component::Bignum, operation::BignumCalc>;
2856
template class ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>;
2857
template class ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>;
2858
template class ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>;
2859
template class ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>;
2860
template class ExecutorBase<component::BLS_Signature, operation::BLS_Sign>;
2861
template class ExecutorBase<bool, operation::BLS_Verify>;
2862
template class ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>;
2863
template class ExecutorBase<bool, operation::BLS_BatchVerify>;
2864
template class ExecutorBase<component::G1, operation::BLS_Aggregate_G1>;
2865
template class ExecutorBase<component::G2, operation::BLS_Aggregate_G2>;
2866
template class ExecutorBase<component::Fp12, operation::BLS_Pairing>;
2867
template class ExecutorBase<component::Fp12, operation::BLS_MillerLoop>;
2868
template class ExecutorBase<component::Fp12, operation::BLS_FinalExp>;
2869
template class ExecutorBase<component::G1, operation::BLS_HashToG1>;
2870
template class ExecutorBase<component::G2, operation::BLS_HashToG2>;
2871
template class ExecutorBase<component::G1, operation::BLS_MapToG1>;
2872
template class ExecutorBase<component::G2, operation::BLS_MapToG2>;
2873
template class ExecutorBase<bool, operation::BLS_IsG1OnCurve>;
2874
template class ExecutorBase<bool, operation::BLS_IsG2OnCurve>;
2875
template class ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>;
2876
template class ExecutorBase<component::G1, operation::BLS_Decompress_G1>;
2877
template class ExecutorBase<component::Bignum, operation::BLS_Compress_G1>;
2878
template class ExecutorBase<component::G2, operation::BLS_Decompress_G2>;
2879
template class ExecutorBase<component::G1, operation::BLS_Compress_G2>;
2880
template class ExecutorBase<component::G1, operation::BLS_G1_Add>;
2881
template class ExecutorBase<component::G1, operation::BLS_G1_Mul>;
2882
template class ExecutorBase<bool, operation::BLS_G1_IsEq>;
2883
template class ExecutorBase<component::G1, operation::BLS_G1_Neg>;
2884
template class ExecutorBase<component::G2, operation::BLS_G2_Add>;
2885
template class ExecutorBase<component::G2, operation::BLS_G2_Mul>;
2886
template class ExecutorBase<bool, operation::BLS_G2_IsEq>;
2887
template class ExecutorBase<component::G2, operation::BLS_G2_Neg>;
2888
template class ExecutorBase<component::G1, operation::BLS_G1_MultiExp>;
2889
template class ExecutorBase<Buffer, operation::Misc>;
2890
template class ExecutorBase<bool, operation::SR25519_Verify>;
2891
2892
} /* namespace cryptofuzz */