Coverage Report

Created: 2023-09-25 06:33

/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
19.8k
#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
1.23k
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
1.23k
    (void)module;
53
1.23k
    (void)op;
54
55
1.23k
    if ( result.second != std::nullopt ) {
56
664
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
664
    }
58
1.23k
}
59
60
1.23k
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
1.23k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
1.23k
    return module->OpDigest(op);
64
1.23k
}
65
66
/* Specialization for operation::HMAC */
67
731
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
731
    (void)module;
69
731
    (void)op;
70
71
731
    if ( result.second != std::nullopt ) {
72
297
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
297
    }
74
731
}
75
76
731
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
731
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
731
    return module->OpHMAC(op);
80
731
}
81
82
/* Specialization for operation::UMAC */
83
759
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
759
    (void)module;
85
759
    (void)op;
86
87
759
    if ( result.second != std::nullopt ) {
88
368
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
368
    }
90
759
}
91
92
759
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
759
    return module->OpUMAC(op);
94
759
}
95
96
/* Specialization for operation::CMAC */
97
673
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
673
    (void)module;
99
673
    (void)op;
100
101
673
    if ( result.second != std::nullopt ) {
102
284
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
284
    }
104
673
}
105
106
673
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
673
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
673
    return module->OpCMAC(op);
110
673
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
3.59k
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
3.59k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
3.59k
    if ( result.second != std::nullopt ) {
119
1.16k
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
1.16k
        if ( result.second->tag != std::nullopt ) {
121
479
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
479
        }
123
1.16k
    }
124
125
3.59k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
1.06k
        using fuzzing::datasource::ID;
127
128
1.06k
        bool tryDecrypt = true;
129
130
1.06k
        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
1.06k
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
1.06k
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
1.06k
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
1.06k
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
1.06k
                    op.cleartext.GetSize() + 32,
171
172
1.06k
                    op.aad,
173
174
                    /* Empty modifier */
175
1.06k
                    {});
176
177
1.06k
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
1.06k
            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
1.06k
            } 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
1.06k
        }
208
1.06k
    }
209
3.59k
}
210
211
3.59k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
3.59k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
3.59k
    return module->OpSymmetricEncrypt(op);
215
3.59k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
1.91k
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
1.91k
    (void)module;
220
1.91k
    (void)op;
221
222
1.91k
    if ( result.second != std::nullopt ) {
223
212
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
212
    }
225
1.91k
}
226
227
1.91k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
1.91k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
1.91k
    return module->OpSymmetricDecrypt(op);
231
1.91k
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
153
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
153
    (void)module;
236
153
    (void)op;
237
238
153
    if ( result.second != std::nullopt ) {
239
54
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
54
    }
241
153
}
242
243
153
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
153
    return module->OpKDF_SCRYPT(op);
245
153
}
246
247
/* Specialization for operation::KDF_HKDF */
248
930
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
930
    (void)module;
250
930
    (void)op;
251
252
930
    if ( result.second != std::nullopt ) {
253
515
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
515
    }
255
930
}
256
257
930
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
930
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
930
    return module->OpKDF_HKDF(op);
261
930
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
161
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
161
    (void)module;
266
161
    (void)op;
267
268
161
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
161
}
272
273
161
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
161
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
161
    return module->OpKDF_PBKDF(op);
277
161
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
99
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
99
    (void)module;
282
99
    (void)op;
283
284
99
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
99
}
288
289
99
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
99
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
99
    return module->OpKDF_PBKDF1(op);
293
99
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
443
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
443
    (void)module;
298
443
    (void)op;
299
300
443
    if ( result.second != std::nullopt ) {
301
149
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
149
    }
303
443
}
304
305
443
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
443
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
443
    return module->OpKDF_PBKDF2(op);
309
443
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
305
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
305
    (void)module;
314
305
    (void)op;
315
316
305
    if ( result.second != std::nullopt ) {
317
148
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
148
    }
319
305
}
320
321
305
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
305
    return module->OpKDF_ARGON2(op);
323
305
}
324
325
/* Specialization for operation::KDF_SSH */
326
97
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
97
    (void)module;
328
97
    (void)op;
329
330
97
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
97
}
334
335
97
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
97
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
97
    return module->OpKDF_SSH(op);
339
97
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
134
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
134
    (void)module;
344
134
    (void)op;
345
346
134
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
134
}
350
351
134
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
134
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
134
    return module->OpKDF_TLS1_PRF(op);
355
134
}
356
357
/* Specialization for operation::KDF_X963 */
358
113
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
113
    (void)module;
360
113
    (void)op;
361
362
113
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
113
}
366
367
113
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
113
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
113
    return module->OpKDF_X963(op);
371
113
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
64
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
64
    (void)module;
376
64
    (void)op;
377
378
64
    if ( result.second != std::nullopt ) {
379
20
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
20
    }
381
64
}
382
383
64
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
64
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
64
    return module->OpKDF_BCRYPT(op);
387
64
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
366
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
366
    (void)module;
392
366
    (void)op;
393
394
366
    if ( result.second != std::nullopt ) {
395
163
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
163
    }
397
366
}
398
399
366
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
366
    if ( op.mech.mode == true ) {
401
189
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
189
    }
403
404
366
    return module->OpKDF_SP_800_108(op);
405
366
}
406
407
408
/* Specialization for operation::ECC_PrivateToPublic */
409
556
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
556
    (void)module;
411
412
556
    if ( result.second != std::nullopt  ) {
413
173
        const auto curveID = op.curveType.Get();
414
173
        const auto privkey = op.priv.ToTrimmedString();
415
173
        const auto pub_x = result.second->first.ToTrimmedString();
416
173
        const auto pub_y = result.second->second.ToTrimmedString();
417
418
173
        Pool_CurvePrivkey.Set({ curveID, privkey });
419
173
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
420
173
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
421
422
173
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
423
173
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
424
173
    }
425
556
}
426
427
556
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
556
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
429
430
556
    const size_t size = op.priv.ToTrimmedString().size();
431
432
556
    if ( size == 0 || size > 4096 ) {
433
2
        return std::nullopt;
434
2
    }
435
436
554
    return module->OpECC_PrivateToPublic(op);
437
556
}
438
439
/* Specialization for operation::ECC_ValidatePubkey */
440
188
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
188
    (void)module;
442
188
    (void)op;
443
188
    (void)result;
444
188
}
445
446
188
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
447
188
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
448
449
188
    return module->OpECC_ValidatePubkey(op);
450
188
}
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
15
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
15
    (void)operations;
458
15
    (void)results;
459
15
    (void)data;
460
15
    (void)size;
461
15
}
462
463
304
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
304
    (void)module;
465
466
304
    if ( result.second != std::nullopt  ) {
467
57
        const auto curveID = op.curveType.Get();
468
57
        const auto privkey = result.second->priv.ToTrimmedString();
469
57
        const auto pub_x = result.second->pub.first.ToTrimmedString();
470
57
        const auto pub_y = result.second->pub.second.ToTrimmedString();
471
472
57
        Pool_CurvePrivkey.Set({ curveID, privkey });
473
57
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
474
57
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
475
57
    }
476
304
}
477
478
304
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
304
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
480
481
304
    return module->OpECC_GenerateKeyPair(op);
482
304
}
483
484
/* Specialization for operation::ECCSI_Sign */
485
48
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
48
    (void)module;
487
488
48
    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
48
}
531
532
48
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
48
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
534
48
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
535
536
48
    const size_t size = op.priv.ToTrimmedString().size();
537
538
48
    if ( size == 0 || size > 4096 ) {
539
0
        return std::nullopt;
540
0
    }
541
542
48
    return module->OpECCSI_Sign(op);
543
48
}
544
545
/* Specialization for operation::ECDSA_Sign */
546
455
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
455
    (void)module;
548
549
455
    if ( result.second != std::nullopt  ) {
550
189
        const auto curveID = op.curveType.Get();
551
189
        const auto cleartext = op.cleartext.ToHex();
552
189
        const auto pub_x = result.second->pub.first.ToTrimmedString();
553
189
        const auto pub_y = result.second->pub.second.ToTrimmedString();
554
189
        const auto sig_r = result.second->signature.first.ToTrimmedString();
555
189
        const auto sig_s = result.second->signature.second.ToTrimmedString();
556
557
189
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
558
189
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
559
189
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
560
561
189
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
562
189
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
563
189
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
564
189
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
565
566
189
        {
567
189
            auto opVerify = operation::ECDSA_Verify(
568
189
                    op,
569
189
                    *(result.second),
570
189
                    op.modifier);
571
572
189
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
573
189
            CF_ASSERT(
574
189
                    verifyResult == std::nullopt ||
575
189
                    *verifyResult == true,
576
189
                    "Cannot verify generated signature");
577
189
        }
578
189
    }
579
455
}
580
581
455
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
455
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
583
455
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
584
585
455
    const size_t size = op.priv.ToTrimmedString().size();
586
587
455
    if ( size == 0 || size > 4096 ) {
588
0
        return std::nullopt;
589
0
    }
590
591
455
    return module->OpECDSA_Sign(op);
592
455
}
593
594
/* Specialization for operation::ECGDSA_Sign */
595
79
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
79
    (void)module;
597
598
79
    if ( result.second != std::nullopt  ) {
599
15
        const auto curveID = op.curveType.Get();
600
15
        const auto cleartext = op.cleartext.ToHex();
601
15
        const auto pub_x = result.second->pub.first.ToTrimmedString();
602
15
        const auto pub_y = result.second->pub.second.ToTrimmedString();
603
15
        const auto sig_r = result.second->signature.first.ToTrimmedString();
604
15
        const auto sig_s = result.second->signature.second.ToTrimmedString();
605
606
15
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
607
15
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
608
15
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
609
610
15
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
611
15
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
612
15
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
613
15
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
614
15
    }
615
79
}
616
617
79
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
79
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
619
79
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
620
621
79
    const size_t size = op.priv.ToTrimmedString().size();
622
623
79
    if ( size == 0 || size > 4096 ) {
624
0
        return std::nullopt;
625
0
    }
626
627
79
    return module->OpECGDSA_Sign(op);
628
79
}
629
630
/* Specialization for operation::ECRDSA_Sign */
631
26
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
26
    (void)module;
633
634
26
    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
26
}
652
653
26
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
26
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
655
26
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
656
657
26
    const size_t size = op.priv.ToTrimmedString().size();
658
659
26
    if ( size == 0 || size > 4096 ) {
660
0
        return std::nullopt;
661
0
    }
662
663
26
    return module->OpECRDSA_Sign(op);
664
26
}
665
666
/* Specialization for operation::Schnorr_Sign */
667
35
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
35
    (void)module;
669
670
35
    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
35
}
688
689
35
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
35
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
691
35
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
692
693
35
    const size_t size = op.priv.ToTrimmedString().size();
694
695
35
    if ( size == 0 || size > 4096 ) {
696
0
        return std::nullopt;
697
0
    }
698
699
35
    return module->OpSchnorr_Sign(op);
700
35
}
701
702
/* Specialization for operation::ECCSI_Verify */
703
11
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
11
    (void)module;
705
11
    (void)op;
706
11
    (void)result;
707
11
}
708
709
11
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
710
11
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
711
11
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
712
713
11
    return module->OpECCSI_Verify(op);
714
11
}
715
716
/* Specialization for operation::ECDSA_Verify */
717
210
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
210
    (void)module;
719
210
    (void)op;
720
210
    (void)result;
721
210
}
722
723
210
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
724
210
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
210
    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
210
    return module->OpECDSA_Verify(op);
738
210
}
739
740
/* Specialization for operation::ECGDSA_Verify */
741
64
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
64
    (void)module;
743
64
    (void)op;
744
64
    (void)result;
745
64
}
746
747
64
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
748
64
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
749
64
    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
64
    return module->OpECGDSA_Verify(op);
762
64
}
763
764
/* Specialization for operation::ECRDSA_Verify */
765
12
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
12
    (void)module;
767
12
    (void)op;
768
12
    (void)result;
769
12
}
770
771
12
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
772
12
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
773
12
    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
12
    return module->OpECRDSA_Verify(op);
786
12
}
787
788
/* Specialization for operation::Schnorr_Verify */
789
22
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
22
    (void)module;
791
22
    (void)op;
792
22
    (void)result;
793
22
}
794
795
22
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
796
22
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
797
22
    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
22
    return module->OpSchnorr_Verify(op);
810
22
}
811
812
293
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
293
    (void)module;
814
293
    (void)op;
815
293
    (void)result;
816
293
}
817
818
293
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
293
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
820
293
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
821
822
293
    return module->OpECDSA_Recover(op);
823
293
}
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
118
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
118
    (void)module;
835
118
    (void)op;
836
118
    (void)result;
837
118
}
838
839
118
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
840
118
    const std::vector<size_t> sizes = {
841
118
        op.parameters.p.ToTrimmedString().size(),
842
118
        op.parameters.q.ToTrimmedString().size(),
843
118
        op.parameters.g.ToTrimmedString().size(),
844
118
        op.pub.ToTrimmedString().size(),
845
118
        op.signature.first.ToTrimmedString().size(),
846
118
        op.signature.second.ToTrimmedString().size(),
847
118
    };
848
849
708
    for (const auto& size : sizes) {
850
708
        if ( size == 0 || size > 4096 ) {
851
0
            return std::nullopt;
852
0
        }
853
708
    }
854
855
118
    return module->OpDSA_Verify(op);
856
118
}
857
858
/* Specialization for operation::DSA_Sign */
859
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
860
template <>
861
11
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
11
    (void)operations;
863
11
    (void)results;
864
11
    (void)data;
865
11
    (void)size;
866
11
}
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
38
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
38
    (void)module;
876
38
    (void)op;
877
38
    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
38
}
900
901
38
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
38
    const std::vector<size_t> sizes = {
903
38
        op.parameters.p.ToTrimmedString().size(),
904
38
        op.parameters.q.ToTrimmedString().size(),
905
38
        op.parameters.g.ToTrimmedString().size(),
906
38
        op.priv.ToTrimmedString().size(),
907
38
    };
908
909
152
    for (const auto& size : sizes) {
910
152
        if ( size == 0 || size > 4096 ) {
911
0
            return std::nullopt;
912
0
        }
913
152
    }
914
915
38
    return module->OpDSA_Sign(op);
916
38
}
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
21
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
21
    (void)result;
929
21
    (void)module;
930
21
    (void)op;
931
21
    if ( result.second != std::nullopt ) {
932
        //Pool_DSA_PubPriv.Set({pub, priv});
933
0
    }
934
21
}
935
936
21
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
937
21
    return module->OpDSA_PrivateToPublic(op);
938
21
}
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
7
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
7
    (void)operations;
946
7
    (void)results;
947
7
    (void)data;
948
7
    (void)size;
949
7
}
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
26
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
26
    (void)result;
960
26
    (void)module;
961
26
    (void)op;
962
26
    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
26
}
969
970
26
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
26
    const std::vector<size_t> sizes = {
972
26
        op.p.ToTrimmedString().size(),
973
26
        op.q.ToTrimmedString().size(),
974
26
        op.g.ToTrimmedString().size(),
975
26
    };
976
977
78
    for (const auto& size : sizes) {
978
78
        if ( size == 0 || size > 4096 ) {
979
0
            return std::nullopt;
980
0
        }
981
78
    }
982
983
26
    return module->OpDSA_GenerateKeyPair(op);
984
26
}
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
7
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
7
    (void)operations;
992
7
    (void)results;
993
7
    (void)data;
994
7
    (void)size;
995
7
}
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
25
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
25
    (void)result;
1006
25
    (void)module;
1007
25
    (void)op;
1008
25
    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
25
}
1020
1021
25
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
25
    return module->OpDSA_GenerateParameters(op);
1023
25
}
1024
1025
/* Specialization for operation::ECDH_Derive */
1026
27
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
27
    (void)module;
1028
27
    (void)op;
1029
27
    (void)result;
1030
27
}
1031
1032
27
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1033
27
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1034
1035
27
    return module->OpECDH_Derive(op);
1036
27
}
1037
1038
/* Specialization for operation::ECIES_Encrypt */
1039
template <>
1040
9
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
9
    (void)operations;
1042
9
    (void)results;
1043
9
    (void)data;
1044
9
    (void)size;
1045
9
}
1046
36
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
36
    (void)module;
1048
36
    (void)op;
1049
36
    (void)result;
1050
36
}
1051
1052
36
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1053
36
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1054
1055
36
    return module->OpECIES_Encrypt(op);
1056
36
}
1057
1058
/* Specialization for operation::ECIES_Decrypt */
1059
42
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
42
    (void)module;
1061
42
    (void)op;
1062
42
    (void)result;
1063
42
}
1064
1065
42
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1066
42
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1067
1068
42
    return module->OpECIES_Decrypt(op);
1069
42
}
1070
1071
/* Specialization for operation::ECC_Point_Add */
1072
53
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
53
    (void)module;
1074
1075
53
    if ( result.second != std::nullopt  ) {
1076
3
        const auto curveID = op.curveType.Get();
1077
3
        const auto x = result.second->first.ToTrimmedString();
1078
3
        const auto y = result.second->second.ToTrimmedString();
1079
1080
3
        Pool_CurveECC_Point.Set({ curveID, x, y });
1081
1082
3
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1083
3
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1084
3
    }
1085
53
}
1086
1087
53
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
53
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1089
1090
53
    return module->OpECC_Point_Add(op);
1091
53
}
1092
1093
/* Specialization for operation::ECC_Point_Sub */
1094
52
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
52
    (void)module;
1096
1097
52
    if ( result.second != std::nullopt  ) {
1098
4
        const auto curveID = op.curveType.Get();
1099
4
        const auto x = result.second->first.ToTrimmedString();
1100
4
        const auto y = result.second->second.ToTrimmedString();
1101
1102
4
        Pool_CurveECC_Point.Set({ curveID, x, y });
1103
1104
4
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1105
4
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1106
4
    }
1107
52
}
1108
1109
52
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
52
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1111
1112
52
    return module->OpECC_Point_Sub(op);
1113
52
}
1114
1115
/* Specialization for operation::ECC_Point_Mul */
1116
387
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
387
    (void)module;
1118
1119
387
    if ( result.second != std::nullopt  ) {
1120
35
        const auto curveID = op.curveType.Get();
1121
35
        const auto x = result.second->first.ToTrimmedString();
1122
35
        const auto y = result.second->second.ToTrimmedString();
1123
1124
35
        Pool_CurveECC_Point.Set({ curveID, x, y });
1125
1126
35
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1127
35
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1128
35
    }
1129
387
}
1130
1131
387
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
387
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1133
1134
387
    return module->OpECC_Point_Mul(op);
1135
387
}
1136
1137
/* Specialization for operation::ECC_Point_Neg */
1138
71
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
71
    (void)module;
1140
1141
71
    if ( result.second != std::nullopt  ) {
1142
22
        const auto curveID = op.curveType.Get();
1143
22
        const auto x = result.second->first.ToTrimmedString();
1144
22
        const auto y = result.second->second.ToTrimmedString();
1145
1146
22
        Pool_CurveECC_Point.Set({ curveID, x, y });
1147
1148
22
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1149
22
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1150
22
    }
1151
71
}
1152
1153
71
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
71
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1155
1156
71
    return module->OpECC_Point_Neg(op);
1157
71
}
1158
1159
/* Specialization for operation::ECC_Point_Dbl */
1160
51
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
51
    (void)module;
1162
1163
51
    if ( result.second != std::nullopt  ) {
1164
3
        const auto curveID = op.curveType.Get();
1165
3
        const auto x = result.second->first.ToTrimmedString();
1166
3
        const auto y = result.second->second.ToTrimmedString();
1167
1168
3
        Pool_CurveECC_Point.Set({ curveID, x, y });
1169
1170
3
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1171
3
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1172
3
    }
1173
51
}
1174
1175
51
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
51
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1177
1178
51
    return module->OpECC_Point_Dbl(op);
1179
51
}
1180
1181
/* Specialization for operation::ECC_Point_Cmp */
1182
68
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
68
    (void)module;
1184
68
    (void)result;
1185
68
    (void)op;
1186
68
}
1187
1188
68
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1189
68
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1190
1191
68
    return module->OpECC_Point_Cmp(op);
1192
68
}
1193
1194
/* Specialization for operation::DH_Derive */
1195
156
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
156
    (void)module;
1197
156
    (void)op;
1198
156
    (void)result;
1199
156
}
1200
1201
156
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1202
156
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1203
149
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1204
144
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1205
144
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1206
1207
144
    return module->OpDH_Derive(op);
1208
144
}
1209
1210
/* Specialization for operation::DH_GenerateKeyPair */
1211
45
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
45
    (void)result;
1213
45
    (void)op;
1214
45
    (void)module;
1215
1216
45
    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
45
}
1224
1225
45
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
45
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1227
45
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1228
1229
45
    return module->OpDH_GenerateKeyPair(op);
1230
45
}
1231
1232
/* Specialization for operation::BignumCalc */
1233
4.29k
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
4.29k
    (void)module;
1235
4.29k
    (void)op;
1236
1237
4.29k
    if ( result.second != std::nullopt  ) {
1238
1.07k
        const auto bignum = result.second->ToTrimmedString();
1239
1240
1.07k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1241
1.06k
            Pool_Bignum.Set(bignum);
1242
1.06k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1243
271
                Pool_Bignum_Primes.Set(bignum);
1244
271
            }
1245
1.06k
        }
1246
1.07k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1247
44
            if ( bignum == "1" ) {
1248
17
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1249
17
            }
1250
44
        }
1251
1.07k
    }
1252
4.29k
}
1253
1254
4.29k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1255
4.29k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1256
1257
    /* Prevent timeouts */
1258
4.29k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1259
4.28k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1260
4.28k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1261
4.27k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1262
1263
4.27k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1264
485
        return std::nullopt;
1265
485
    }
1266
1267
3.78k
    switch ( op.calcOp.Get() ) {
1268
23
        case    CF_CALCOP("SetBit(A,B)"):
1269
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1270
23
            if ( op.bn1.GetSize() > 4 ) {
1271
2
                return std::nullopt;
1272
2
            }
1273
21
            break;
1274
26
        case    CF_CALCOP("Exp(A,B)"):
1275
26
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1276
8
                return std::nullopt;
1277
8
            }
1278
18
            break;
1279
18
        case    CF_CALCOP("ModLShift(A,B,C)"):
1280
9
            if ( op.bn1.GetSize() > 4 ) {
1281
3
                return std::nullopt;
1282
3
            }
1283
6
            break;
1284
33
        case    CF_CALCOP("Exp2(A)"):
1285
33
            if ( op.bn0.GetSize() > 4 ) {
1286
7
                return std::nullopt;
1287
7
            }
1288
26
            break;
1289
3.78k
    }
1290
1291
3.76k
    return module->OpBignumCalc(op);
1292
3.78k
}
1293
1294
/* Specialization for operation::BignumCalc_Fp2 */
1295
89
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
89
    (void)module;
1297
89
    (void)op;
1298
1299
89
    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
89
}
1311
1312
89
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1313
89
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1314
1315
    /* Prevent timeouts */
1316
89
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1317
89
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1318
89
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1319
83
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1320
83
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1321
77
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1322
71
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1323
71
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1324
1325
65
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1326
0
        return std::nullopt;
1327
0
    }
1328
1329
65
    return module->OpBignumCalc_Fp2(op);
1330
65
}
1331
1332
/* Specialization for operation::BignumCalc_Fp12 */
1333
169
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
169
    (void)module;
1335
169
    (void)op;
1336
1337
169
    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
169
}
1366
1367
169
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1368
169
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1369
1370
    /* Prevent timeouts */
1371
169
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1372
167
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1373
167
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1374
167
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1375
161
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1376
161
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1377
159
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1378
154
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1379
149
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1380
149
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1381
149
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1382
147
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1383
1384
141
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1385
139
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1386
136
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1387
136
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1388
136
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1389
132
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1390
132
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1391
128
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1392
128
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1393
124
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1394
117
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1395
114
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1396
1397
111
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1398
108
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1399
105
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1400
103
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1401
100
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1402
100
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1403
96
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1404
93
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1405
84
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1406
82
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1407
77
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1408
75
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1409
1410
70
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1411
68
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1412
68
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1413
63
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1414
63
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1415
61
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1416
58
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1417
53
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1418
51
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1419
51
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1420
51
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1421
48
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1422
1423
48
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1424
0
        return std::nullopt;
1425
0
    }
1426
1427
48
    return module->OpBignumCalc_Fp12(op);
1428
48
}
1429
1430
/* Specialization for operation::BLS_PrivateToPublic */
1431
25
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
25
    (void)module;
1433
1434
25
    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
25
}
1445
1446
25
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
25
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1448
1449
25
    const size_t size = op.priv.ToTrimmedString().size();
1450
1451
25
    if ( size == 0 || size > 4096 ) {
1452
0
        return std::nullopt;
1453
0
    }
1454
1455
25
    return module->OpBLS_PrivateToPublic(op);
1456
25
}
1457
1458
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1459
55
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
55
    (void)module;
1461
55
    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
55
}
1476
1477
55
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
55
    const size_t size = op.priv.ToTrimmedString().size();
1479
1480
55
    if ( size == 0 || size > 4096 ) {
1481
6
        return std::nullopt;
1482
6
    }
1483
1484
49
    return module->OpBLS_PrivateToPublic_G2(op);
1485
55
}
1486
1487
/* Specialization for operation::BLS_Sign */
1488
38
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
38
    (void)module;
1490
1491
38
    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
38
}
1519
1520
38
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
38
    const size_t size = op.priv.ToTrimmedString().size();
1522
1523
38
    if ( size == 0 || size > 4096 ) {
1524
0
        return std::nullopt;
1525
0
    }
1526
1527
38
    return module->OpBLS_Sign(op);
1528
38
}
1529
1530
/* Specialization for operation::BLS_Verify */
1531
40
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
40
    (void)module;
1533
40
    (void)op;
1534
40
    (void)result;
1535
40
}
1536
1537
40
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
40
    return module->OpBLS_Verify(op);
1554
40
}
1555
1556
/* Specialization for operation::BLS_BatchSign */
1557
52
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
52
    (void)module;
1559
52
    (void)op;
1560
1561
52
    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
52
}
1590
1591
52
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
52
    return module->OpBLS_BatchSign(op);
1593
52
}
1594
1595
/* Specialization for operation::BLS_BatchVerify */
1596
47
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
47
    (void)module;
1598
47
    (void)op;
1599
47
    (void)result;
1600
47
}
1601
1602
47
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1603
47
    return module->OpBLS_BatchVerify(op);
1604
47
}
1605
1606
/* Specialization for operation::BLS_Aggregate_G1 */
1607
32
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
32
    (void)module;
1609
32
    (void)op;
1610
32
    (void)result;
1611
32
}
1612
1613
32
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
32
    return module->OpBLS_Aggregate_G1(op);
1615
32
}
1616
1617
/* Specialization for operation::BLS_Aggregate_G2 */
1618
29
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
29
    (void)module;
1620
29
    (void)op;
1621
29
    (void)result;
1622
29
}
1623
1624
29
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
29
    return module->OpBLS_Aggregate_G2(op);
1626
29
}
1627
1628
/* Specialization for operation::BLS_Pairing */
1629
38
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
38
    (void)module;
1631
38
    (void)op;
1632
1633
38
    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
38
}
1650
1651
38
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1652
38
    return module->OpBLS_Pairing(op);
1653
38
}
1654
1655
/* Specialization for operation::BLS_MillerLoop */
1656
26
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
26
    (void)module;
1658
26
    (void)op;
1659
1660
26
    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
26
}
1677
1678
26
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1679
26
    return module->OpBLS_MillerLoop(op);
1680
26
}
1681
1682
/* Specialization for operation::BLS_FinalExp */
1683
39
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
39
    (void)module;
1685
39
    (void)op;
1686
1687
39
    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
39
}
1704
1705
39
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1706
39
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1707
39
    return module->OpBLS_FinalExp(op);
1708
39
}
1709
1710
/* Specialization for operation::BLS_HashToG1 */
1711
22
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
22
    (void)module;
1713
1714
22
    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
22
}
1725
1726
22
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1727
22
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1728
22
    return module->OpBLS_HashToG1(op);
1729
22
}
1730
1731
/* Specialization for operation::BLS_MapToG1 */
1732
24
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
24
    (void)module;
1734
1735
24
    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
24
}
1746
1747
24
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1748
24
    return module->OpBLS_MapToG1(op);
1749
24
}
1750
1751
/* Specialization for operation::BLS_MapToG2 */
1752
37
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
37
    (void)module;
1754
1755
37
    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
37
}
1770
1771
37
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1772
37
    return module->OpBLS_MapToG2(op);
1773
37
}
1774
1775
/* Specialization for operation::BLS_IsG1OnCurve */
1776
38
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
38
    (void)module;
1778
38
    (void)op;
1779
38
    (void)result;
1780
38
}
1781
1782
38
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1783
38
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1784
38
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1785
38
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1786
1787
38
    return module->OpBLS_IsG1OnCurve(op);
1788
38
}
1789
1790
/* Specialization for operation::BLS_IsG2OnCurve */
1791
40
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
40
    (void)module;
1793
40
    (void)op;
1794
40
    (void)result;
1795
40
}
1796
1797
40
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1798
40
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1799
36
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1800
34
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1801
34
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1802
1803
34
    return module->OpBLS_IsG2OnCurve(op);
1804
34
}
1805
1806
/* Specialization for operation::BLS_GenerateKeyPair */
1807
25
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
25
    (void)module;
1809
1810
25
    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
25
}
1823
1824
25
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
25
    return module->OpBLS_GenerateKeyPair(op);
1826
25
}
1827
1828
/* Specialization for operation::BLS_Decompress_G1 */
1829
24
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
24
    (void)module;
1831
1832
24
    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
24
}
1843
1844
24
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
24
    return module->OpBLS_Decompress_G1(op);
1846
24
}
1847
1848
/* Specialization for operation::BLS_Compress_G1 */
1849
25
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
25
    (void)module;
1851
25
    (void)op;
1852
1853
25
    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
25
}
1859
1860
25
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
25
    return module->OpBLS_Compress_G1(op);
1862
25
}
1863
1864
/* Specialization for operation::BLS_Decompress_G2 */
1865
38
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
38
    (void)module;
1867
1868
38
    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
38
}
1883
1884
38
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
38
    return module->OpBLS_Decompress_G2(op);
1886
38
}
1887
1888
/* Specialization for operation::BLS_Compress_G2 */
1889
39
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
39
    (void)module;
1891
1892
39
    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
39
}
1903
1904
39
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
39
    return module->OpBLS_Compress_G2(op);
1906
39
}
1907
1908
/* Specialization for operation::BLS_G1_Add */
1909
39
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
39
    (void)module;
1911
1912
39
    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
39
}
1923
1924
39
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
39
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1926
39
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1927
39
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1928
39
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1929
39
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1930
1931
37
    return module->OpBLS_G1_Add(op);
1932
39
}
1933
1934
/* Specialization for operation::BLS_G1_Mul */
1935
39
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
39
    (void)module;
1937
1938
39
    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
39
}
1949
1950
39
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
39
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1952
39
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1953
39
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1954
39
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1955
1956
37
    return module->OpBLS_G1_Mul(op);
1957
39
}
1958
1959
/* Specialization for operation::BLS_G1_IsEq */
1960
49
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
49
    (void)module;
1962
49
    (void)op;
1963
49
    (void)result;
1964
49
}
1965
1966
49
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
1967
49
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1968
49
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1969
47
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1970
47
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1971
41
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1972
1973
41
    return module->OpBLS_G1_IsEq(op);
1974
41
}
1975
1976
/* Specialization for operation::BLS_G1_Neg */
1977
28
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
28
    (void)module;
1979
1980
28
    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
28
}
1991
1992
28
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
28
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1994
28
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1995
28
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1996
1997
28
    return module->OpBLS_G1_Neg(op);
1998
28
}
1999
2000
/* Specialization for operation::BLS_G2_Add */
2001
44
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
44
    (void)module;
2003
2004
44
    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
44
}
2019
2020
44
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
44
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2022
44
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2023
44
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2024
39
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2025
39
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2026
37
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2027
34
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2028
34
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
34
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
2031
34
    return module->OpBLS_G2_Add(op);
2032
34
}
2033
2034
/* Specialization for operation::BLS_G2_Mul */
2035
37
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
37
    (void)module;
2037
2038
37
    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
37
}
2053
2054
37
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
37
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2056
37
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2057
37
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2058
37
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2059
37
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2060
34
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2061
2062
34
    return module->OpBLS_G2_Mul(op);
2063
34
}
2064
2065
/* Specialization for operation::BLS_G2_IsEq */
2066
71
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
71
    (void)module;
2068
71
    (void)op;
2069
71
    (void)result;
2070
71
}
2071
2072
71
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2073
71
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2074
71
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2075
68
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2076
64
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2077
57
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2078
57
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2079
51
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2080
51
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2081
51
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2082
2083
47
    return module->OpBLS_G2_IsEq(op);
2084
51
}
2085
2086
/* Specialization for operation::BLS_G2_Neg */
2087
39
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
39
    (void)module;
2089
2090
39
    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
39
}
2105
2106
39
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
39
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2108
39
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2109
39
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2110
37
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2111
30
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2112
2113
30
    return module->OpBLS_G2_Neg(op);
2114
30
}
2115
2116
/* Specialization for operation::BLS_G1_MultiExp */
2117
49
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
49
    (void)module;
2119
2120
49
    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
49
}
2131
2132
49
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
49
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2134
2135
705
    for (const auto& point_scalar : op.points_scalars.points_scalars) {
2136
705
        if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2137
702
        if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2138
697
        if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2139
697
    }
2140
2141
37
    return module->OpBLS_G1_MultiExp(op);
2142
49
}
2143
2144
/* Specialization for operation::Misc */
2145
8
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2146
8
    (void)module;
2147
8
    (void)op;
2148
8
    (void)result;
2149
8
}
2150
2151
8
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2152
8
    return module->OpMisc(op);
2153
8
}
2154
2155
/* Specialization for operation::BLS_HashToG2 */
2156
23
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
23
    (void)module;
2158
2159
23
    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
23
}
2174
2175
23
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2176
23
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2177
23
    return module->OpBLS_HashToG2(op);
2178
23
}
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
23
{ }
2183
22
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2184
22
    this->modulo = component::Bignum(modulo);
2185
22
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2189
1
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2190
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2194
1
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2195
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2199
1
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2200
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2204
1
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2205
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2209
1
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2210
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2214
1
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2215
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2219
1
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337"));
2220
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2224
1
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097"));
2225
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2229
1
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2230
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2234
1
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2235
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2239
1
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2240
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2244
1
    CF_NORET(SetModulo("18446744069414584321"));
2245
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2249
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2250
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2254
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2255
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2259
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2260
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2264
1
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2265
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2269
1
    CF_NORET(SetModulo("18446744073709551616"));
2270
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2274
1
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2275
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2279
1
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2280
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2284
1
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2285
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2289
1
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2290
1
}
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
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2294
1
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2295
1
}
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
1
{ }
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
1
{ }
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
105
{
2317
105
}
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
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
23
{
2317
23
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
2318
2319
/* Specialization for operation::SR25519_Verify */
2320
35
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
35
    (void)module;
2322
35
    (void)op;
2323
35
    (void)result;
2324
35
}
2325
2326
35
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2327
35
    return module->OpSR25519_Verify(op);
2328
35
}
2329
2330
template <class ResultType, class OperationType>
2331
105
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
105
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2331
23
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
23
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
2333
2334
/* Filter away the values in the set that are std::nullopt */
2335
template <class ResultType, class OperationType>
2336
6.05k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
6.05k
    ResultSet ret;
2338
2339
20.5k
    for (const auto& result : results) {
2340
20.5k
        if ( result.second == std::nullopt ) {
2341
14.5k
            continue;
2342
14.5k
        }
2343
2344
5.98k
        ret.push_back(result);
2345
5.98k
    }
2346
2347
6.05k
    return ret;
2348
6.05k
}
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
345
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
345
    ResultSet ret;
2338
2339
1.23k
    for (const auto& result : results) {
2340
1.23k
        if ( result.second == std::nullopt ) {
2341
574
            continue;
2342
574
        }
2343
2344
664
        ret.push_back(result);
2345
664
    }
2346
2347
345
    return ret;
2348
345
}
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
192
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
192
    ResultSet ret;
2338
2339
731
    for (const auto& result : results) {
2340
731
        if ( result.second == std::nullopt ) {
2341
434
            continue;
2342
434
        }
2343
2344
297
        ret.push_back(result);
2345
297
    }
2346
2347
192
    return ret;
2348
192
}
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
119
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
119
    ResultSet ret;
2338
2339
759
    for (const auto& result : results) {
2340
759
        if ( result.second == std::nullopt ) {
2341
391
            continue;
2342
391
        }
2343
2344
368
        ret.push_back(result);
2345
368
    }
2346
2347
119
    return ret;
2348
119
}
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
167
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
167
    ResultSet ret;
2338
2339
673
    for (const auto& result : results) {
2340
673
        if ( result.second == std::nullopt ) {
2341
389
            continue;
2342
389
        }
2343
2344
284
        ret.push_back(result);
2345
284
    }
2346
2347
167
    return ret;
2348
167
}
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
843
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
843
    ResultSet ret;
2338
2339
3.59k
    for (const auto& result : results) {
2340
3.59k
        if ( result.second == std::nullopt ) {
2341
2.43k
            continue;
2342
2.43k
        }
2343
2344
1.16k
        ret.push_back(result);
2345
1.16k
    }
2346
2347
843
    return ret;
2348
843
}
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
389
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
389
    ResultSet ret;
2338
2339
1.91k
    for (const auto& result : results) {
2340
1.91k
        if ( result.second == std::nullopt ) {
2341
1.70k
            continue;
2342
1.70k
        }
2343
2344
212
        ret.push_back(result);
2345
212
    }
2346
2347
389
    return ret;
2348
389
}
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
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
24
    ResultSet ret;
2338
2339
153
    for (const auto& result : results) {
2340
153
        if ( result.second == std::nullopt ) {
2341
99
            continue;
2342
99
        }
2343
2344
54
        ret.push_back(result);
2345
54
    }
2346
2347
24
    return ret;
2348
24
}
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
242
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
242
    ResultSet ret;
2338
2339
930
    for (const auto& result : results) {
2340
930
        if ( result.second == std::nullopt ) {
2341
415
            continue;
2342
415
        }
2343
2344
515
        ret.push_back(result);
2345
515
    }
2346
2347
242
    return ret;
2348
242
}
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
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
18
    ResultSet ret;
2338
2339
134
    for (const auto& result : results) {
2340
134
        if ( result.second == std::nullopt ) {
2341
134
            continue;
2342
134
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
18
    return ret;
2348
18
}
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
22
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
22
    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
22
    return ret;
2348
22
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
16
    ResultSet ret;
2338
2339
99
    for (const auto& result : results) {
2340
99
        if ( result.second == std::nullopt ) {
2341
99
            continue;
2342
99
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
16
    return ret;
2348
16
}
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
138
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
138
    ResultSet ret;
2338
2339
443
    for (const auto& result : results) {
2340
443
        if ( result.second == std::nullopt ) {
2341
294
            continue;
2342
294
        }
2343
2344
149
        ret.push_back(result);
2345
149
    }
2346
2347
138
    return ret;
2348
138
}
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
120
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
120
    ResultSet ret;
2338
2339
305
    for (const auto& result : results) {
2340
305
        if ( result.second == std::nullopt ) {
2341
157
            continue;
2342
157
        }
2343
2344
148
        ret.push_back(result);
2345
148
    }
2346
2347
120
    return ret;
2348
120
}
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
20
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
20
    ResultSet ret;
2338
2339
97
    for (const auto& result : results) {
2340
97
        if ( result.second == std::nullopt ) {
2341
97
            continue;
2342
97
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
20
    return ret;
2348
20
}
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
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
11
    ResultSet ret;
2338
2339
113
    for (const auto& result : results) {
2340
113
        if ( result.second == std::nullopt ) {
2341
113
            continue;
2342
113
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
11
    return ret;
2348
11
}
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
29
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
29
    ResultSet ret;
2338
2339
64
    for (const auto& result : results) {
2340
64
        if ( result.second == std::nullopt ) {
2341
44
            continue;
2342
44
        }
2343
2344
20
        ret.push_back(result);
2345
20
    }
2346
2347
29
    return ret;
2348
29
}
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
80
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
80
    ResultSet ret;
2338
2339
366
    for (const auto& result : results) {
2340
366
        if ( result.second == std::nullopt ) {
2341
203
            continue;
2342
203
        }
2343
2344
163
        ret.push_back(result);
2345
163
    }
2346
2347
80
    return ret;
2348
80
}
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
208
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
208
    ResultSet ret;
2338
2339
556
    for (const auto& result : results) {
2340
556
        if ( result.second == std::nullopt ) {
2341
383
            continue;
2342
383
        }
2343
2344
173
        ret.push_back(result);
2345
173
    }
2346
2347
208
    return ret;
2348
208
}
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
78
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
78
    ResultSet ret;
2338
2339
188
    for (const auto& result : results) {
2340
188
        if ( result.second == std::nullopt ) {
2341
55
            continue;
2342
55
        }
2343
2344
133
        ret.push_back(result);
2345
133
    }
2346
2347
78
    return ret;
2348
78
}
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
13
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
13
    ResultSet ret;
2338
2339
48
    for (const auto& result : results) {
2340
48
        if ( result.second == std::nullopt ) {
2341
48
            continue;
2342
48
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
13
    return ret;
2348
13
}
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
161
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
161
    ResultSet ret;
2338
2339
455
    for (const auto& result : results) {
2340
455
        if ( result.second == std::nullopt ) {
2341
266
            continue;
2342
266
        }
2343
2344
189
        ret.push_back(result);
2345
189
    }
2346
2347
161
    return ret;
2348
161
}
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
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
26
    ResultSet ret;
2338
2339
79
    for (const auto& result : results) {
2340
79
        if ( result.second == std::nullopt ) {
2341
64
            continue;
2342
64
        }
2343
2344
15
        ret.push_back(result);
2345
15
    }
2346
2347
26
    return ret;
2348
26
}
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
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
7
    ResultSet ret;
2338
2339
26
    for (const auto& result : results) {
2340
26
        if ( result.second == std::nullopt ) {
2341
26
            continue;
2342
26
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
7
    return ret;
2348
7
}
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
10
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
10
    ResultSet ret;
2338
2339
35
    for (const auto& result : results) {
2340
35
        if ( result.second == std::nullopt ) {
2341
35
            continue;
2342
35
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
10
    return ret;
2348
10
}
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
4
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
4
    ResultSet ret;
2338
2339
11
    for (const auto& result : results) {
2340
11
        if ( result.second == std::nullopt ) {
2341
11
            continue;
2342
11
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
4
    return ret;
2348
4
}
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
68
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
68
    ResultSet ret;
2338
2339
210
    for (const auto& result : results) {
2340
210
        if ( result.second == std::nullopt ) {
2341
105
            continue;
2342
105
        }
2343
2344
105
        ret.push_back(result);
2345
105
    }
2346
2347
68
    return ret;
2348
68
}
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
23
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
23
    ResultSet ret;
2338
2339
64
    for (const auto& result : results) {
2340
64
        if ( result.second == std::nullopt ) {
2341
45
            continue;
2342
45
        }
2343
2344
19
        ret.push_back(result);
2345
19
    }
2346
2347
23
    return ret;
2348
23
}
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
5
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
5
    ResultSet ret;
2338
2339
12
    for (const auto& result : results) {
2340
12
        if ( result.second == std::nullopt ) {
2341
12
            continue;
2342
12
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
5
    return ret;
2348
5
}
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
6
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
6
    ResultSet ret;
2338
2339
22
    for (const auto& result : results) {
2340
22
        if ( result.second == std::nullopt ) {
2341
22
            continue;
2342
22
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
6
    return ret;
2348
6
}
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
115
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
115
    ResultSet ret;
2338
2339
293
    for (const auto& result : results) {
2340
293
        if ( result.second == std::nullopt ) {
2341
175
            continue;
2342
175
        }
2343
2344
118
        ret.push_back(result);
2345
118
    }
2346
2347
115
    return ret;
2348
115
}
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
44
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
44
    ResultSet ret;
2338
2339
118
    for (const auto& result : results) {
2340
118
        if ( result.second == std::nullopt ) {
2341
68
            continue;
2342
68
        }
2343
2344
50
        ret.push_back(result);
2345
50
    }
2346
2347
44
    return ret;
2348
44
}
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
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
7
    ResultSet ret;
2338
2339
21
    for (const auto& result : results) {
2340
21
        if ( result.second == std::nullopt ) {
2341
21
            continue;
2342
21
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
7
    return ret;
2348
7
}
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
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
7
    ResultSet ret;
2338
2339
27
    for (const auto& result : results) {
2340
27
        if ( result.second == std::nullopt ) {
2341
27
            continue;
2342
27
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
7
    return ret;
2348
7
}
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
12
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
12
    ResultSet ret;
2338
2339
42
    for (const auto& result : results) {
2340
42
        if ( result.second == std::nullopt ) {
2341
42
            continue;
2342
42
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
12
    return ret;
2348
12
}
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
12
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
12
    ResultSet ret;
2338
2339
53
    for (const auto& result : results) {
2340
53
        if ( result.second == std::nullopt ) {
2341
50
            continue;
2342
50
        }
2343
2344
3
        ret.push_back(result);
2345
3
    }
2346
2347
12
    return ret;
2348
12
}
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
14
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
14
    ResultSet ret;
2338
2339
52
    for (const auto& result : results) {
2340
52
        if ( result.second == std::nullopt ) {
2341
48
            continue;
2342
48
        }
2343
2344
4
        ret.push_back(result);
2345
4
    }
2346
2347
14
    return ret;
2348
14
}
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
132
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
132
    ResultSet ret;
2338
2339
387
    for (const auto& result : results) {
2340
387
        if ( result.second == std::nullopt ) {
2341
352
            continue;
2342
352
        }
2343
2344
35
        ret.push_back(result);
2345
35
    }
2346
2347
132
    return ret;
2348
132
}
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
21
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
21
    ResultSet ret;
2338
2339
71
    for (const auto& result : results) {
2340
71
        if ( result.second == std::nullopt ) {
2341
49
            continue;
2342
49
        }
2343
2344
22
        ret.push_back(result);
2345
22
    }
2346
2347
21
    return ret;
2348
21
}
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
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
15
    ResultSet ret;
2338
2339
51
    for (const auto& result : results) {
2340
51
        if ( result.second == std::nullopt ) {
2341
48
            continue;
2342
48
        }
2343
2344
3
        ret.push_back(result);
2345
3
    }
2346
2347
15
    return ret;
2348
15
}
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
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
18
    ResultSet ret;
2338
2339
68
    for (const auto& result : results) {
2340
68
        if ( result.second == std::nullopt ) {
2341
62
            continue;
2342
62
        }
2343
2344
6
        ret.push_back(result);
2345
6
    }
2346
2347
18
    return ret;
2348
18
}
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
58
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
58
    ResultSet ret;
2338
2339
156
    for (const auto& result : results) {
2340
156
        if ( result.second == std::nullopt ) {
2341
153
            continue;
2342
153
        }
2343
2344
3
        ret.push_back(result);
2345
3
    }
2346
2347
58
    return ret;
2348
58
}
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
1.78k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
1.78k
    ResultSet ret;
2338
2339
4.29k
    for (const auto& result : results) {
2340
4.29k
        if ( result.second == std::nullopt ) {
2341
3.22k
            continue;
2342
3.22k
        }
2343
2344
1.07k
        ret.push_back(result);
2345
1.07k
    }
2346
2347
1.78k
    return ret;
2348
1.78k
}
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
23
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
23
    ResultSet ret;
2338
2339
89
    for (const auto& result : results) {
2340
89
        if ( result.second == std::nullopt ) {
2341
89
            continue;
2342
89
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
23
    return ret;
2348
23
}
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
57
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
57
    ResultSet ret;
2338
2339
169
    for (const auto& result : results) {
2340
169
        if ( result.second == std::nullopt ) {
2341
169
            continue;
2342
169
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
57
    return ret;
2348
57
}
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
9
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
9
    ResultSet ret;
2338
2339
25
    for (const auto& result : results) {
2340
25
        if ( result.second == std::nullopt ) {
2341
25
            continue;
2342
25
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
9
    return ret;
2348
9
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
16
    ResultSet ret;
2338
2339
55
    for (const auto& result : results) {
2340
55
        if ( result.second == std::nullopt ) {
2341
55
            continue;
2342
55
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
16
    return ret;
2348
16
}
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
10
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
10
    ResultSet ret;
2338
2339
38
    for (const auto& result : results) {
2340
38
        if ( result.second == std::nullopt ) {
2341
38
            continue;
2342
38
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
10
    return ret;
2348
10
}
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
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
11
    ResultSet ret;
2338
2339
40
    for (const auto& result : results) {
2340
40
        if ( result.second == std::nullopt ) {
2341
40
            continue;
2342
40
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
11
    return ret;
2348
11
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
16
    ResultSet ret;
2338
2339
52
    for (const auto& result : results) {
2340
52
        if ( result.second == std::nullopt ) {
2341
52
            continue;
2342
52
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
16
    return ret;
2348
16
}
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
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
11
    ResultSet ret;
2338
2339
47
    for (const auto& result : results) {
2340
47
        if ( result.second == std::nullopt ) {
2341
47
            continue;
2342
47
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
11
    return ret;
2348
11
}
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
8
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
8
    ResultSet ret;
2338
2339
32
    for (const auto& result : results) {
2340
32
        if ( result.second == std::nullopt ) {
2341
32
            continue;
2342
32
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
8
    return ret;
2348
8
}
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
8
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
8
    ResultSet ret;
2338
2339
29
    for (const auto& result : results) {
2340
29
        if ( result.second == std::nullopt ) {
2341
29
            continue;
2342
29
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
8
    return ret;
2348
8
}
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
9
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
9
    ResultSet ret;
2338
2339
38
    for (const auto& result : results) {
2340
38
        if ( result.second == std::nullopt ) {
2341
38
            continue;
2342
38
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
9
    return ret;
2348
9
}
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
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
7
    ResultSet ret;
2338
2339
26
    for (const auto& result : results) {
2340
26
        if ( result.second == std::nullopt ) {
2341
26
            continue;
2342
26
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
7
    return ret;
2348
7
}
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
12
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
12
    ResultSet ret;
2338
2339
39
    for (const auto& result : results) {
2340
39
        if ( result.second == std::nullopt ) {
2341
39
            continue;
2342
39
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
12
    return ret;
2348
12
}
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
5
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
5
    ResultSet ret;
2338
2339
22
    for (const auto& result : results) {
2340
22
        if ( result.second == std::nullopt ) {
2341
22
            continue;
2342
22
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
5
    return ret;
2348
5
}
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
8
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
8
    ResultSet ret;
2338
2339
23
    for (const auto& result : results) {
2340
23
        if ( result.second == std::nullopt ) {
2341
23
            continue;
2342
23
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
8
    return ret;
2348
8
}
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
6
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
6
    ResultSet ret;
2338
2339
24
    for (const auto& result : results) {
2340
24
        if ( result.second == std::nullopt ) {
2341
24
            continue;
2342
24
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
6
    return ret;
2348
6
}
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
10
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
10
    ResultSet ret;
2338
2339
37
    for (const auto& result : results) {
2340
37
        if ( result.second == std::nullopt ) {
2341
37
            continue;
2342
37
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
10
    return ret;
2348
10
}
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
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
11
    ResultSet ret;
2338
2339
38
    for (const auto& result : results) {
2340
38
        if ( result.second == std::nullopt ) {
2341
38
            continue;
2342
38
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
11
    return ret;
2348
11
}
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
12
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
12
    ResultSet ret;
2338
2339
40
    for (const auto& result : results) {
2340
40
        if ( result.second == std::nullopt ) {
2341
40
            continue;
2342
40
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
12
    return ret;
2348
12
}
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
9
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
9
    ResultSet ret;
2338
2339
25
    for (const auto& result : results) {
2340
25
        if ( result.second == std::nullopt ) {
2341
25
            continue;
2342
25
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
9
    return ret;
2348
9
}
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
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
7
    ResultSet ret;
2338
2339
24
    for (const auto& result : results) {
2340
24
        if ( result.second == std::nullopt ) {
2341
24
            continue;
2342
24
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
7
    return ret;
2348
7
}
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
6
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
6
    ResultSet ret;
2338
2339
25
    for (const auto& result : results) {
2340
25
        if ( result.second == std::nullopt ) {
2341
25
            continue;
2342
25
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
6
    return ret;
2348
6
}
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
10
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
10
    ResultSet ret;
2338
2339
38
    for (const auto& result : results) {
2340
38
        if ( result.second == std::nullopt ) {
2341
38
            continue;
2342
38
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
10
    return ret;
2348
10
}
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
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
11
    ResultSet ret;
2338
2339
39
    for (const auto& result : results) {
2340
39
        if ( result.second == std::nullopt ) {
2341
39
            continue;
2342
39
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
11
    return ret;
2348
11
}
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
14
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
14
    ResultSet ret;
2338
2339
39
    for (const auto& result : results) {
2340
39
        if ( result.second == std::nullopt ) {
2341
39
            continue;
2342
39
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
14
    return ret;
2348
14
}
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
13
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
13
    ResultSet ret;
2338
2339
39
    for (const auto& result : results) {
2340
39
        if ( result.second == std::nullopt ) {
2341
39
            continue;
2342
39
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
13
    return ret;
2348
13
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
16
    ResultSet ret;
2338
2339
49
    for (const auto& result : results) {
2340
49
        if ( result.second == std::nullopt ) {
2341
49
            continue;
2342
49
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
16
    return ret;
2348
16
}
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
9
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
9
    ResultSet ret;
2338
2339
28
    for (const auto& result : results) {
2340
28
        if ( result.second == std::nullopt ) {
2341
28
            continue;
2342
28
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
9
    return ret;
2348
9
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
16
    ResultSet ret;
2338
2339
44
    for (const auto& result : results) {
2340
44
        if ( result.second == std::nullopt ) {
2341
44
            continue;
2342
44
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
16
    return ret;
2348
16
}
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
12
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
12
    ResultSet ret;
2338
2339
37
    for (const auto& result : results) {
2340
37
        if ( result.second == std::nullopt ) {
2341
37
            continue;
2342
37
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
12
    return ret;
2348
12
}
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
19
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
19
    ResultSet ret;
2338
2339
71
    for (const auto& result : results) {
2340
71
        if ( result.second == std::nullopt ) {
2341
71
            continue;
2342
71
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
19
    return ret;
2348
19
}
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
14
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
14
    ResultSet ret;
2338
2339
39
    for (const auto& result : results) {
2340
39
        if ( result.second == std::nullopt ) {
2341
39
            continue;
2342
39
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
14
    return ret;
2348
14
}
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
14
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
14
    ResultSet ret;
2338
2339
49
    for (const auto& result : results) {
2340
49
        if ( result.second == std::nullopt ) {
2341
49
            continue;
2342
49
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
14
    return ret;
2348
14
}
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
2
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
2
    ResultSet ret;
2338
2339
8
    for (const auto& result : results) {
2340
8
        if ( result.second == std::nullopt ) {
2341
8
            continue;
2342
8
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
2
    return ret;
2348
2
}
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
9
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
9
    ResultSet ret;
2338
2339
35
    for (const auto& result : results) {
2340
35
        if ( result.second == std::nullopt ) {
2341
35
            continue;
2342
35
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
9
    return ret;
2348
9
}
2349
2350
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2351
template <>
2352
133
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
133
    (void)operations;
2354
133
    (void)results;
2355
133
    (void)data;
2356
133
    (void)size;
2357
133
}
2358
2359
template <class ResultType, class OperationType>
2360
544
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
544
    (void)operation;
2362
2363
544
    return false;
2364
544
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2360
122
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
122
    (void)operation;
2362
2363
122
    return false;
2364
122
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
Line
Count
Source
2360
47
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
47
    (void)operation;
2362
2363
47
    return false;
2364
47
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const
Line
Count
Source
2360
7
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
7
    (void)operation;
2362
2363
7
    return false;
2364
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
Line
Count
Source
2360
112
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
112
    (void)operation;
2362
2363
112
    return false;
2364
112
}
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
24
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
24
    (void)operation;
2362
2363
24
    return false;
2364
24
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const
Line
Count
Source
2360
22
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
22
    (void)operation;
2362
2363
22
    return false;
2364
22
}
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
2
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
2
    (void)operation;
2362
2363
2
    return false;
2364
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
Line
Count
Source
2360
22
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
22
    (void)operation;
2362
2363
22
    return false;
2364
22
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::dontCompare(cryptofuzz::operation::ECC_PrivateToPublic const&) const
Line
Count
Source
2360
59
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
59
    (void)operation;
2362
2363
59
    return false;
2364
59
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2360
48
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
48
    (void)operation;
2362
2363
48
    return false;
2364
48
}
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
29
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
29
    (void)operation;
2362
2363
29
    return false;
2364
29
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const
Line
Count
Source
2360
4
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
4
    (void)operation;
2362
2363
4
    return false;
2364
4
}
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
15
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
15
    (void)operation;
2362
2363
15
    return false;
2364
15
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const
Line
Count
Source
2360
11
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
11
    (void)operation;
2362
2363
11
    return false;
2364
11
}
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
1
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
1
    (void)operation;
2362
2363
1
    return false;
2364
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::dontCompare(cryptofuzz::operation::ECC_Point_Sub const&) const
Line
Count
Source
2360
1
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
1
    (void)operation;
2362
2363
1
    return false;
2364
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const
Line
Count
Source
2360
10
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
10
    (void)operation;
2362
2363
10
    return false;
2364
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg 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::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
Line
Count
Source
2360
1
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
1
    (void)operation;
2362
2363
1
    return false;
2364
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2360
1
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
1
    (void)operation;
2362
2363
1
    return false;
2364
1
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DH_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::dontCompare(cryptofuzz::operation::DH_Derive const&) const
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
233
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2368
233
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2369
233
    if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; }
2370
233
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2371
168
    if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; }
2372
2373
167
    return false;
2374
168
}
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
32
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2384
32
    if (
2385
32
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2386
32
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2387
15
        if ( operation.UseRandomNonce() ) {
2388
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2389
14
            return true;
2390
14
        }
2391
15
    }
2392
2393
18
    return false;
2394
32
}
2395
2396
template <>
2397
5
bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const {
2398
5
    if (
2399
5
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2400
5
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2401
5
        if ( operation.UseRandomNonce() ) {
2402
            /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */
2403
5
            return true;
2404
5
        }
2405
5
    }
2406
2407
0
    return false;
2408
5
}
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
185
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2427
185
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2428
2429
185
    return false;
2430
185
}
2431
2432
template <>
2433
38
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2434
38
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2435
2436
38
    return false;
2437
38
}
2438
2439
template <>
2440
34
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2441
34
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2442
2443
34
    return false;
2444
34
}
2445
2446
template <>
2447
56
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2448
56
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2449
2450
56
    return false;
2451
56
}
2452
2453
template <class ResultType, class OperationType>
2454
6.05k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
6.05k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
6.05k
    const auto filtered = filter(results);
2461
2462
6.05k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
4.92k
        return;
2465
4.92k
    }
2466
2467
1.12k
    if ( dontCompare(operations[0].second) == true ) {
2468
85
        return;
2469
85
    }
2470
2471
4.63k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
3.59k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
3.59k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
3.59k
        const bool equal = *prev == *cur;
2476
2477
3.59k
        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
3.59k
    }
2494
1.04k
}
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
345
void ExecutorBase<ResultType, OperationType>::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
345
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
345
    const auto filtered = filter(results);
2461
2462
345
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
223
        return;
2465
223
    }
2466
2467
122
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
604
    for (size_t i = 1; i < filtered.size(); i++) {
2472
482
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
482
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
482
        const bool equal = *prev == *cur;
2476
2477
482
        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
482
    }
2494
122
}
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
192
void ExecutorBase<ResultType, OperationType>::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
192
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
192
    const auto filtered = filter(results);
2461
2462
192
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
136
        return;
2465
136
    }
2466
2467
56
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
286
    for (size_t i = 1; i < filtered.size(); i++) {
2472
230
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
230
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
230
        const bool equal = *prev == *cur;
2476
2477
230
        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
230
    }
2494
56
}
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
119
void ExecutorBase<ResultType, OperationType>::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
119
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
119
    const auto filtered = filter(results);
2461
2462
119
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
72
        return;
2465
72
    }
2466
2467
47
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
339
    for (size_t i = 1; i < filtered.size(); i++) {
2472
292
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
292
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
292
        const bool equal = *prev == *cur;
2476
2477
292
        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
292
    }
2494
47
}
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
167
void ExecutorBase<ResultType, OperationType>::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
167
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
167
    const auto filtered = filter(results);
2461
2462
167
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
133
        return;
2465
133
    }
2466
2467
34
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
231
    for (size_t i = 1; i < filtered.size(); i++) {
2472
197
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
197
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
197
        const bool equal = *prev == *cur;
2476
2477
197
        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
197
    }
2494
34
}
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
843
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
843
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
843
    const auto filtered = filter(results);
2461
2462
843
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
658
        return;
2465
658
    }
2466
2467
185
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
1.09k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
912
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
912
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
912
        const bool equal = *prev == *cur;
2476
2477
912
        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
912
    }
2494
185
}
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
389
void ExecutorBase<ResultType, OperationType>::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
389
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
389
    const auto filtered = filter(results);
2461
2462
389
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
351
        return;
2465
351
    }
2466
2467
38
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
190
    for (size_t i = 1; i < filtered.size(); i++) {
2472
152
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
152
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
152
        const bool equal = *prev == *cur;
2476
2477
152
        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
152
    }
2494
38
}
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
24
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
24
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
24
    const auto filtered = filter(results);
2461
2462
24
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
17
        return;
2465
17
    }
2466
2467
7
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
52
    for (size_t i = 1; i < filtered.size(); i++) {
2472
45
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
45
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
45
        const bool equal = *prev == *cur;
2476
2477
45
        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
45
    }
2494
7
}
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
242
void ExecutorBase<ResultType, OperationType>::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
242
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
242
    const auto filtered = filter(results);
2461
2462
242
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
130
        return;
2465
130
    }
2466
2467
112
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
469
    for (size_t i = 1; i < filtered.size(); i++) {
2472
357
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
357
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
357
        const bool equal = *prev == *cur;
2476
2477
357
        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
357
    }
2494
112
}
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
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
18
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
18
    const auto filtered = filter(results);
2461
2462
18
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
18
        return;
2465
18
    }
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
22
void ExecutorBase<ResultType, OperationType>::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
22
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
22
    const auto filtered = filter(results);
2461
2462
22
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
22
        return;
2465
22
    }
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
16
void ExecutorBase<ResultType, OperationType>::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
16
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
16
    const auto filtered = filter(results);
2461
2462
16
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
16
        return;
2465
16
    }
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
138
void ExecutorBase<ResultType, OperationType>::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
138
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
138
    const auto filtered = filter(results);
2461
2462
138
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
114
        return;
2465
114
    }
2466
2467
24
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
115
    for (size_t i = 1; i < filtered.size(); i++) {
2472
91
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
91
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
91
        const bool equal = *prev == *cur;
2476
2477
91
        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
91
    }
2494
24
}
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
120
void ExecutorBase<ResultType, OperationType>::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
120
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
120
    const auto filtered = filter(results);
2461
2462
120
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
98
        return;
2465
98
    }
2466
2467
22
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
65
    for (size_t i = 1; i < filtered.size(); i++) {
2472
43
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
43
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
43
        const bool equal = *prev == *cur;
2476
2477
43
        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
43
    }
2494
22
}
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
20
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
20
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
20
    const auto filtered = filter(results);
2461
2462
20
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
20
        return;
2465
20
    }
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
11
void ExecutorBase<ResultType, OperationType>::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
11
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
11
    const auto filtered = filter(results);
2461
2462
11
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
11
        return;
2465
11
    }
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
29
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
29
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
29
    const auto filtered = filter(results);
2461
2462
29
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
27
        return;
2465
27
    }
2466
2467
2
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
4
    for (size_t i = 1; i < filtered.size(); i++) {
2472
2
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
2
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
2
        const bool equal = *prev == *cur;
2476
2477
2
        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
    }
2494
2
}
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
80
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
80
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
80
    const auto filtered = filter(results);
2461
2462
80
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
58
        return;
2465
58
    }
2466
2467
22
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
127
    for (size_t i = 1; i < filtered.size(); i++) {
2472
105
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
105
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
105
        const bool equal = *prev == *cur;
2476
2477
105
        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
105
    }
2494
22
}
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
208
void ExecutorBase<ResultType, OperationType>::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
208
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
208
    const auto filtered = filter(results);
2461
2462
208
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
149
        return;
2465
149
    }
2466
2467
59
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
151
    for (size_t i = 1; i < filtered.size(); i++) {
2472
92
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
92
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
92
        const bool equal = *prev == *cur;
2476
2477
92
        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
92
    }
2494
59
}
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
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
30
        return;
2465
30
    }
2466
2467
48
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
117
    for (size_t i = 1; i < filtered.size(); i++) {
2472
69
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
69
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
69
        const bool equal = *prev == *cur;
2476
2477
69
        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
69
    }
2494
48
}
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
13
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
13
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
13
    const auto filtered = filter(results);
2461
2462
13
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
13
        return;
2465
13
    }
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
161
void ExecutorBase<ResultType, OperationType>::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
161
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
161
    const auto filtered = filter(results);
2461
2462
161
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
129
        return;
2465
129
    }
2466
2467
32
    if ( dontCompare(operations[0].second) == true ) {
2468
14
        return;
2469
14
    }
2470
2471
66
    for (size_t i = 1; i < filtered.size(); i++) {
2472
48
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
48
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
48
        const bool equal = *prev == *cur;
2476
2477
48
        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
48
    }
2494
18
}
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
26
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
26
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
26
    const auto filtered = filter(results);
2461
2462
26
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
21
        return;
2465
21
    }
2466
2467
5
    if ( dontCompare(operations[0].second) == true ) {
2468
5
        return;
2469
5
    }
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
7
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
7
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
7
    const auto filtered = filter(results);
2461
2462
7
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
7
        return;
2465
7
    }
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
10
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
10
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
10
    const auto filtered = filter(results);
2461
2462
10
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
10
        return;
2465
10
    }
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
4
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
4
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
4
    const auto filtered = filter(results);
2461
2462
4
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
4
        return;
2465
4
    }
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
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
39
        return;
2465
39
    }
2466
2467
29
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
91
    for (size_t i = 1; i < filtered.size(); i++) {
2472
62
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
62
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
62
        const bool equal = *prev == *cur;
2476
2477
62
        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
62
    }
2494
29
}
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
23
void ExecutorBase<ResultType, OperationType>::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
23
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
23
    const auto filtered = filter(results);
2461
2462
23
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
19
        return;
2465
19
    }
2466
2467
4
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
11
    for (size_t i = 1; i < filtered.size(); i++) {
2472
7
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
7
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
7
        const bool equal = *prev == *cur;
2476
2477
7
        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
7
    }
2494
4
}
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
5
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
5
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
5
    const auto filtered = filter(results);
2461
2462
5
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
5
        return;
2465
5
    }
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
6
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
6
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
6
    const auto filtered = filter(results);
2461
2462
6
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
6
        return;
2465
6
    }
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
115
void ExecutorBase<ResultType, OperationType>::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
115
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
115
    const auto filtered = filter(results);
2461
2462
115
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
100
        return;
2465
100
    }
2466
2467
15
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
46
    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
15
}
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
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
33
        return;
2465
33
    }
2466
2467
11
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
28
    for (size_t i = 1; i < filtered.size(); i++) {
2472
17
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
17
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
17
        const bool equal = *prev == *cur;
2476
2477
17
        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
17
    }
2494
11
}
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
7
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
7
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
7
    const auto filtered = filter(results);
2461
2462
7
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
7
        return;
2465
7
    }
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
7
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
7
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
7
    const auto filtered = filter(results);
2461
2462
7
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
7
        return;
2465
7
    }
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
12
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
12
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
12
    const auto filtered = filter(results);
2461
2462
12
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
12
        return;
2465
12
    }
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
12
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
12
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
12
    const auto filtered = filter(results);
2461
2462
12
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
11
        return;
2465
11
    }
2466
2467
1
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
3
    for (size_t i = 1; i < filtered.size(); i++) {
2472
2
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
2
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
2
        const bool equal = *prev == *cur;
2476
2477
2
        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
    }
2494
1
}
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
14
void ExecutorBase<ResultType, OperationType>::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
14
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
14
    const auto filtered = filter(results);
2461
2462
14
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
13
        return;
2465
13
    }
2466
2467
1
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
2
    for (size_t i = 1; i < filtered.size(); i++) {
2472
1
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
1
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
1
        const bool equal = *prev == *cur;
2476
2477
1
        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
    }
2494
1
}
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
132
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
132
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
132
    const auto filtered = filter(results);
2461
2462
132
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
122
        return;
2465
122
    }
2466
2467
10
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
25
    for (size_t i = 1; i < filtered.size(); i++) {
2472
15
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
15
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
15
        const bool equal = *prev == *cur;
2476
2477
15
        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
15
    }
2494
10
}
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
21
void ExecutorBase<ResultType, OperationType>::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
21
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
21
    const auto filtered = filter(results);
2461
2462
21
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
15
        return;
2465
15
    }
2466
2467
6
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
20
    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
6
}
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
15
void ExecutorBase<ResultType, OperationType>::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
15
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
15
    const auto filtered = filter(results);
2461
2462
15
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
14
        return;
2465
14
    }
2466
2467
1
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
2
    for (size_t i = 1; i < filtered.size(); i++) {
2472
1
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
1
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
1
        const bool equal = *prev == *cur;
2476
2477
1
        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
    }
2494
1
}
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
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
18
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
18
    const auto filtered = filter(results);
2461
2462
18
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
17
        return;
2465
17
    }
2466
2467
1
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
5
    for (size_t i = 1; i < filtered.size(); i++) {
2472
4
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
4
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
4
        const bool equal = *prev == *cur;
2476
2477
4
        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
4
    }
2494
1
}
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
58
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
58
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
58
    const auto filtered = filter(results);
2461
2462
58
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
58
        return;
2465
58
    }
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::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
1.78k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
1.78k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
1.78k
    const auto filtered = filter(results);
2461
2462
1.78k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
1.55k
        return;
2465
1.55k
    }
2466
2467
233
    if ( dontCompare(operations[0].second) == true ) {
2468
66
        return;
2469
66
    }
2470
2471
493
    for (size_t i = 1; i < filtered.size(); i++) {
2472
326
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
326
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
326
        const bool equal = *prev == *cur;
2476
2477
326
        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
326
    }
2494
167
}
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
23
void ExecutorBase<ResultType, OperationType>::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
23
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
23
    const auto filtered = filter(results);
2461
2462
23
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
23
        return;
2465
23
    }
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
57
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
57
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
57
    const auto filtered = filter(results);
2461
2462
57
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
57
        return;
2465
57
    }
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
9
void ExecutorBase<ResultType, OperationType>::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
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
9
    const auto filtered = filter(results);
2461
2462
9
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
9
        return;
2465
9
    }
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
16
void ExecutorBase<ResultType, OperationType>::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
16
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
16
    const auto filtered = filter(results);
2461
2462
16
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
16
        return;
2465
16
    }
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
10
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
10
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
10
    const auto filtered = filter(results);
2461
2462
10
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
10
        return;
2465
10
    }
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
11
void ExecutorBase<ResultType, OperationType>::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
11
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
11
    const auto filtered = filter(results);
2461
2462
11
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
11
        return;
2465
11
    }
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
16
void ExecutorBase<ResultType, OperationType>::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
16
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
16
    const auto filtered = filter(results);
2461
2462
16
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
16
        return;
2465
16
    }
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
11
void ExecutorBase<ResultType, OperationType>::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
11
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
11
    const auto filtered = filter(results);
2461
2462
11
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
11
        return;
2465
11
    }
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
8
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
8
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
8
    const auto filtered = filter(results);
2461
2462
8
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
8
        return;
2465
8
    }
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
8
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
8
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
8
    const auto filtered = filter(results);
2461
2462
8
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
8
        return;
2465
8
    }
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
9
void ExecutorBase<ResultType, OperationType>::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
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
9
    const auto filtered = filter(results);
2461
2462
9
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
9
        return;
2465
9
    }
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
7
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
7
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
7
    const auto filtered = filter(results);
2461
2462
7
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
7
        return;
2465
7
    }
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
12
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
12
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
12
    const auto filtered = filter(results);
2461
2462
12
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
12
        return;
2465
12
    }
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
5
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
5
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
5
    const auto filtered = filter(results);
2461
2462
5
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
5
        return;
2465
5
    }
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
8
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
8
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
8
    const auto filtered = filter(results);
2461
2462
8
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
8
        return;
2465
8
    }
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
6
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
6
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
6
    const auto filtered = filter(results);
2461
2462
6
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
6
        return;
2465
6
    }
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
10
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
10
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
10
    const auto filtered = filter(results);
2461
2462
10
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
10
        return;
2465
10
    }
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
11
void ExecutorBase<ResultType, OperationType>::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
11
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
11
    const auto filtered = filter(results);
2461
2462
11
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
11
        return;
2465
11
    }
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
12
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
12
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
12
    const auto filtered = filter(results);
2461
2462
12
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
12
        return;
2465
12
    }
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
9
void ExecutorBase<ResultType, OperationType>::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
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
9
    const auto filtered = filter(results);
2461
2462
9
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
9
        return;
2465
9
    }
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
7
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
7
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
7
    const auto filtered = filter(results);
2461
2462
7
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
7
        return;
2465
7
    }
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
6
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
6
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
6
    const auto filtered = filter(results);
2461
2462
6
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
6
        return;
2465
6
    }
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
10
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
10
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
10
    const auto filtered = filter(results);
2461
2462
10
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
10
        return;
2465
10
    }
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
11
void ExecutorBase<ResultType, OperationType>::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
11
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
11
    const auto filtered = filter(results);
2461
2462
11
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
11
        return;
2465
11
    }
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
14
void ExecutorBase<ResultType, OperationType>::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
14
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
14
    const auto filtered = filter(results);
2461
2462
14
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
14
        return;
2465
14
    }
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
13
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
13
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
13
    const auto filtered = filter(results);
2461
2462
13
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
13
        return;
2465
13
    }
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
16
void ExecutorBase<ResultType, OperationType>::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
16
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
16
    const auto filtered = filter(results);
2461
2462
16
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
16
        return;
2465
16
    }
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
9
void ExecutorBase<ResultType, OperationType>::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
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
9
    const auto filtered = filter(results);
2461
2462
9
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
9
        return;
2465
9
    }
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
16
void ExecutorBase<ResultType, OperationType>::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
16
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
16
    const auto filtered = filter(results);
2461
2462
16
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
16
        return;
2465
16
    }
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
12
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
12
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
12
    const auto filtered = filter(results);
2461
2462
12
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
12
        return;
2465
12
    }
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
19
void ExecutorBase<ResultType, OperationType>::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
19
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
19
    const auto filtered = filter(results);
2461
2462
19
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
19
        return;
2465
19
    }
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
14
void ExecutorBase<ResultType, OperationType>::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
14
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
14
    const auto filtered = filter(results);
2461
2462
14
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
14
        return;
2465
14
    }
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
14
void ExecutorBase<ResultType, OperationType>::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
14
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
14
    const auto filtered = filter(results);
2461
2462
14
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
14
        return;
2465
14
    }
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
2
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
2
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
2
    const auto filtered = filter(results);
2461
2462
2
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
2
        return;
2465
2
    }
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
9
void ExecutorBase<ResultType, OperationType>::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
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
9
    const auto filtered = filter(results);
2461
2462
9
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
9
        return;
2465
9
    }
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
55.1k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
55.1k
    (void)parentDs;
2517
55.1k
    return op;
2518
55.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2515
1.78k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.78k
    (void)parentDs;
2517
1.78k
    return op;
2518
1.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2515
1.73k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.73k
    (void)parentDs;
2517
1.73k
    return op;
2518
1.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2515
1.17k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.17k
    (void)parentDs;
2517
1.17k
    return op;
2518
1.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2515
1.05k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.05k
    (void)parentDs;
2517
1.05k
    return op;
2518
1.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2515
4.82k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
4.82k
    (void)parentDs;
2517
4.82k
    return op;
2518
4.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) 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::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2515
842
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
842
    (void)parentDs;
2517
842
    return op;
2518
842
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2515
1.36k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.36k
    (void)parentDs;
2517
1.36k
    return op;
2518
1.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2515
1.01k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.01k
    (void)parentDs;
2517
1.01k
    return op;
2518
1.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2515
831
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
831
    (void)parentDs;
2517
831
    return op;
2518
831
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2515
839
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
839
    (void)parentDs;
2517
839
    return op;
2518
839
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2515
1.06k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.06k
    (void)parentDs;
2517
1.06k
    return op;
2518
1.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2515
1.26k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.26k
    (void)parentDs;
2517
1.26k
    return op;
2518
1.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2515
928
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
928
    (void)parentDs;
2517
928
    return op;
2518
928
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2515
492
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
492
    (void)parentDs;
2517
492
    return op;
2518
492
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2515
301
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
301
    (void)parentDs;
2517
301
    return op;
2518
301
}
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
969
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
969
    (void)parentDs;
2517
969
    return op;
2518
969
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2515
749
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
749
    (void)parentDs;
2517
749
    return op;
2518
749
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2515
415
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
415
    (void)parentDs;
2517
415
    return op;
2518
415
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2515
608
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
608
    (void)parentDs;
2517
608
    return op;
2518
608
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const
Line
Count
Source
2515
843
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
843
    (void)parentDs;
2517
843
    return op;
2518
843
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const
Line
Count
Source
2515
619
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
619
    (void)parentDs;
2517
619
    return op;
2518
619
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2515
842
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
842
    (void)parentDs;
2517
842
    return op;
2518
842
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const
Line
Count
Source
2515
577
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
577
    (void)parentDs;
2517
577
    return op;
2518
577
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2515
539
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
539
    (void)parentDs;
2517
539
    return op;
2518
539
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2515
569
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
569
    (void)parentDs;
2517
569
    return op;
2518
569
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2515
812
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
812
    (void)parentDs;
2517
812
    return op;
2518
812
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2515
443
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
443
    (void)parentDs;
2517
443
    return op;
2518
443
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2515
570
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
570
    (void)parentDs;
2517
570
    return op;
2518
570
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2515
82
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
82
    (void)parentDs;
2517
82
    return op;
2518
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2515
819
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
819
    (void)parentDs;
2517
819
    return op;
2518
819
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2515
336
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
336
    (void)parentDs;
2517
336
    return op;
2518
336
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2515
579
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
579
    (void)parentDs;
2517
579
    return op;
2518
579
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2515
207
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
207
    (void)parentDs;
2517
207
    return op;
2518
207
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2515
751
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
751
    (void)parentDs;
2517
751
    return op;
2518
751
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const
Line
Count
Source
2515
326
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
326
    (void)parentDs;
2517
326
    return op;
2518
326
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2515
478
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
478
    (void)parentDs;
2517
478
    return op;
2518
478
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2515
813
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
813
    (void)parentDs;
2517
813
    return op;
2518
813
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2515
650
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
650
    (void)parentDs;
2517
650
    return op;
2518
650
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2515
319
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
319
    (void)parentDs;
2517
319
    return op;
2518
319
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const
Line
Count
Source
2515
446
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
446
    (void)parentDs;
2517
446
    return op;
2518
446
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const
Line
Count
Source
2515
459
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
459
    (void)parentDs;
2517
459
    return op;
2518
459
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2515
402
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
402
    (void)parentDs;
2517
402
    return op;
2518
402
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2515
610
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
610
    (void)parentDs;
2517
610
    return op;
2518
610
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2515
327
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
327
    (void)parentDs;
2517
327
    return op;
2518
327
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2515
439
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
439
    (void)parentDs;
2517
439
    return op;
2518
439
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2515
655
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
655
    (void)parentDs;
2517
655
    return op;
2518
655
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) 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::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2515
190
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
190
    (void)parentDs;
2517
190
    return op;
2518
190
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2515
442
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
442
    (void)parentDs;
2517
442
    return op;
2518
442
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2515
47
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
47
    (void)parentDs;
2517
47
    return op;
2518
47
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2515
553
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
553
    (void)parentDs;
2517
553
    return op;
2518
553
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2515
247
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
247
    (void)parentDs;
2517
247
    return op;
2518
247
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2515
514
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
514
    (void)parentDs;
2517
514
    return op;
2518
514
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2515
387
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
387
    (void)parentDs;
2517
387
    return op;
2518
387
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2515
368
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
368
    (void)parentDs;
2517
368
    return op;
2518
368
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2515
269
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
269
    (void)parentDs;
2517
269
    return op;
2518
269
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2515
173
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
173
    (void)parentDs;
2517
173
    return op;
2518
173
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2515
713
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
713
    (void)parentDs;
2517
713
    return op;
2518
713
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2515
467
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
467
    (void)parentDs;
2517
467
    return op;
2518
467
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2515
399
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
399
    (void)parentDs;
2517
399
    return op;
2518
399
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2515
638
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
638
    (void)parentDs;
2517
638
    return op;
2518
638
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2515
813
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
813
    (void)parentDs;
2517
813
    return op;
2518
813
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2515
588
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
588
    (void)parentDs;
2517
588
    return op;
2518
588
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2515
209
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
209
    (void)parentDs;
2517
209
    return op;
2518
209
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2515
458
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
458
    (void)parentDs;
2517
458
    return op;
2518
458
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2515
162
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
162
    (void)parentDs;
2517
162
    return op;
2518
162
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const
Line
Count
Source
2515
570
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
570
    (void)parentDs;
2517
570
    return op;
2518
570
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
Line
Count
Source
2515
97
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
97
    (void)parentDs;
2517
97
    return op;
2518
97
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2515
355
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
355
    (void)parentDs;
2517
355
    return op;
2518
355
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const
Line
Count
Source
2515
290
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
290
    (void)parentDs;
2517
290
    return op;
2518
290
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2515
131
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
131
    (void)parentDs;
2517
131
    return op;
2518
131
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2515
321
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
321
    (void)parentDs;
2517
321
    return op;
2518
321
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2515
264
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
264
    (void)parentDs;
2517
264
    return op;
2518
264
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2515
377
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
377
    (void)parentDs;
2517
377
    return op;
2518
377
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2515
103
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
103
    (void)parentDs;
2517
103
    return op;
2518
103
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2515
348
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
348
    (void)parentDs;
2517
348
    return op;
2518
348
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2515
354
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
354
    (void)parentDs;
2517
354
    return op;
2518
354
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2515
918
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
918
    (void)parentDs;
2517
918
    return op;
2518
918
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2515
428
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
428
    (void)parentDs;
2517
428
    return op;
2518
428
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const
Line
Count
Source
2515
232
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
232
    (void)parentDs;
2517
232
    return op;
2518
232
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2515
572
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
572
    (void)parentDs;
2517
572
    return op;
2518
572
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2515
361
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
361
    (void)parentDs;
2517
361
    return op;
2518
361
}
2519
2520
134
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2521
134
    (void)parentDs;
2522
134
    op.modulo = modulo;
2523
134
    return op;
2524
134
}
2525
2526
80
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2527
80
    (void)parentDs;
2528
80
    op.modulo = modulo;
2529
80
    return op;
2530
80
}
2531
2532
10
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2533
10
    (void)parentDs;
2534
10
    op.modulo = modulo;
2535
10
    return op;
2536
10
}
2537
2538
26
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2539
26
    (void)parentDs;
2540
26
    op.modulo = modulo;
2541
26
    return op;
2542
26
}
2543
2544
33
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2545
33
    (void)parentDs;
2546
33
    op.modulo = modulo;
2547
33
    return op;
2548
33
}
2549
2550
262
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2551
262
    (void)parentDs;
2552
262
    op.modulo = modulo;
2553
262
    return op;
2554
262
}
2555
2556
134
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2557
134
    (void)parentDs;
2558
134
    op.modulo = modulo;
2559
134
    return op;
2560
134
}
2561
2562
96
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2563
96
    (void)parentDs;
2564
96
    op.modulo = modulo;
2565
96
    return op;
2566
96
}
2567
2568
32
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2569
32
    (void)parentDs;
2570
32
    op.modulo = modulo;
2571
32
    return op;
2572
32
}
2573
2574
142
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2575
142
    (void)parentDs;
2576
142
    op.modulo = modulo;
2577
142
    return op;
2578
142
}
2579
2580
212
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2581
212
    (void)parentDs;
2582
212
    op.modulo = modulo;
2583
212
    return op;
2584
212
}
2585
2586
170
operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2587
170
    (void)parentDs;
2588
170
    op.modulo = modulo;
2589
170
    return op;
2590
170
}
2591
2592
37
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2593
37
    (void)parentDs;
2594
37
    op.modulo = modulo;
2595
37
    return op;
2596
37
}
2597
2598
22
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2599
22
    (void)parentDs;
2600
22
    op.modulo = modulo;
2601
22
    return op;
2602
22
}
2603
2604
191
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2605
191
    (void)parentDs;
2606
191
    op.modulo = modulo;
2607
191
    return op;
2608
191
}
2609
2610
21
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2611
21
    (void)parentDs;
2612
21
    op.modulo = modulo;
2613
21
    return op;
2614
21
}
2615
2616
163
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2617
163
    (void)parentDs;
2618
163
    op.modulo = modulo;
2619
163
    return op;
2620
163
}
2621
2622
223
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2623
223
    (void)parentDs;
2624
223
    op.modulo = modulo;
2625
223
    return op;
2626
223
}
2627
2628
25
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2629
25
    (void)parentDs;
2630
25
    op.modulo = modulo;
2631
25
    return op;
2632
25
}
2633
2634
390
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2635
390
    (void)parentDs;
2636
390
    op.modulo = modulo;
2637
390
    return op;
2638
390
}
2639
2640
93
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2641
93
    (void)parentDs;
2642
93
    op.modulo = modulo;
2643
93
    return op;
2644
93
}
2645
2646
13
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2647
13
    (void)parentDs;
2648
13
    op.modulo = modulo;
2649
13
    return op;
2650
13
}
2651
2652
template <class ResultType, class OperationType>
2653
58.3k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
58.3k
    Datasource ds(data, size);
2655
58.3k
    if ( parentDs != nullptr ) {
2656
58.3k
        auto modifier = parentDs->GetData(0);
2657
58.3k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
58.3k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
58.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.79k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.79k
    Datasource ds(data, size);
2655
1.79k
    if ( parentDs != nullptr ) {
2656
1.79k
        auto modifier = parentDs->GetData(0);
2657
1.79k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.79k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.75k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.75k
    Datasource ds(data, size);
2655
1.75k
    if ( parentDs != nullptr ) {
2656
1.75k
        auto modifier = parentDs->GetData(0);
2657
1.75k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.75k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.17k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.17k
    Datasource ds(data, size);
2655
1.17k
    if ( parentDs != nullptr ) {
2656
1.17k
        auto modifier = parentDs->GetData(0);
2657
1.17k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.17k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.07k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.07k
    Datasource ds(data, size);
2655
1.07k
    if ( parentDs != nullptr ) {
2656
1.07k
        auto modifier = parentDs->GetData(0);
2657
1.07k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.07k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
4.83k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
4.83k
    Datasource ds(data, size);
2655
4.83k
    if ( parentDs != nullptr ) {
2656
4.83k
        auto modifier = parentDs->GetData(0);
2657
4.83k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
4.83k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
4.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.66k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.66k
    Datasource ds(data, size);
2655
2.66k
    if ( parentDs != nullptr ) {
2656
2.66k
        auto modifier = parentDs->GetData(0);
2657
2.66k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.66k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
857
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
857
    Datasource ds(data, size);
2655
857
    if ( parentDs != nullptr ) {
2656
857
        auto modifier = parentDs->GetData(0);
2657
857
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
857
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
857
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.37k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.37k
    Datasource ds(data, size);
2655
1.37k
    if ( parentDs != nullptr ) {
2656
1.37k
        auto modifier = parentDs->GetData(0);
2657
1.37k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.37k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.03k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.03k
    Datasource ds(data, size);
2655
1.03k
    if ( parentDs != nullptr ) {
2656
1.03k
        auto modifier = parentDs->GetData(0);
2657
1.03k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.03k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
843
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
843
    Datasource ds(data, size);
2655
843
    if ( parentDs != nullptr ) {
2656
843
        auto modifier = parentDs->GetData(0);
2657
843
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
843
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
843
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
855
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
855
    Datasource ds(data, size);
2655
855
    if ( parentDs != nullptr ) {
2656
855
        auto modifier = parentDs->GetData(0);
2657
855
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
855
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
855
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.08k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.08k
    Datasource ds(data, size);
2655
1.08k
    if ( parentDs != nullptr ) {
2656
1.08k
        auto modifier = parentDs->GetData(0);
2657
1.08k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.08k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.27k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.27k
    Datasource ds(data, size);
2655
1.27k
    if ( parentDs != nullptr ) {
2656
1.27k
        auto modifier = parentDs->GetData(0);
2657
1.27k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.27k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.27k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
947
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
947
    Datasource ds(data, size);
2655
947
    if ( parentDs != nullptr ) {
2656
947
        auto modifier = parentDs->GetData(0);
2657
947
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
947
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
947
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
504
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
504
    Datasource ds(data, size);
2655
504
    if ( parentDs != nullptr ) {
2656
504
        auto modifier = parentDs->GetData(0);
2657
504
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
504
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
504
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
311
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
311
    Datasource ds(data, size);
2655
311
    if ( parentDs != nullptr ) {
2656
311
        auto modifier = parentDs->GetData(0);
2657
311
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
311
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
311
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
985
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
985
    Datasource ds(data, size);
2655
985
    if ( parentDs != nullptr ) {
2656
985
        auto modifier = parentDs->GetData(0);
2657
985
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
985
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
985
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
757
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
757
    Datasource ds(data, size);
2655
757
    if ( parentDs != nullptr ) {
2656
757
        auto modifier = parentDs->GetData(0);
2657
757
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
757
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
757
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
419
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
419
    Datasource ds(data, size);
2655
419
    if ( parentDs != nullptr ) {
2656
419
        auto modifier = parentDs->GetData(0);
2657
419
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
419
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
419
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
619
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
619
    Datasource ds(data, size);
2655
619
    if ( parentDs != nullptr ) {
2656
619
        auto modifier = parentDs->GetData(0);
2657
619
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
619
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
619
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
848
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
848
    Datasource ds(data, size);
2655
848
    if ( parentDs != nullptr ) {
2656
848
        auto modifier = parentDs->GetData(0);
2657
848
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
848
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
848
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
629
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
629
    Datasource ds(data, size);
2655
629
    if ( parentDs != nullptr ) {
2656
629
        auto modifier = parentDs->GetData(0);
2657
629
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
629
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
629
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
849
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
849
    Datasource ds(data, size);
2655
849
    if ( parentDs != nullptr ) {
2656
849
        auto modifier = parentDs->GetData(0);
2657
849
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
849
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
849
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
584
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
584
    Datasource ds(data, size);
2655
584
    if ( parentDs != nullptr ) {
2656
584
        auto modifier = parentDs->GetData(0);
2657
584
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
584
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
584
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
544
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
544
    Datasource ds(data, size);
2655
544
    if ( parentDs != nullptr ) {
2656
544
        auto modifier = parentDs->GetData(0);
2657
544
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
544
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
544
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
576
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
576
    Datasource ds(data, size);
2655
576
    if ( parentDs != nullptr ) {
2656
576
        auto modifier = parentDs->GetData(0);
2657
576
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
576
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
576
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
825
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
825
    Datasource ds(data, size);
2655
825
    if ( parentDs != nullptr ) {
2656
825
        auto modifier = parentDs->GetData(0);
2657
825
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
825
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
825
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
450
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
450
    Datasource ds(data, size);
2655
450
    if ( parentDs != nullptr ) {
2656
450
        auto modifier = parentDs->GetData(0);
2657
450
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
450
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
450
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
577
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
577
    Datasource ds(data, size);
2655
577
    if ( parentDs != nullptr ) {
2656
577
        auto modifier = parentDs->GetData(0);
2657
577
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
577
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
577
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
85
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
85
    Datasource ds(data, size);
2655
85
    if ( parentDs != nullptr ) {
2656
85
        auto modifier = parentDs->GetData(0);
2657
85
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
85
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
85
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
825
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
825
    Datasource ds(data, size);
2655
825
    if ( parentDs != nullptr ) {
2656
825
        auto modifier = parentDs->GetData(0);
2657
825
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
825
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
825
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
341
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
341
    Datasource ds(data, size);
2655
341
    if ( parentDs != nullptr ) {
2656
341
        auto modifier = parentDs->GetData(0);
2657
341
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
341
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
341
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
588
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
588
    Datasource ds(data, size);
2655
588
    if ( parentDs != nullptr ) {
2656
588
        auto modifier = parentDs->GetData(0);
2657
588
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
588
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
588
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
213
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
213
    Datasource ds(data, size);
2655
213
    if ( parentDs != nullptr ) {
2656
213
        auto modifier = parentDs->GetData(0);
2657
213
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
213
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
213
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
761
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
761
    Datasource ds(data, size);
2655
761
    if ( parentDs != nullptr ) {
2656
761
        auto modifier = parentDs->GetData(0);
2657
761
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
761
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
761
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
333
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
333
    Datasource ds(data, size);
2655
333
    if ( parentDs != nullptr ) {
2656
333
        auto modifier = parentDs->GetData(0);
2657
333
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
333
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
333
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
490
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
490
    Datasource ds(data, size);
2655
490
    if ( parentDs != nullptr ) {
2656
490
        auto modifier = parentDs->GetData(0);
2657
490
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
490
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
490
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
818
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
818
    Datasource ds(data, size);
2655
818
    if ( parentDs != nullptr ) {
2656
818
        auto modifier = parentDs->GetData(0);
2657
818
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
818
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
818
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
653
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
653
    Datasource ds(data, size);
2655
653
    if ( parentDs != nullptr ) {
2656
653
        auto modifier = parentDs->GetData(0);
2657
653
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
653
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
653
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
325
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
325
    Datasource ds(data, size);
2655
325
    if ( parentDs != nullptr ) {
2656
325
        auto modifier = parentDs->GetData(0);
2657
325
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
325
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
325
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
451
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
451
    Datasource ds(data, size);
2655
451
    if ( parentDs != nullptr ) {
2656
451
        auto modifier = parentDs->GetData(0);
2657
451
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
451
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
451
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
463
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
463
    Datasource ds(data, size);
2655
463
    if ( parentDs != nullptr ) {
2656
463
        auto modifier = parentDs->GetData(0);
2657
463
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
463
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
463
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
407
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
407
    Datasource ds(data, size);
2655
407
    if ( parentDs != nullptr ) {
2656
407
        auto modifier = parentDs->GetData(0);
2657
407
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
407
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
407
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
613
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
613
    Datasource ds(data, size);
2655
613
    if ( parentDs != nullptr ) {
2656
613
        auto modifier = parentDs->GetData(0);
2657
613
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
613
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
613
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
335
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
335
    Datasource ds(data, size);
2655
335
    if ( parentDs != nullptr ) {
2656
335
        auto modifier = parentDs->GetData(0);
2657
335
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
335
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
335
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
445
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
445
    Datasource ds(data, size);
2655
445
    if ( parentDs != nullptr ) {
2656
445
        auto modifier = parentDs->GetData(0);
2657
445
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
445
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
445
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
661
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
661
    Datasource ds(data, size);
2655
661
    if ( parentDs != nullptr ) {
2656
661
        auto modifier = parentDs->GetData(0);
2657
661
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
661
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
661
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
4.93k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
4.93k
    Datasource ds(data, size);
2655
4.93k
    if ( parentDs != nullptr ) {
2656
4.93k
        auto modifier = parentDs->GetData(0);
2657
4.93k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
4.93k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
4.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
195
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
195
    Datasource ds(data, size);
2655
195
    if ( parentDs != nullptr ) {
2656
195
        auto modifier = parentDs->GetData(0);
2657
195
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
195
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
195
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
452
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
452
    Datasource ds(data, size);
2655
452
    if ( parentDs != nullptr ) {
2656
452
        auto modifier = parentDs->GetData(0);
2657
452
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
452
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
452
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
48
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
48
    Datasource ds(data, size);
2655
48
    if ( parentDs != nullptr ) {
2656
48
        auto modifier = parentDs->GetData(0);
2657
48
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
48
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
48
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
560
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
560
    Datasource ds(data, size);
2655
560
    if ( parentDs != nullptr ) {
2656
560
        auto modifier = parentDs->GetData(0);
2657
560
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
560
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
560
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
250
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
250
    Datasource ds(data, size);
2655
250
    if ( parentDs != nullptr ) {
2656
250
        auto modifier = parentDs->GetData(0);
2657
250
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
250
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
250
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
526
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
526
    Datasource ds(data, size);
2655
526
    if ( parentDs != nullptr ) {
2656
526
        auto modifier = parentDs->GetData(0);
2657
526
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
526
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
526
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
407
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
407
    Datasource ds(data, size);
2655
407
    if ( parentDs != nullptr ) {
2656
407
        auto modifier = parentDs->GetData(0);
2657
407
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
407
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
407
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
387
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
387
    Datasource ds(data, size);
2655
387
    if ( parentDs != nullptr ) {
2656
387
        auto modifier = parentDs->GetData(0);
2657
387
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
387
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
387
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
286
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
286
    Datasource ds(data, size);
2655
286
    if ( parentDs != nullptr ) {
2656
286
        auto modifier = parentDs->GetData(0);
2657
286
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
286
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
286
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
176
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
176
    Datasource ds(data, size);
2655
176
    if ( parentDs != nullptr ) {
2656
176
        auto modifier = parentDs->GetData(0);
2657
176
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
176
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
176
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
718
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
718
    Datasource ds(data, size);
2655
718
    if ( parentDs != nullptr ) {
2656
718
        auto modifier = parentDs->GetData(0);
2657
718
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
718
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
718
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
471
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
471
    Datasource ds(data, size);
2655
471
    if ( parentDs != nullptr ) {
2656
471
        auto modifier = parentDs->GetData(0);
2657
471
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
471
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
471
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
411
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
411
    Datasource ds(data, size);
2655
411
    if ( parentDs != nullptr ) {
2656
411
        auto modifier = parentDs->GetData(0);
2657
411
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
411
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
411
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
643
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
643
    Datasource ds(data, size);
2655
643
    if ( parentDs != nullptr ) {
2656
643
        auto modifier = parentDs->GetData(0);
2657
643
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
643
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
643
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
816
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
816
    Datasource ds(data, size);
2655
816
    if ( parentDs != nullptr ) {
2656
816
        auto modifier = parentDs->GetData(0);
2657
816
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
816
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
816
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
593
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
593
    Datasource ds(data, size);
2655
593
    if ( parentDs != nullptr ) {
2656
593
        auto modifier = parentDs->GetData(0);
2657
593
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
593
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
593
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
213
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
213
    Datasource ds(data, size);
2655
213
    if ( parentDs != nullptr ) {
2656
213
        auto modifier = parentDs->GetData(0);
2657
213
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
213
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
213
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
468
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
468
    Datasource ds(data, size);
2655
468
    if ( parentDs != nullptr ) {
2656
468
        auto modifier = parentDs->GetData(0);
2657
468
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
468
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
468
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
171
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
171
    Datasource ds(data, size);
2655
171
    if ( parentDs != nullptr ) {
2656
171
        auto modifier = parentDs->GetData(0);
2657
171
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
171
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
171
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
578
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
578
    Datasource ds(data, size);
2655
578
    if ( parentDs != nullptr ) {
2656
578
        auto modifier = parentDs->GetData(0);
2657
578
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
578
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
578
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
99
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
99
    Datasource ds(data, size);
2655
99
    if ( parentDs != nullptr ) {
2656
99
        auto modifier = parentDs->GetData(0);
2657
99
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
99
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
99
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
358
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
358
    Datasource ds(data, size);
2655
358
    if ( parentDs != nullptr ) {
2656
358
        auto modifier = parentDs->GetData(0);
2657
358
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
358
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
358
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
294
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
294
    Datasource ds(data, size);
2655
294
    if ( parentDs != nullptr ) {
2656
294
        auto modifier = parentDs->GetData(0);
2657
294
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
294
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
294
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
134
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
134
    Datasource ds(data, size);
2655
134
    if ( parentDs != nullptr ) {
2656
134
        auto modifier = parentDs->GetData(0);
2657
134
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
134
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
134
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
330
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
330
    Datasource ds(data, size);
2655
330
    if ( parentDs != nullptr ) {
2656
330
        auto modifier = parentDs->GetData(0);
2657
330
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
330
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
330
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
270
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
270
    Datasource ds(data, size);
2655
270
    if ( parentDs != nullptr ) {
2656
270
        auto modifier = parentDs->GetData(0);
2657
270
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
270
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
270
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
380
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
380
    Datasource ds(data, size);
2655
380
    if ( parentDs != nullptr ) {
2656
380
        auto modifier = parentDs->GetData(0);
2657
380
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
380
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
380
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
106
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
106
    Datasource ds(data, size);
2655
106
    if ( parentDs != nullptr ) {
2656
106
        auto modifier = parentDs->GetData(0);
2657
106
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
106
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
106
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
354
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
354
    Datasource ds(data, size);
2655
354
    if ( parentDs != nullptr ) {
2656
354
        auto modifier = parentDs->GetData(0);
2657
354
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
354
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
354
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
358
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
358
    Datasource ds(data, size);
2655
358
    if ( parentDs != nullptr ) {
2656
358
        auto modifier = parentDs->GetData(0);
2657
358
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
358
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
358
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
927
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
927
    Datasource ds(data, size);
2655
927
    if ( parentDs != nullptr ) {
2656
927
        auto modifier = parentDs->GetData(0);
2657
927
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
927
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
927
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
431
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
431
    Datasource ds(data, size);
2655
431
    if ( parentDs != nullptr ) {
2656
431
        auto modifier = parentDs->GetData(0);
2657
431
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
431
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
431
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
246
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
246
    Datasource ds(data, size);
2655
246
    if ( parentDs != nullptr ) {
2656
246
        auto modifier = parentDs->GetData(0);
2657
246
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
246
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
246
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
579
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
579
    Datasource ds(data, size);
2655
579
    if ( parentDs != nullptr ) {
2656
579
        auto modifier = parentDs->GetData(0);
2657
579
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
579
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
579
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
368
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
368
    Datasource ds(data, size);
2655
368
    if ( parentDs != nullptr ) {
2656
368
        auto modifier = parentDs->GetData(0);
2657
368
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
368
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
368
}
2662
2663
template <class ResultType, class OperationType>
2664
57.6k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
57.6k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
57.6k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
57.6k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
57.6k
    if ( modules.find(moduleID) == modules.end() ) {
2678
40.8k
        return nullptr;
2679
40.8k
    }
2680
2681
16.8k
    return modules.at(moduleID);
2682
57.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.78k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.78k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.78k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.78k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.78k
    if ( modules.find(moduleID) == modules.end() ) {
2678
846
        return nullptr;
2679
846
    }
2680
2681
937
    return modules.at(moduleID);
2682
1.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.73k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.73k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.73k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.73k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.73k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.17k
        return nullptr;
2679
1.17k
    }
2680
2681
563
    return modules.at(moduleID);
2682
1.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.17k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.17k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.17k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.17k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.17k
    if ( modules.find(moduleID) == modules.end() ) {
2678
482
        return nullptr;
2679
482
    }
2680
2681
688
    return modules.at(moduleID);
2682
1.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.05k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.05k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.05k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.05k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.05k
    if ( modules.find(moduleID) == modules.end() ) {
2678
522
        return nullptr;
2679
522
    }
2680
2681
534
    return modules.at(moduleID);
2682
1.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
4.82k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
4.82k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
4.82k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
4.82k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
4.82k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.99k
        return nullptr;
2679
1.99k
    }
2680
2681
2.82k
    return modules.at(moduleID);
2682
4.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::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.02k
        return nullptr;
2679
1.02k
    }
2680
2681
1.62k
    return modules.at(moduleID);
2682
2.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
842
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
842
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
842
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
842
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
842
    if ( modules.find(moduleID) == modules.end() ) {
2678
673
        return nullptr;
2679
673
    }
2680
2681
169
    return modules.at(moduleID);
2682
842
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.36k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.36k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.36k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.36k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.36k
    if ( modules.find(moduleID) == modules.end() ) {
2678
650
        return nullptr;
2679
650
    }
2680
2681
714
    return modules.at(moduleID);
2682
1.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.01k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.01k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.01k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.01k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.01k
    if ( modules.find(moduleID) == modules.end() ) {
2678
848
        return nullptr;
2679
848
    }
2680
2681
168
    return modules.at(moduleID);
2682
1.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
831
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
831
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
831
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
831
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
831
    if ( modules.find(moduleID) == modules.end() ) {
2678
661
        return nullptr;
2679
661
    }
2680
2681
170
    return modules.at(moduleID);
2682
831
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
839
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
839
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
839
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
839
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
839
    if ( modules.find(moduleID) == modules.end() ) {
2678
737
        return nullptr;
2679
737
    }
2680
2681
102
    return modules.at(moduleID);
2682
839
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.06k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.06k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.06k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.06k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.06k
    if ( modules.find(moduleID) == modules.end() ) {
2678
706
        return nullptr;
2679
706
    }
2680
2681
360
    return modules.at(moduleID);
2682
1.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.26k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.26k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.26k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.26k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.26k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.03k
        return nullptr;
2679
1.03k
    }
2680
2681
223
    return modules.at(moduleID);
2682
1.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
928
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
928
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
928
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
928
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
928
    if ( modules.find(moduleID) == modules.end() ) {
2678
797
        return nullptr;
2679
797
    }
2680
2681
131
    return modules.at(moduleID);
2682
928
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
492
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
492
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
492
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
492
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
492
    if ( modules.find(moduleID) == modules.end() ) {
2678
358
        return nullptr;
2679
358
    }
2680
2681
134
    return modules.at(moduleID);
2682
492
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
301
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
301
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
301
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
301
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
301
    if ( modules.find(moduleID) == modules.end() ) {
2678
250
        return nullptr;
2679
250
    }
2680
2681
51
    return modules.at(moduleID);
2682
301
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
969
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
969
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
969
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
969
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
969
    if ( modules.find(moduleID) == modules.end() ) {
2678
640
        return nullptr;
2679
640
    }
2680
2681
329
    return modules.at(moduleID);
2682
969
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
749
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
749
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
749
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
749
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
749
    if ( modules.find(moduleID) == modules.end() ) {
2678
385
        return nullptr;
2679
385
    }
2680
2681
364
    return modules.at(moduleID);
2682
749
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
415
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
415
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
415
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
415
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
415
    if ( modules.find(moduleID) == modules.end() ) {
2678
292
        return nullptr;
2679
292
    }
2680
2681
123
    return modules.at(moduleID);
2682
415
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
608
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
608
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
608
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
608
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
608
    if ( modules.find(moduleID) == modules.end() ) {
2678
422
        return nullptr;
2679
422
    }
2680
2681
186
    return modules.at(moduleID);
2682
608
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
843
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
843
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
843
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
843
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
843
    if ( modules.find(moduleID) == modules.end() ) {
2678
788
        return nullptr;
2679
788
    }
2680
2681
55
    return modules.at(moduleID);
2682
843
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
619
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
619
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
619
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
619
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
619
    if ( modules.find(moduleID) == modules.end() ) {
2678
302
        return nullptr;
2679
302
    }
2680
2681
317
    return modules.at(moduleID);
2682
619
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
842
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
842
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
842
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
842
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
842
    if ( modules.find(moduleID) == modules.end() ) {
2678
771
        return nullptr;
2679
771
    }
2680
2681
71
    return modules.at(moduleID);
2682
842
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
577
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
577
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
577
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
577
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
577
    if ( modules.find(moduleID) == modules.end() ) {
2678
541
        return nullptr;
2679
541
    }
2680
2681
36
    return modules.at(moduleID);
2682
577
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
539
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
539
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
539
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
539
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
539
    if ( modules.find(moduleID) == modules.end() ) {
2678
496
        return nullptr;
2679
496
    }
2680
2681
43
    return modules.at(moduleID);
2682
539
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
569
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
569
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
569
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
569
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
569
    if ( modules.find(moduleID) == modules.end() ) {
2678
548
        return nullptr;
2679
548
    }
2680
2681
21
    return modules.at(moduleID);
2682
569
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
812
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
812
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
812
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
812
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
812
    if ( modules.find(moduleID) == modules.end() ) {
2678
646
        return nullptr;
2679
646
    }
2680
2681
166
    return modules.at(moduleID);
2682
812
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
443
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
443
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
443
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
443
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
443
    if ( modules.find(moduleID) == modules.end() ) {
2678
392
        return nullptr;
2679
392
    }
2680
2681
51
    return modules.at(moduleID);
2682
443
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
570
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
570
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
570
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
570
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
570
    if ( modules.find(moduleID) == modules.end() ) {
2678
541
        return nullptr;
2679
541
    }
2680
2681
29
    return modules.at(moduleID);
2682
570
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
82
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
82
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
82
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
82
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
82
    if ( modules.find(moduleID) == modules.end() ) {
2678
55
        return nullptr;
2679
55
    }
2680
2681
27
    return modules.at(moduleID);
2682
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
819
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
819
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
819
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
819
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
819
    if ( modules.find(moduleID) == modules.end() ) {
2678
623
        return nullptr;
2679
623
    }
2680
2681
196
    return modules.at(moduleID);
2682
819
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
336
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
336
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
336
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
336
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
336
    if ( modules.find(moduleID) == modules.end() ) {
2678
258
        return nullptr;
2679
258
    }
2680
2681
78
    return modules.at(moduleID);
2682
336
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
579
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
579
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
579
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
579
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
579
    if ( modules.find(moduleID) == modules.end() ) {
2678
537
        return nullptr;
2679
537
    }
2680
2681
42
    return modules.at(moduleID);
2682
579
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
207
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
207
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
207
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
207
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
207
    if ( modules.find(moduleID) == modules.end() ) {
2678
170
        return nullptr;
2679
170
    }
2680
2681
37
    return modules.at(moduleID);
2682
207
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
751
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
751
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
751
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
751
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
751
    if ( modules.find(moduleID) == modules.end() ) {
2678
715
        return nullptr;
2679
715
    }
2680
2681
36
    return modules.at(moduleID);
2682
751
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
326
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
326
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
326
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
326
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
326
    if ( modules.find(moduleID) == modules.end() ) {
2678
285
        return nullptr;
2679
285
    }
2680
2681
41
    return modules.at(moduleID);
2682
326
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
478
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
478
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
478
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
478
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
478
    if ( modules.find(moduleID) == modules.end() ) {
2678
439
        return nullptr;
2679
439
    }
2680
2681
39
    return modules.at(moduleID);
2682
478
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
813
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
813
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
813
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
813
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
813
    if ( modules.find(moduleID) == modules.end() ) {
2678
767
        return nullptr;
2679
767
    }
2680
2681
46
    return modules.at(moduleID);
2682
813
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
650
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
650
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
650
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
650
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
650
    if ( modules.find(moduleID) == modules.end() ) {
2678
608
        return nullptr;
2679
608
    }
2680
2681
42
    return modules.at(moduleID);
2682
650
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
319
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
319
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
319
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
319
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
319
    if ( modules.find(moduleID) == modules.end() ) {
2678
249
        return nullptr;
2679
249
    }
2680
2681
70
    return modules.at(moduleID);
2682
319
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
446
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
446
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
446
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
446
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
446
    if ( modules.find(moduleID) == modules.end() ) {
2678
393
        return nullptr;
2679
393
    }
2680
2681
53
    return modules.at(moduleID);
2682
446
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
459
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
459
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
459
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
459
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
459
    if ( modules.find(moduleID) == modules.end() ) {
2678
195
        return nullptr;
2679
195
    }
2680
2681
264
    return modules.at(moduleID);
2682
459
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
402
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
402
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
402
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
402
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
402
    if ( modules.find(moduleID) == modules.end() ) {
2678
335
        return nullptr;
2679
335
    }
2680
2681
67
    return modules.at(moduleID);
2682
402
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
610
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
610
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
610
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
610
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
610
    if ( modules.find(moduleID) == modules.end() ) {
2678
563
        return nullptr;
2679
563
    }
2680
2681
47
    return modules.at(moduleID);
2682
610
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
327
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
327
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
327
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
327
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
327
    if ( modules.find(moduleID) == modules.end() ) {
2678
258
        return nullptr;
2679
258
    }
2680
2681
69
    return modules.at(moduleID);
2682
327
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
439
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
439
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
439
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
439
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
439
    if ( modules.find(moduleID) == modules.end() ) {
2678
386
        return nullptr;
2679
386
    }
2680
2681
53
    return modules.at(moduleID);
2682
439
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
655
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
655
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
655
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
655
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
655
    if ( modules.find(moduleID) == modules.end() ) {
2678
539
        return nullptr;
2679
539
    }
2680
2681
116
    return modules.at(moduleID);
2682
655
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
4.91k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
4.91k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
4.91k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
4.91k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
4.91k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.34k
        return nullptr;
2679
2.34k
    }
2680
2681
2.57k
    return modules.at(moduleID);
2682
4.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
190
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
190
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
190
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
190
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
190
    if ( modules.find(moduleID) == modules.end() ) {
2678
106
        return nullptr;
2679
106
    }
2680
2681
84
    return modules.at(moduleID);
2682
190
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
442
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
442
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
442
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
442
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
442
    if ( modules.find(moduleID) == modules.end() ) {
2678
320
        return nullptr;
2679
320
    }
2680
2681
122
    return modules.at(moduleID);
2682
442
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
47
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
47
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
47
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
47
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
47
    if ( modules.find(moduleID) == modules.end() ) {
2678
22
        return nullptr;
2679
22
    }
2680
2681
25
    return modules.at(moduleID);
2682
47
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
553
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
553
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
553
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
553
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
553
    if ( modules.find(moduleID) == modules.end() ) {
2678
502
        return nullptr;
2679
502
    }
2680
2681
51
    return modules.at(moduleID);
2682
553
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
247
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
247
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
247
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
247
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
247
    if ( modules.find(moduleID) == modules.end() ) {
2678
199
        return nullptr;
2679
199
    }
2680
2681
48
    return modules.at(moduleID);
2682
247
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
514
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
514
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
514
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
514
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
514
    if ( modules.find(moduleID) == modules.end() ) {
2678
471
        return nullptr;
2679
471
    }
2680
2681
43
    return modules.at(moduleID);
2682
514
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
387
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
387
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
387
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
387
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
387
    if ( modules.find(moduleID) == modules.end() ) {
2678
328
        return nullptr;
2679
328
    }
2680
2681
59
    return modules.at(moduleID);
2682
387
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
368
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
368
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
368
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
368
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
368
    if ( modules.find(moduleID) == modules.end() ) {
2678
312
        return nullptr;
2679
312
    }
2680
2681
56
    return modules.at(moduleID);
2682
368
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
269
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
269
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
269
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
269
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
269
    if ( modules.find(moduleID) == modules.end() ) {
2678
224
        return nullptr;
2679
224
    }
2680
2681
45
    return modules.at(moduleID);
2682
269
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
173
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
173
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
173
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
173
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
173
    if ( modules.find(moduleID) == modules.end() ) {
2678
127
        return nullptr;
2679
127
    }
2680
2681
46
    return modules.at(moduleID);
2682
173
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
713
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
713
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
713
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
713
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
713
    if ( modules.find(moduleID) == modules.end() ) {
2678
658
        return nullptr;
2679
658
    }
2680
2681
55
    return modules.at(moduleID);
2682
713
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
467
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
467
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
467
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
467
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
467
    if ( modules.find(moduleID) == modules.end() ) {
2678
411
        return nullptr;
2679
411
    }
2680
2681
56
    return modules.at(moduleID);
2682
467
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
399
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
399
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
399
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
399
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
399
    if ( modules.find(moduleID) == modules.end() ) {
2678
357
        return nullptr;
2679
357
    }
2680
2681
42
    return modules.at(moduleID);
2682
399
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
638
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
638
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
638
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
638
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
638
    if ( modules.find(moduleID) == modules.end() ) {
2678
598
        return nullptr;
2679
598
    }
2680
2681
40
    return modules.at(moduleID);
2682
638
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
813
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
813
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
813
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
813
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
813
    if ( modules.find(moduleID) == modules.end() ) {
2678
780
        return nullptr;
2679
780
    }
2680
2681
33
    return modules.at(moduleID);
2682
813
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
588
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
588
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
588
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
588
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
588
    if ( modules.find(moduleID) == modules.end() ) {
2678
550
        return nullptr;
2679
550
    }
2680
2681
38
    return modules.at(moduleID);
2682
588
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
209
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
209
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
209
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
209
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
209
    if ( modules.find(moduleID) == modules.end() ) {
2678
157
        return nullptr;
2679
157
    }
2680
2681
52
    return modules.at(moduleID);
2682
209
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
458
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
458
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
458
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
458
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
458
    if ( modules.find(moduleID) == modules.end() ) {
2678
411
        return nullptr;
2679
411
    }
2680
2681
47
    return modules.at(moduleID);
2682
458
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
162
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
162
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
162
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
162
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
162
    if ( modules.find(moduleID) == modules.end() ) {
2678
107
        return nullptr;
2679
107
    }
2680
2681
55
    return modules.at(moduleID);
2682
162
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
570
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
570
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
570
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
570
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
570
    if ( modules.find(moduleID) == modules.end() ) {
2678
544
        return nullptr;
2679
544
    }
2680
2681
26
    return modules.at(moduleID);
2682
570
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
97
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
97
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
97
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
97
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
97
    if ( modules.find(moduleID) == modules.end() ) {
2678
69
        return nullptr;
2679
69
    }
2680
2681
28
    return modules.at(moduleID);
2682
97
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
355
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
355
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
355
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
355
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
355
    if ( modules.find(moduleID) == modules.end() ) {
2678
319
        return nullptr;
2679
319
    }
2680
2681
36
    return modules.at(moduleID);
2682
355
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
290
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
290
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
290
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
290
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
290
    if ( modules.find(moduleID) == modules.end() ) {
2678
245
        return nullptr;
2679
245
    }
2680
2681
45
    return modules.at(moduleID);
2682
290
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
131
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
131
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
131
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
131
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
131
    if ( modules.find(moduleID) == modules.end() ) {
2678
81
        return nullptr;
2679
81
    }
2680
2681
50
    return modules.at(moduleID);
2682
131
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
321
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
321
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
321
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
321
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
321
    if ( modules.find(moduleID) == modules.end() ) {
2678
267
        return nullptr;
2679
267
    }
2680
2681
54
    return modules.at(moduleID);
2682
321
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
264
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
264
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
264
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
264
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
264
    if ( modules.find(moduleID) == modules.end() ) {
2678
227
        return nullptr;
2679
227
    }
2680
2681
37
    return modules.at(moduleID);
2682
264
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
377
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
377
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
377
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
377
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
377
    if ( modules.find(moduleID) == modules.end() ) {
2678
316
        return nullptr;
2679
316
    }
2680
2681
61
    return modules.at(moduleID);
2682
377
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
103
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
103
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
103
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
103
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
103
    if ( modules.find(moduleID) == modules.end() ) {
2678
70
        return nullptr;
2679
70
    }
2680
2681
33
    return modules.at(moduleID);
2682
103
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
348
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
348
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
348
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
348
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
348
    if ( modules.find(moduleID) == modules.end() ) {
2678
302
        return nullptr;
2679
302
    }
2680
2681
46
    return modules.at(moduleID);
2682
348
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
354
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
354
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
354
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
354
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
354
    if ( modules.find(moduleID) == modules.end() ) {
2678
307
        return nullptr;
2679
307
    }
2680
2681
47
    return modules.at(moduleID);
2682
354
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
918
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
918
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
918
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
918
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
918
    if ( modules.find(moduleID) == modules.end() ) {
2678
835
        return nullptr;
2679
835
    }
2680
2681
83
    return modules.at(moduleID);
2682
918
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
428
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
428
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
428
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
428
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
428
    if ( modules.find(moduleID) == modules.end() ) {
2678
388
        return nullptr;
2679
388
    }
2680
2681
40
    return modules.at(moduleID);
2682
428
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
232
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
232
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
232
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
232
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
232
    if ( modules.find(moduleID) == modules.end() ) {
2678
158
        return nullptr;
2679
158
    }
2680
2681
74
    return modules.at(moduleID);
2682
232
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
572
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
572
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
572
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
572
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
572
    if ( modules.find(moduleID) == modules.end() ) {
2678
549
        return nullptr;
2679
549
    }
2680
2681
23
    return modules.at(moduleID);
2682
572
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
361
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
361
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
361
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
361
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
361
    if ( modules.find(moduleID) == modules.end() ) {
2678
315
        return nullptr;
2679
315
    }
2680
2681
46
    return modules.at(moduleID);
2682
361
}
2683
2684
template <class ResultType, class OperationType>
2685
8.90k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
8.90k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
8.90k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
58.3k
    do {
2691
58.3k
        auto op = getOp(&parentDs, data, size);
2692
58.3k
        auto module = getModule(parentDs);
2693
58.3k
        if ( module == nullptr ) {
2694
40.8k
            continue;
2695
40.8k
        }
2696
2697
17.5k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
17.5k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
223
            break;
2702
223
        }
2703
58.1k
    } while ( parentDs.Get<bool>() == true );
2704
2705
8.90k
    if ( operations.empty() == true ) {
2706
504
        return;
2707
504
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
8.39k
#if 1
2711
8.39k
    {
2712
8.39k
        std::set<uint64_t> moduleIDs;
2713
12.4k
        for (const auto& m : modules ) {
2714
12.4k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
12.4k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
12.4k
            moduleIDs.insert(moduleID);
2722
12.4k
        }
2723
2724
8.39k
        std::set<uint64_t> operationModuleIDs;
2725
15.0k
        for (const auto& op : operations) {
2726
15.0k
            operationModuleIDs.insert(op.first->ID);
2727
15.0k
        }
2728
2729
8.39k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
8.39k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
8.39k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
8.39k
        for (const auto& id : addModuleIDs) {
2734
5.95k
            operations.push_back({ modules.at(id), operations[0].second});
2735
5.95k
        }
2736
8.39k
    }
2737
8.39k
#endif
2738
2739
8.39k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
8.39k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
29.4k
    for (size_t i = 0; i < operations.size(); i++) {
2747
21.0k
        auto& operation = operations[i];
2748
2749
21.0k
        auto& module = operation.first;
2750
21.0k
        auto& op = operation.second;
2751
2752
21.0k
        if ( i > 0 ) {
2753
14.8k
            auto& prevModule = operations[i-1].first;
2754
14.8k
            auto& prevOp = operations[i].second;
2755
2756
14.8k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
8.35k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
8.35k
                if ( curModifier.size() == 0 ) {
2759
3.29M
                    for (size_t j = 0; j < 512; j++) {
2760
3.28M
                        curModifier.push_back(1);
2761
3.28M
                    }
2762
6.41k
                } else {
2763
32.4k
                    for (auto& c : curModifier) {
2764
32.4k
                        c++;
2765
32.4k
                    }
2766
1.93k
                }
2767
8.35k
            }
2768
14.8k
        }
2769
2770
21.0k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
21.0k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
21.0k
        const auto& result = results.back();
2777
2778
21.0k
        if ( result.second != std::nullopt ) {
2779
6.04k
            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
6.04k
        }
2786
2787
21.0k
        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.0k
        if ( options.disableTests == false ) {
2796
21.0k
            tests::test(op, result.second);
2797
21.0k
        }
2798
2799
21.0k
        postprocess(module, op, result);
2800
21.0k
    }
2801
2802
8.39k
    if ( options.noCompare == false ) {
2803
6.23k
        compare(operations, results, data, size);
2804
6.23k
    }
2805
8.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
413
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
413
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
413
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.79k
    do {
2691
1.79k
        auto op = getOp(&parentDs, data, size);
2692
1.79k
        auto module = getModule(parentDs);
2693
1.79k
        if ( module == nullptr ) {
2694
846
            continue;
2695
846
        }
2696
2697
953
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
953
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
3
            break;
2702
3
        }
2703
1.79k
    } while ( parentDs.Get<bool>() == true );
2704
2705
413
    if ( operations.empty() == true ) {
2706
16
        return;
2707
16
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
397
#if 1
2711
397
    {
2712
397
        std::set<uint64_t> moduleIDs;
2713
690
        for (const auto& m : modules ) {
2714
690
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
690
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
690
            moduleIDs.insert(moduleID);
2722
690
        }
2723
2724
397
        std::set<uint64_t> operationModuleIDs;
2725
901
        for (const auto& op : operations) {
2726
901
            operationModuleIDs.insert(op.first->ID);
2727
901
        }
2728
2729
397
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
397
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
397
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
397
        for (const auto& id : addModuleIDs) {
2734
337
            operations.push_back({ modules.at(id), operations[0].second});
2735
337
        }
2736
397
    }
2737
397
#endif
2738
2739
397
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
397
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
1.63k
    for (size_t i = 0; i < operations.size(); i++) {
2747
1.23k
        auto& operation = operations[i];
2748
2749
1.23k
        auto& module = operation.first;
2750
1.23k
        auto& op = operation.second;
2751
2752
1.23k
        if ( i > 0 ) {
2753
893
            auto& prevModule = operations[i-1].first;
2754
893
            auto& prevOp = operations[i].second;
2755
2756
893
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
536
                auto& curModifier = op.modifier.GetVectorPtr();
2758
536
                if ( curModifier.size() == 0 ) {
2759
222k
                    for (size_t j = 0; j < 512; j++) {
2760
222k
                        curModifier.push_back(1);
2761
222k
                    }
2762
434
                } else {
2763
700
                    for (auto& c : curModifier) {
2764
700
                        c++;
2765
700
                    }
2766
102
                }
2767
536
            }
2768
893
        }
2769
2770
1.23k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
1.23k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
1.23k
        const auto& result = results.back();
2777
2778
1.23k
        if ( result.second != std::nullopt ) {
2779
664
            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
664
        }
2786
2787
1.23k
        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.23k
        if ( options.disableTests == false ) {
2796
1.23k
            tests::test(op, result.second);
2797
1.23k
        }
2798
2799
1.23k
        postprocess(module, op, result);
2800
1.23k
    }
2801
2802
397
    if ( options.noCompare == false ) {
2803
345
        compare(operations, results, data, size);
2804
345
    }
2805
397
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::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
1.75k
    do {
2691
1.75k
        auto op = getOp(&parentDs, data, size);
2692
1.75k
        auto module = getModule(parentDs);
2693
1.75k
        if ( module == nullptr ) {
2694
1.17k
            continue;
2695
1.17k
        }
2696
2697
581
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
581
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
1.75k
    } while ( parentDs.Get<bool>() == true );
2704
2705
254
    if ( operations.empty() == true ) {
2706
19
        return;
2707
19
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
235
#if 1
2711
235
    {
2712
235
        std::set<uint64_t> moduleIDs;
2713
384
        for (const auto& m : modules ) {
2714
384
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
384
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
384
            moduleIDs.insert(moduleID);
2722
384
        }
2723
2724
235
        std::set<uint64_t> operationModuleIDs;
2725
548
        for (const auto& op : operations) {
2726
548
            operationModuleIDs.insert(op.first->ID);
2727
548
        }
2728
2729
235
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
235
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
235
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
235
        for (const auto& id : addModuleIDs) {
2734
183
            operations.push_back({ modules.at(id), operations[0].second});
2735
183
        }
2736
235
    }
2737
235
#endif
2738
2739
235
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
235
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
966
    for (size_t i = 0; i < operations.size(); i++) {
2747
731
        auto& operation = operations[i];
2748
2749
731
        auto& module = operation.first;
2750
731
        auto& op = operation.second;
2751
2752
731
        if ( i > 0 ) {
2753
539
            auto& prevModule = operations[i-1].first;
2754
539
            auto& prevOp = operations[i].second;
2755
2756
539
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
337
                auto& curModifier = op.modifier.GetVectorPtr();
2758
337
                if ( curModifier.size() == 0 ) {
2759
129k
                    for (size_t j = 0; j < 512; j++) {
2760
129k
                        curModifier.push_back(1);
2761
129k
                    }
2762
253
                } else {
2763
247
                    for (auto& c : curModifier) {
2764
247
                        c++;
2765
247
                    }
2766
84
                }
2767
337
            }
2768
539
        }
2769
2770
731
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
731
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
731
        const auto& result = results.back();
2777
2778
731
        if ( result.second != std::nullopt ) {
2779
297
            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
297
        }
2786
2787
731
        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
731
        if ( options.disableTests == false ) {
2796
731
            tests::test(op, result.second);
2797
731
        }
2798
2799
731
        postprocess(module, op, result);
2800
731
    }
2801
2802
235
    if ( options.noCompare == false ) {
2803
192
        compare(operations, results, data, size);
2804
192
    }
2805
235
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
145
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
145
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
145
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.17k
    do {
2691
1.17k
        auto op = getOp(&parentDs, data, size);
2692
1.17k
        auto module = getModule(parentDs);
2693
1.17k
        if ( module == nullptr ) {
2694
482
            continue;
2695
482
        }
2696
2697
695
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
695
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
1.17k
    } while ( parentDs.Get<bool>() == true );
2704
2705
145
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
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
238
        for (const auto& m : modules ) {
2714
238
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
238
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
238
            moduleIDs.insert(moduleID);
2722
238
        }
2723
2724
140
        std::set<uint64_t> operationModuleIDs;
2725
648
        for (const auto& op : operations) {
2726
648
            operationModuleIDs.insert(op.first->ID);
2727
648
        }
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
111
            operations.push_back({ modules.at(id), operations[0].second});
2735
111
        }
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
899
    for (size_t i = 0; i < operations.size(); i++) {
2747
759
        auto& operation = operations[i];
2748
2749
759
        auto& module = operation.first;
2750
759
        auto& op = operation.second;
2751
2752
759
        if ( i > 0 ) {
2753
640
            auto& prevModule = operations[i-1].first;
2754
640
            auto& prevOp = operations[i].second;
2755
2756
640
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
519
                auto& curModifier = op.modifier.GetVectorPtr();
2758
519
                if ( curModifier.size() == 0 ) {
2759
228k
                    for (size_t j = 0; j < 512; j++) {
2760
227k
                        curModifier.push_back(1);
2761
227k
                    }
2762
445
                } else {
2763
259
                    for (auto& c : curModifier) {
2764
259
                        c++;
2765
259
                    }
2766
74
                }
2767
519
            }
2768
640
        }
2769
2770
759
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
759
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
759
        const auto& result = results.back();
2777
2778
759
        if ( result.second != std::nullopt ) {
2779
368
            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
368
        }
2786
2787
759
        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
759
        if ( options.disableTests == false ) {
2796
759
            tests::test(op, result.second);
2797
759
        }
2798
2799
759
        postprocess(module, op, result);
2800
759
    }
2801
2802
140
    if ( options.noCompare == false ) {
2803
119
        compare(operations, results, data, size);
2804
119
    }
2805
140
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
219
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
219
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
219
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.07k
    do {
2691
1.07k
        auto op = getOp(&parentDs, data, size);
2692
1.07k
        auto module = getModule(parentDs);
2693
1.07k
        if ( module == nullptr ) {
2694
522
            continue;
2695
522
        }
2696
2697
550
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
550
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
1.07k
    } while ( parentDs.Get<bool>() == true );
2704
2705
219
    if ( operations.empty() == true ) {
2706
8
        return;
2707
8
    }
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
334
        for (const auto& m : modules ) {
2714
334
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
334
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
334
            moduleIDs.insert(moduleID);
2722
334
        }
2723
2724
211
        std::set<uint64_t> operationModuleIDs;
2725
508
        for (const auto& op : operations) {
2726
508
            operationModuleIDs.insert(op.first->ID);
2727
508
        }
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
165
            operations.push_back({ modules.at(id), operations[0].second});
2735
165
        }
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
884
    for (size_t i = 0; i < operations.size(); i++) {
2747
673
        auto& operation = operations[i];
2748
2749
673
        auto& module = operation.first;
2750
673
        auto& op = operation.second;
2751
2752
673
        if ( i > 0 ) {
2753
506
            auto& prevModule = operations[i-1].first;
2754
506
            auto& prevOp = operations[i].second;
2755
2756
506
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
339
                auto& curModifier = op.modifier.GetVectorPtr();
2758
339
                if ( curModifier.size() == 0 ) {
2759
152k
                    for (size_t j = 0; j < 512; j++) {
2760
152k
                        curModifier.push_back(1);
2761
152k
                    }
2762
297
                } else {
2763
43
                    for (auto& c : curModifier) {
2764
43
                        c++;
2765
43
                    }
2766
42
                }
2767
339
            }
2768
506
        }
2769
2770
673
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
673
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
673
        const auto& result = results.back();
2777
2778
673
        if ( result.second != std::nullopt ) {
2779
284
            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
284
        }
2786
2787
673
        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
673
        if ( options.disableTests == false ) {
2796
673
            tests::test(op, result.second);
2797
673
        }
2798
2799
673
        postprocess(module, op, result);
2800
673
    }
2801
2802
211
    if ( options.noCompare == false ) {
2803
167
        compare(operations, results, data, size);
2804
167
    }
2805
211
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
896
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
896
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
896
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
4.83k
    do {
2691
4.83k
        auto op = getOp(&parentDs, data, size);
2692
4.83k
        auto module = getModule(parentDs);
2693
4.83k
        if ( module == nullptr ) {
2694
1.99k
            continue;
2695
1.99k
        }
2696
2697
2.84k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
2.84k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
4.83k
    } while ( parentDs.Get<bool>() == true );
2704
2705
896
    if ( operations.empty() == true ) {
2706
19
        return;
2707
19
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
877
#if 1
2711
877
    {
2712
877
        std::set<uint64_t> moduleIDs;
2713
1.68k
        for (const auto& m : modules ) {
2714
1.68k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.68k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.68k
            moduleIDs.insert(moduleID);
2722
1.68k
        }
2723
2724
877
        std::set<uint64_t> operationModuleIDs;
2725
2.76k
        for (const auto& op : operations) {
2726
2.76k
            operationModuleIDs.insert(op.first->ID);
2727
2.76k
        }
2728
2729
877
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
877
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
877
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
877
        for (const auto& id : addModuleIDs) {
2734
829
            operations.push_back({ modules.at(id), operations[0].second});
2735
829
        }
2736
877
    }
2737
877
#endif
2738
2739
877
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
877
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
4.47k
    for (size_t i = 0; i < operations.size(); i++) {
2747
3.59k
        auto& operation = operations[i];
2748
2749
3.59k
        auto& module = operation.first;
2750
3.59k
        auto& op = operation.second;
2751
2752
3.59k
        if ( i > 0 ) {
2753
2.75k
            auto& prevModule = operations[i-1].first;
2754
2.75k
            auto& prevOp = operations[i].second;
2755
2756
2.75k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
1.90k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
1.90k
                if ( curModifier.size() == 0 ) {
2759
777k
                    for (size_t j = 0; j < 512; j++) {
2760
776k
                        curModifier.push_back(1);
2761
776k
                    }
2762
1.51k
                } else {
2763
2.90k
                    for (auto& c : curModifier) {
2764
2.90k
                        c++;
2765
2.90k
                    }
2766
390
                }
2767
1.90k
            }
2768
2.75k
        }
2769
2770
3.59k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
3.59k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
3.59k
        const auto& result = results.back();
2777
2778
3.59k
        if ( result.second != std::nullopt ) {
2779
1.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
1.16k
        }
2786
2787
3.59k
        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.59k
        if ( options.disableTests == false ) {
2796
3.59k
            tests::test(op, result.second);
2797
3.59k
        }
2798
2799
3.59k
        postprocess(module, op, result);
2800
3.59k
    }
2801
2802
877
    if ( options.noCompare == false ) {
2803
843
        compare(operations, results, data, size);
2804
843
    }
2805
877
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
448
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
448
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
448
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.66k
    do {
2691
2.66k
        auto op = getOp(&parentDs, data, size);
2692
2.66k
        auto module = getModule(parentDs);
2693
2.66k
        if ( module == nullptr ) {
2694
1.02k
            continue;
2695
1.02k
        }
2696
2697
1.63k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
1.63k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
2.66k
    } while ( parentDs.Get<bool>() == true );
2704
2705
448
    if ( operations.empty() == true ) {
2706
22
        return;
2707
22
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
426
#if 1
2711
426
    {
2712
426
        std::set<uint64_t> moduleIDs;
2713
778
        for (const auto& m : modules ) {
2714
778
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
778
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
778
            moduleIDs.insert(moduleID);
2722
778
        }
2723
2724
426
        std::set<uint64_t> operationModuleIDs;
2725
1.54k
        for (const auto& op : operations) {
2726
1.54k
            operationModuleIDs.insert(op.first->ID);
2727
1.54k
        }
2728
2729
426
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
426
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
426
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
426
        for (const auto& id : addModuleIDs) {
2734
370
            operations.push_back({ modules.at(id), operations[0].second});
2735
370
        }
2736
426
    }
2737
426
#endif
2738
2739
426
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
426
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
2.34k
    for (size_t i = 0; i < operations.size(); i++) {
2747
1.91k
        auto& operation = operations[i];
2748
2749
1.91k
        auto& module = operation.first;
2750
1.91k
        auto& op = operation.second;
2751
2752
1.91k
        if ( i > 0 ) {
2753
1.52k
            auto& prevModule = operations[i-1].first;
2754
1.52k
            auto& prevOp = operations[i].second;
2755
2756
1.52k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
1.12k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
1.12k
                if ( curModifier.size() == 0 ) {
2759
501k
                    for (size_t j = 0; j < 512; j++) {
2760
500k
                        curModifier.push_back(1);
2761
500k
                    }
2762
977
                } else {
2763
1.78k
                    for (auto& c : curModifier) {
2764
1.78k
                        c++;
2765
1.78k
                    }
2766
148
                }
2767
1.12k
            }
2768
1.52k
        }
2769
2770
1.91k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
1.91k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
1.91k
        const auto& result = results.back();
2777
2778
1.91k
        if ( result.second != std::nullopt ) {
2779
212
            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
212
        }
2786
2787
1.91k
        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.91k
        if ( options.disableTests == false ) {
2796
1.91k
            tests::test(op, result.second);
2797
1.91k
        }
2798
2799
1.91k
        postprocess(module, op, result);
2800
1.91k
    }
2801
2802
426
    if ( options.noCompare == false ) {
2803
389
        compare(operations, results, data, size);
2804
389
    }
2805
426
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
73
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
73
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
73
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
857
    do {
2691
857
        auto op = getOp(&parentDs, data, size);
2692
857
        auto module = getModule(parentDs);
2693
857
        if ( module == nullptr ) {
2694
673
            continue;
2695
673
        }
2696
2697
184
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
184
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
857
    } while ( parentDs.Get<bool>() == true );
2704
2705
73
    if ( operations.empty() == true ) {
2706
19
        return;
2707
19
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
54
#if 1
2711
54
    {
2712
54
        std::set<uint64_t> moduleIDs;
2713
54
        for (const auto& m : modules ) {
2714
48
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
48
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
48
            moduleIDs.insert(moduleID);
2722
48
        }
2723
2724
54
        std::set<uint64_t> operationModuleIDs;
2725
133
        for (const auto& op : operations) {
2726
133
            operationModuleIDs.insert(op.first->ID);
2727
133
        }
2728
2729
54
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
54
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
54
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
54
        for (const auto& id : addModuleIDs) {
2734
20
            operations.push_back({ modules.at(id), operations[0].second});
2735
20
        }
2736
54
    }
2737
54
#endif
2738
2739
54
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
54
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
207
    for (size_t i = 0; i < operations.size(); i++) {
2747
153
        auto& operation = operations[i];
2748
2749
153
        auto& module = operation.first;
2750
153
        auto& op = operation.second;
2751
2752
153
        if ( i > 0 ) {
2753
129
            auto& prevModule = operations[i-1].first;
2754
129
            auto& prevOp = operations[i].second;
2755
2756
129
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
105
                auto& curModifier = op.modifier.GetVectorPtr();
2758
105
                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
25
                    for (auto& c : curModifier) {
2764
25
                        c++;
2765
25
                    }
2766
25
                }
2767
105
            }
2768
129
        }
2769
2770
153
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
153
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
153
        const auto& result = results.back();
2777
2778
153
        if ( result.second != std::nullopt ) {
2779
54
            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
54
        }
2786
2787
153
        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
153
        if ( options.disableTests == false ) {
2796
153
            tests::test(op, result.second);
2797
153
        }
2798
2799
153
        postprocess(module, op, result);
2800
153
    }
2801
2802
54
    if ( options.noCompare == false ) {
2803
24
        compare(operations, results, data, size);
2804
24
    }
2805
54
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
296
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
296
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
296
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.37k
    do {
2691
1.37k
        auto op = getOp(&parentDs, data, size);
2692
1.37k
        auto module = getModule(parentDs);
2693
1.37k
        if ( module == nullptr ) {
2694
650
            continue;
2695
650
        }
2696
2697
726
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
726
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
1.37k
    } while ( parentDs.Get<bool>() == true );
2704
2705
296
    if ( operations.empty() == true ) {
2706
25
        return;
2707
25
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
271
#if 1
2711
271
    {
2712
271
        std::set<uint64_t> moduleIDs;
2713
484
        for (const auto& m : modules ) {
2714
484
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
484
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
484
            moduleIDs.insert(moduleID);
2722
484
        }
2723
2724
271
        std::set<uint64_t> operationModuleIDs;
2725
698
        for (const auto& op : operations) {
2726
698
            operationModuleIDs.insert(op.first->ID);
2727
698
        }
2728
2729
271
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
271
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
271
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
271
        for (const auto& id : addModuleIDs) {
2734
232
            operations.push_back({ modules.at(id), operations[0].second});
2735
232
        }
2736
271
    }
2737
271
#endif
2738
2739
271
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
271
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
1.20k
    for (size_t i = 0; i < operations.size(); i++) {
2747
930
        auto& operation = operations[i];
2748
2749
930
        auto& module = operation.first;
2750
930
        auto& op = operation.second;
2751
2752
930
        if ( i > 0 ) {
2753
688
            auto& prevModule = operations[i-1].first;
2754
688
            auto& prevOp = operations[i].second;
2755
2756
688
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
440
                auto& curModifier = op.modifier.GetVectorPtr();
2758
440
                if ( curModifier.size() == 0 ) {
2759
182k
                    for (size_t j = 0; j < 512; j++) {
2760
181k
                        curModifier.push_back(1);
2761
181k
                    }
2762
355
                } else {
2763
238
                    for (auto& c : curModifier) {
2764
238
                        c++;
2765
238
                    }
2766
85
                }
2767
440
            }
2768
688
        }
2769
2770
930
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
930
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
930
        const auto& result = results.back();
2777
2778
930
        if ( result.second != std::nullopt ) {
2779
515
            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
515
        }
2786
2787
930
        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
930
        if ( options.disableTests == false ) {
2796
930
            tests::test(op, result.second);
2797
930
        }
2798
2799
930
        postprocess(module, op, result);
2800
930
    }
2801
2802
271
    if ( options.noCompare == false ) {
2803
242
        compare(operations, results, data, size);
2804
242
    }
2805
271
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
72
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
72
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
72
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.03k
    do {
2691
1.03k
        auto op = getOp(&parentDs, data, size);
2692
1.03k
        auto module = getModule(parentDs);
2693
1.03k
        if ( module == nullptr ) {
2694
848
            continue;
2695
848
        }
2696
2697
182
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
182
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
1.02k
    } while ( parentDs.Get<bool>() == true );
2704
2705
72
    if ( operations.empty() == true ) {
2706
18
        return;
2707
18
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
54
#if 1
2711
54
    {
2712
54
        std::set<uint64_t> moduleIDs;
2713
54
        for (const auto& m : modules ) {
2714
36
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
36
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
36
            moduleIDs.insert(moduleID);
2722
36
        }
2723
2724
54
        std::set<uint64_t> operationModuleIDs;
2725
120
        for (const auto& op : operations) {
2726
120
            operationModuleIDs.insert(op.first->ID);
2727
120
        }
2728
2729
54
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
54
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
54
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
54
        for (const auto& id : addModuleIDs) {
2734
14
            operations.push_back({ modules.at(id), operations[0].second});
2735
14
        }
2736
54
    }
2737
54
#endif
2738
2739
54
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
54
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
188
    for (size_t i = 0; i < operations.size(); i++) {
2747
134
        auto& operation = operations[i];
2748
2749
134
        auto& module = operation.first;
2750
134
        auto& op = operation.second;
2751
2752
134
        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
87
                auto& curModifier = op.modifier.GetVectorPtr();
2758
87
                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
122
                    for (auto& c : curModifier) {
2764
122
                        c++;
2765
122
                    }
2766
29
                }
2767
87
            }
2768
116
        }
2769
2770
134
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
134
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
134
        const auto& result = results.back();
2777
2778
134
        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
134
        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
134
        if ( options.disableTests == false ) {
2796
134
            tests::test(op, result.second);
2797
134
        }
2798
2799
134
        postprocess(module, op, result);
2800
134
    }
2801
2802
54
    if ( options.noCompare == false ) {
2803
18
        compare(operations, results, data, size);
2804
18
    }
2805
54
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
61
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
61
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
61
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
843
    do {
2691
843
        auto op = getOp(&parentDs, data, size);
2692
843
        auto module = getModule(parentDs);
2693
843
        if ( module == nullptr ) {
2694
661
            continue;
2695
661
        }
2696
2697
182
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
182
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
842
    } while ( parentDs.Get<bool>() == true );
2704
2705
61
    if ( operations.empty() == true ) {
2706
14
        return;
2707
14
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
47
#if 1
2711
47
    {
2712
47
        std::set<uint64_t> moduleIDs;
2713
47
        for (const auto& m : modules ) {
2714
44
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
44
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
44
            moduleIDs.insert(moduleID);
2722
44
        }
2723
2724
47
        std::set<uint64_t> operationModuleIDs;
2725
146
        for (const auto& op : operations) {
2726
146
            operationModuleIDs.insert(op.first->ID);
2727
146
        }
2728
2729
47
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
47
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
47
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
47
        for (const auto& id : addModuleIDs) {
2734
15
            operations.push_back({ modules.at(id), operations[0].second});
2735
15
        }
2736
47
    }
2737
47
#endif
2738
2739
47
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
47
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
208
    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
139
            auto& prevModule = operations[i-1].first;
2754
139
            auto& prevOp = operations[i].second;
2755
2756
139
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
101
                auto& curModifier = op.modifier.GetVectorPtr();
2758
101
                if ( curModifier.size() == 0 ) {
2759
38.9k
                    for (size_t j = 0; j < 512; j++) {
2760
38.9k
                        curModifier.push_back(1);
2761
38.9k
                    }
2762
76
                } else {
2763
339
                    for (auto& c : curModifier) {
2764
339
                        c++;
2765
339
                    }
2766
25
                }
2767
101
            }
2768
139
        }
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
47
    if ( options.noCompare == false ) {
2803
22
        compare(operations, results, data, size);
2804
22
    }
2805
47
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
74
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
74
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
74
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
855
    do {
2691
855
        auto op = getOp(&parentDs, data, size);
2692
855
        auto module = getModule(parentDs);
2693
855
        if ( module == nullptr ) {
2694
737
            continue;
2695
737
        }
2696
2697
118
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
118
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
855
    } while ( parentDs.Get<bool>() == true );
2704
2705
74
    if ( operations.empty() == true ) {
2706
22
        return;
2707
22
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
52
#if 1
2711
52
    {
2712
52
        std::set<uint64_t> moduleIDs;
2713
52
        for (const auto& m : modules ) {
2714
32
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
32
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
32
            moduleIDs.insert(moduleID);
2722
32
        }
2723
2724
52
        std::set<uint64_t> operationModuleIDs;
2725
87
        for (const auto& op : operations) {
2726
87
            operationModuleIDs.insert(op.first->ID);
2727
87
        }
2728
2729
52
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
52
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
52
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
52
        for (const auto& id : addModuleIDs) {
2734
12
            operations.push_back({ modules.at(id), operations[0].second});
2735
12
        }
2736
52
    }
2737
52
#endif
2738
2739
52
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
52
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
151
    for (size_t i = 0; i < operations.size(); i++) {
2747
99
        auto& operation = operations[i];
2748
2749
99
        auto& module = operation.first;
2750
99
        auto& op = operation.second;
2751
2752
99
        if ( i > 0 ) {
2753
83
            auto& prevModule = operations[i-1].first;
2754
83
            auto& prevOp = operations[i].second;
2755
2756
83
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
60
                auto& curModifier = op.modifier.GetVectorPtr();
2758
60
                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
68
                    for (auto& c : curModifier) {
2764
68
                        c++;
2765
68
                    }
2766
17
                }
2767
60
            }
2768
83
        }
2769
2770
99
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
99
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
99
        const auto& result = results.back();
2777
2778
99
        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
99
        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
99
        if ( options.disableTests == false ) {
2796
99
            tests::test(op, result.second);
2797
99
        }
2798
2799
99
        postprocess(module, op, result);
2800
99
    }
2801
2802
52
    if ( options.noCompare == false ) {
2803
16
        compare(operations, results, data, size);
2804
16
    }
2805
52
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
190
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
190
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
190
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.08k
    do {
2691
1.08k
        auto op = getOp(&parentDs, data, size);
2692
1.08k
        auto module = getModule(parentDs);
2693
1.08k
        if ( module == nullptr ) {
2694
706
            continue;
2695
706
        }
2696
2697
374
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
374
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
1.07k
    } while ( parentDs.Get<bool>() == true );
2704
2705
190
    if ( operations.empty() == true ) {
2706
19
        return;
2707
19
    }
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
276
        for (const auto& m : modules ) {
2714
276
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
276
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
276
            moduleIDs.insert(moduleID);
2722
276
        }
2723
2724
171
        std::set<uint64_t> operationModuleIDs;
2725
310
        for (const auto& op : operations) {
2726
310
            operationModuleIDs.insert(op.first->ID);
2727
310
        }
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
133
            operations.push_back({ modules.at(id), operations[0].second});
2735
133
        }
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
614
    for (size_t i = 0; i < operations.size(); i++) {
2747
443
        auto& operation = operations[i];
2748
2749
443
        auto& module = operation.first;
2750
443
        auto& op = operation.second;
2751
2752
443
        if ( i > 0 ) {
2753
305
            auto& prevModule = operations[i-1].first;
2754
305
            auto& prevOp = operations[i].second;
2755
2756
305
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
164
                auto& curModifier = op.modifier.GetVectorPtr();
2758
164
                if ( curModifier.size() == 0 ) {
2759
74.3k
                    for (size_t j = 0; j < 512; j++) {
2760
74.2k
                        curModifier.push_back(1);
2761
74.2k
                    }
2762
145
                } else {
2763
153
                    for (auto& c : curModifier) {
2764
153
                        c++;
2765
153
                    }
2766
19
                }
2767
164
            }
2768
305
        }
2769
2770
443
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
443
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
443
        const auto& result = results.back();
2777
2778
443
        if ( result.second != std::nullopt ) {
2779
149
            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
149
        }
2786
2787
443
        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
443
        if ( options.disableTests == false ) {
2796
443
            tests::test(op, result.second);
2797
443
        }
2798
2799
443
        postprocess(module, op, result);
2800
443
    }
2801
2802
171
    if ( options.noCompare == false ) {
2803
138
        compare(operations, results, data, size);
2804
138
    }
2805
171
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::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
1.27k
    do {
2691
1.27k
        auto op = getOp(&parentDs, data, size);
2692
1.27k
        auto module = getModule(parentDs);
2693
1.27k
        if ( module == nullptr ) {
2694
1.03k
            continue;
2695
1.03k
        }
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
32
            break;
2702
32
        }
2703
1.24k
    } while ( parentDs.Get<bool>() == true );
2704
2705
168
    if ( operations.empty() == true ) {
2706
13
        return;
2707
13
    }
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
240
        for (const auto& m : modules ) {
2714
240
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
240
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
240
            moduleIDs.insert(moduleID);
2722
240
        }
2723
2724
155
        std::set<uint64_t> operationModuleIDs;
2725
188
        for (const auto& op : operations) {
2726
188
            operationModuleIDs.insert(op.first->ID);
2727
188
        }
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
117
            operations.push_back({ modules.at(id), operations[0].second});
2735
117
        }
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
460
    for (size_t i = 0; i < operations.size(); i++) {
2747
305
        auto& operation = operations[i];
2748
2749
305
        auto& module = operation.first;
2750
305
        auto& op = operation.second;
2751
2752
305
        if ( i > 0 ) {
2753
185
            auto& prevModule = operations[i-1].first;
2754
185
            auto& prevOp = operations[i].second;
2755
2756
185
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
65
                auto& curModifier = op.modifier.GetVectorPtr();
2758
65
                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
44
                    for (auto& c : curModifier) {
2764
44
                        c++;
2765
44
                    }
2766
15
                }
2767
65
            }
2768
185
        }
2769
2770
305
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
305
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
305
        const auto& result = results.back();
2777
2778
305
        if ( result.second != std::nullopt ) {
2779
148
            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
148
        }
2786
2787
305
        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
305
        if ( options.disableTests == false ) {
2796
305
            tests::test(op, result.second);
2797
305
        }
2798
2799
305
        postprocess(module, op, result);
2800
305
    }
2801
2802
155
    if ( options.noCompare == false ) {
2803
120
        compare(operations, results, data, size);
2804
120
    }
2805
155
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
68
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
68
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
68
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
947
    do {
2691
947
        auto op = getOp(&parentDs, data, size);
2692
947
        auto module = getModule(parentDs);
2693
947
        if ( module == nullptr ) {
2694
797
            continue;
2695
797
        }
2696
2697
150
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
150
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
947
    } while ( parentDs.Get<bool>() == true );
2704
2705
68
    if ( operations.empty() == true ) {
2706
9
        return;
2707
9
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
59
#if 1
2711
59
    {
2712
59
        std::set<uint64_t> moduleIDs;
2713
59
        for (const auto& m : modules ) {
2714
40
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
40
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
40
            moduleIDs.insert(moduleID);
2722
40
        }
2723
2724
59
        std::set<uint64_t> operationModuleIDs;
2725
85
        for (const auto& op : operations) {
2726
85
            operationModuleIDs.insert(op.first->ID);
2727
85
        }
2728
2729
59
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
59
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
59
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
59
        for (const auto& id : addModuleIDs) {
2734
12
            operations.push_back({ modules.at(id), operations[0].second});
2735
12
        }
2736
59
    }
2737
59
#endif
2738
2739
59
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
59
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
156
    for (size_t i = 0; i < operations.size(); i++) {
2747
97
        auto& operation = operations[i];
2748
2749
97
        auto& module = operation.first;
2750
97
        auto& op = operation.second;
2751
2752
97
        if ( i > 0 ) {
2753
77
            auto& prevModule = operations[i-1].first;
2754
77
            auto& prevOp = operations[i].second;
2755
2756
77
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
47
                auto& curModifier = op.modifier.GetVectorPtr();
2758
47
                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
91
                    for (auto& c : curModifier) {
2764
91
                        c++;
2765
91
                    }
2766
15
                }
2767
47
            }
2768
77
        }
2769
2770
97
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
97
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
97
        const auto& result = results.back();
2777
2778
97
        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
97
        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
97
        if ( options.disableTests == false ) {
2796
97
            tests::test(op, result.second);
2797
97
        }
2798
2799
97
        postprocess(module, op, result);
2800
97
    }
2801
2802
59
    if ( options.noCompare == false ) {
2803
20
        compare(operations, results, data, size);
2804
20
    }
2805
59
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
47
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
47
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
47
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
504
    do {
2691
504
        auto op = getOp(&parentDs, data, size);
2692
504
        auto module = getModule(parentDs);
2693
504
        if ( module == nullptr ) {
2694
358
            continue;
2695
358
        }
2696
2697
146
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
146
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
503
    } while ( parentDs.Get<bool>() == true );
2704
2705
47
    if ( operations.empty() == true ) {
2706
17
        return;
2707
17
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
30
#if 1
2711
30
    {
2712
30
        std::set<uint64_t> moduleIDs;
2713
30
        for (const auto& m : modules ) {
2714
22
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
22
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
22
            moduleIDs.insert(moduleID);
2722
22
        }
2723
2724
30
        std::set<uint64_t> operationModuleIDs;
2725
106
        for (const auto& op : operations) {
2726
106
            operationModuleIDs.insert(op.first->ID);
2727
106
        }
2728
2729
30
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
30
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
30
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
30
        for (const auto& id : addModuleIDs) {
2734
7
            operations.push_back({ modules.at(id), operations[0].second});
2735
7
        }
2736
30
    }
2737
30
#endif
2738
2739
30
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
30
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
143
    for (size_t i = 0; i < operations.size(); i++) {
2747
113
        auto& operation = operations[i];
2748
2749
113
        auto& module = operation.first;
2750
113
        auto& op = operation.second;
2751
2752
113
        if ( i > 0 ) {
2753
102
            auto& prevModule = operations[i-1].first;
2754
102
            auto& prevOp = operations[i].second;
2755
2756
102
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
59
                auto& curModifier = op.modifier.GetVectorPtr();
2758
59
                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
161
                    for (auto& c : curModifier) {
2764
161
                        c++;
2765
161
                    }
2766
17
                }
2767
59
            }
2768
102
        }
2769
2770
113
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
113
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
113
        const auto& result = results.back();
2777
2778
113
        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
113
        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
113
        if ( options.disableTests == false ) {
2796
113
            tests::test(op, result.second);
2797
113
        }
2798
2799
113
        postprocess(module, op, result);
2800
113
    }
2801
2802
30
    if ( options.noCompare == false ) {
2803
11
        compare(operations, results, data, size);
2804
11
    }
2805
30
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
66
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
66
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
66
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
311
    do {
2691
311
        auto op = getOp(&parentDs, data, size);
2692
311
        auto module = getModule(parentDs);
2693
311
        if ( module == nullptr ) {
2694
250
            continue;
2695
250
        }
2696
2697
61
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
61
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
304
    } while ( parentDs.Get<bool>() == true );
2704
2705
66
    if ( operations.empty() == true ) {
2706
9
        return;
2707
9
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
57
#if 1
2711
57
    {
2712
57
        std::set<uint64_t> moduleIDs;
2713
58
        for (const auto& m : modules ) {
2714
58
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
58
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
58
            moduleIDs.insert(moduleID);
2722
58
        }
2723
2724
57
        std::set<uint64_t> operationModuleIDs;
2725
57
        for (const auto& op : operations) {
2726
36
            operationModuleIDs.insert(op.first->ID);
2727
36
        }
2728
2729
57
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
57
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
57
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
57
        for (const auto& id : addModuleIDs) {
2734
28
            operations.push_back({ modules.at(id), operations[0].second});
2735
28
        }
2736
57
    }
2737
57
#endif
2738
2739
57
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
57
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
121
    for (size_t i = 0; i < operations.size(); i++) {
2747
64
        auto& operation = operations[i];
2748
2749
64
        auto& module = operation.first;
2750
64
        auto& op = operation.second;
2751
2752
64
        if ( i > 0 ) {
2753
35
            auto& prevModule = operations[i-1].first;
2754
35
            auto& prevOp = operations[i].second;
2755
2756
35
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
6
                auto& curModifier = op.modifier.GetVectorPtr();
2758
6
                if ( curModifier.size() == 0 ) {
2759
1.53k
                    for (size_t j = 0; j < 512; j++) {
2760
1.53k
                        curModifier.push_back(1);
2761
1.53k
                    }
2762
3
                } else {
2763
11
                    for (auto& c : curModifier) {
2764
11
                        c++;
2765
11
                    }
2766
3
                }
2767
6
            }
2768
35
        }
2769
2770
64
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
64
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
64
        const auto& result = results.back();
2777
2778
64
        if ( result.second != std::nullopt ) {
2779
20
            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
20
        }
2786
2787
64
        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
64
        if ( options.disableTests == false ) {
2796
64
            tests::test(op, result.second);
2797
64
        }
2798
2799
64
        postprocess(module, op, result);
2800
64
    }
2801
2802
57
    if ( options.noCompare == false ) {
2803
29
        compare(operations, results, data, size);
2804
29
    }
2805
57
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
122
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
122
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
122
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
985
    do {
2691
985
        auto op = getOp(&parentDs, data, size);
2692
985
        auto module = getModule(parentDs);
2693
985
        if ( module == nullptr ) {
2694
640
            continue;
2695
640
        }
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
0
            break;
2702
0
        }
2703
985
    } while ( parentDs.Get<bool>() == true );
2704
2705
122
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
115
#if 1
2711
115
    {
2712
115
        std::set<uint64_t> moduleIDs;
2713
160
        for (const auto& m : modules ) {
2714
160
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
160
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
160
            moduleIDs.insert(moduleID);
2722
160
        }
2723
2724
115
        std::set<uint64_t> operationModuleIDs;
2725
289
        for (const auto& op : operations) {
2726
289
            operationModuleIDs.insert(op.first->ID);
2727
289
        }
2728
2729
115
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
115
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
115
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
115
        for (const auto& id : addModuleIDs) {
2734
77
            operations.push_back({ modules.at(id), operations[0].second});
2735
77
        }
2736
115
    }
2737
115
#endif
2738
2739
115
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
115
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
481
    for (size_t i = 0; i < operations.size(); i++) {
2747
366
        auto& operation = operations[i];
2748
2749
366
        auto& module = operation.first;
2750
366
        auto& op = operation.second;
2751
2752
366
        if ( i > 0 ) {
2753
286
            auto& prevModule = operations[i-1].first;
2754
286
            auto& prevOp = operations[i].second;
2755
2756
286
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
205
                auto& curModifier = op.modifier.GetVectorPtr();
2758
205
                if ( curModifier.size() == 0 ) {
2759
80.5k
                    for (size_t j = 0; j < 512; j++) {
2760
80.3k
                        curModifier.push_back(1);
2761
80.3k
                    }
2762
157
                } else {
2763
75
                    for (auto& c : curModifier) {
2764
75
                        c++;
2765
75
                    }
2766
48
                }
2767
205
            }
2768
286
        }
2769
2770
366
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
366
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
366
        const auto& result = results.back();
2777
2778
366
        if ( result.second != std::nullopt ) {
2779
163
            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
163
        }
2786
2787
366
        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
366
        if ( options.disableTests == false ) {
2796
366
            tests::test(op, result.second);
2797
366
        }
2798
2799
366
        postprocess(module, op, result);
2800
366
    }
2801
2802
115
    if ( options.noCompare == false ) {
2803
80
        compare(operations, results, data, size);
2804
80
    }
2805
115
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
251
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
251
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
251
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
757
    do {
2691
757
        auto op = getOp(&parentDs, data, size);
2692
757
        auto module = getModule(parentDs);
2693
757
        if ( module == nullptr ) {
2694
385
            continue;
2695
385
        }
2696
2697
372
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
372
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
749
    } while ( parentDs.Get<bool>() == true );
2704
2705
251
    if ( operations.empty() == true ) {
2706
16
        return;
2707
16
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
235
#if 1
2711
235
    {
2712
235
        std::set<uint64_t> moduleIDs;
2713
416
        for (const auto& m : modules ) {
2714
416
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
416
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
416
            moduleIDs.insert(moduleID);
2722
416
        }
2723
2724
235
        std::set<uint64_t> operationModuleIDs;
2725
351
        for (const auto& op : operations) {
2726
351
            operationModuleIDs.insert(op.first->ID);
2727
351
        }
2728
2729
235
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
235
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
235
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
235
        for (const auto& id : addModuleIDs) {
2734
205
            operations.push_back({ modules.at(id), operations[0].second});
2735
205
        }
2736
235
    }
2737
235
#endif
2738
2739
235
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
235
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
791
    for (size_t i = 0; i < operations.size(); i++) {
2747
556
        auto& operation = operations[i];
2748
2749
556
        auto& module = operation.first;
2750
556
        auto& op = operation.second;
2751
2752
556
        if ( i > 0 ) {
2753
348
            auto& prevModule = operations[i-1].first;
2754
348
            auto& prevOp = operations[i].second;
2755
2756
348
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
137
                auto& curModifier = op.modifier.GetVectorPtr();
2758
137
                if ( curModifier.size() == 0 ) {
2759
55.4k
                    for (size_t j = 0; j < 512; j++) {
2760
55.2k
                        curModifier.push_back(1);
2761
55.2k
                    }
2762
108
                } else {
2763
298
                    for (auto& c : curModifier) {
2764
298
                        c++;
2765
298
                    }
2766
29
                }
2767
137
            }
2768
348
        }
2769
2770
556
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
556
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
556
        const auto& result = results.back();
2777
2778
556
        if ( result.second != std::nullopt ) {
2779
173
            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
173
        }
2786
2787
556
        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
556
        if ( options.disableTests == false ) {
2796
556
            tests::test(op, result.second);
2797
556
        }
2798
2799
556
        postprocess(module, op, result);
2800
556
    }
2801
2802
235
    if ( options.noCompare == false ) {
2803
208
        compare(operations, results, data, size);
2804
208
    }
2805
235
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
95
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
95
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
95
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
419
    do {
2691
419
        auto op = getOp(&parentDs, data, size);
2692
419
        auto module = getModule(parentDs);
2693
419
        if ( module == nullptr ) {
2694
292
            continue;
2695
292
        }
2696
2697
127
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
127
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
417
    } while ( parentDs.Get<bool>() == true );
2704
2705
95
    if ( operations.empty() == true ) {
2706
0
        return;
2707
0
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
95
#if 1
2711
95
    {
2712
95
        std::set<uint64_t> moduleIDs;
2713
156
        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
95
        std::set<uint64_t> operationModuleIDs;
2725
111
        for (const auto& op : operations) {
2726
111
            operationModuleIDs.insert(op.first->ID);
2727
111
        }
2728
2729
95
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
95
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
95
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
95
        for (const auto& id : addModuleIDs) {
2734
77
            operations.push_back({ modules.at(id), operations[0].second});
2735
77
        }
2736
95
    }
2737
95
#endif
2738
2739
95
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
95
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
283
    for (size_t i = 0; i < operations.size(); i++) {
2747
188
        auto& operation = operations[i];
2748
2749
188
        auto& module = operation.first;
2750
188
        auto& op = operation.second;
2751
2752
188
        if ( i > 0 ) {
2753
110
            auto& prevModule = operations[i-1].first;
2754
110
            auto& prevOp = operations[i].second;
2755
2756
110
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
32
                auto& curModifier = op.modifier.GetVectorPtr();
2758
32
                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
134
                    for (auto& c : curModifier) {
2764
134
                        c++;
2765
134
                    }
2766
5
                }
2767
32
            }
2768
110
        }
2769
2770
188
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
188
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
188
        const auto& result = results.back();
2777
2778
188
        if ( result.second != std::nullopt ) {
2779
133
            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
133
        }
2786
2787
188
        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
188
        if ( options.disableTests == false ) {
2796
188
            tests::test(op, result.second);
2797
188
        }
2798
2799
188
        postprocess(module, op, result);
2800
188
    }
2801
2802
95
    if ( options.noCompare == false ) {
2803
78
        compare(operations, results, data, size);
2804
78
    }
2805
95
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
197
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
197
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
197
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
619
    do {
2691
619
        auto op = getOp(&parentDs, data, size);
2692
619
        auto module = getModule(parentDs);
2693
619
        if ( module == nullptr ) {
2694
422
            continue;
2695
422
        }
2696
2697
197
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
197
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
614
    } while ( parentDs.Get<bool>() == true );
2704
2705
197
    if ( operations.empty() == true ) {
2706
18
        return;
2707
18
    }
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
266
        for (const auto& m : modules ) {
2714
266
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
266
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
266
            moduleIDs.insert(moduleID);
2722
266
        }
2723
2724
179
        std::set<uint64_t> operationModuleIDs;
2725
179
        for (const auto& op : operations) {
2726
174
            operationModuleIDs.insert(op.first->ID);
2727
174
        }
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
130
            operations.push_back({ modules.at(id), operations[0].second});
2735
130
        }
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
483
    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
171
            auto& prevModule = operations[i-1].first;
2754
171
            auto& prevOp = operations[i].second;
2755
2756
171
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
36
                auto& curModifier = op.modifier.GetVectorPtr();
2758
36
                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
26
                } else {
2763
11
                    for (auto& c : curModifier) {
2764
11
                        c++;
2765
11
                    }
2766
10
                }
2767
36
            }
2768
171
        }
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
57
            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
57
        }
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
179
    if ( options.noCompare == false ) {
2803
133
        compare(operations, results, data, size);
2804
133
    }
2805
179
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
33
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
33
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
33
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
848
    do {
2691
848
        auto op = getOp(&parentDs, data, size);
2692
848
        auto module = getModule(parentDs);
2693
848
        if ( module == nullptr ) {
2694
788
            continue;
2695
788
        }
2696
2697
60
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
60
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
846
    } while ( parentDs.Get<bool>() == true );
2704
2705
33
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
31
#if 1
2711
31
    {
2712
31
        std::set<uint64_t> moduleIDs;
2713
31
        for (const auto& m : modules ) {
2714
26
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
26
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
26
            moduleIDs.insert(moduleID);
2722
26
        }
2723
2724
31
        std::set<uint64_t> operationModuleIDs;
2725
37
        for (const auto& op : operations) {
2726
37
            operationModuleIDs.insert(op.first->ID);
2727
37
        }
2728
2729
31
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
31
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
31
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
31
        for (const auto& id : addModuleIDs) {
2734
11
            operations.push_back({ modules.at(id), operations[0].second});
2735
11
        }
2736
31
    }
2737
31
#endif
2738
2739
31
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
31
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
79
    for (size_t i = 0; i < operations.size(); i++) {
2747
48
        auto& operation = operations[i];
2748
2749
48
        auto& module = operation.first;
2750
48
        auto& op = operation.second;
2751
2752
48
        if ( i > 0 ) {
2753
35
            auto& prevModule = operations[i-1].first;
2754
35
            auto& prevOp = operations[i].second;
2755
2756
35
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
22
                auto& curModifier = op.modifier.GetVectorPtr();
2758
22
                if ( curModifier.size() == 0 ) {
2759
8.20k
                    for (size_t j = 0; j < 512; j++) {
2760
8.19k
                        curModifier.push_back(1);
2761
8.19k
                    }
2762
16
                } else {
2763
20
                    for (auto& c : curModifier) {
2764
20
                        c++;
2765
20
                    }
2766
6
                }
2767
22
            }
2768
35
        }
2769
2770
48
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
48
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
48
        const auto& result = results.back();
2777
2778
48
        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
48
        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
48
        if ( options.disableTests == false ) {
2796
48
            tests::test(op, result.second);
2797
48
        }
2798
2799
48
        postprocess(module, op, result);
2800
48
    }
2801
2802
31
    if ( options.noCompare == false ) {
2803
13
        compare(operations, results, data, size);
2804
13
    }
2805
31
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
188
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
188
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
188
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
629
    do {
2691
629
        auto op = getOp(&parentDs, data, size);
2692
629
        auto module = getModule(parentDs);
2693
629
        if ( module == nullptr ) {
2694
302
            continue;
2695
302
        }
2696
2697
327
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
327
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
18
            break;
2702
18
        }
2703
611
    } while ( parentDs.Get<bool>() == true );
2704
2705
188
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
183
#if 1
2711
183
    {
2712
183
        std::set<uint64_t> moduleIDs;
2713
322
        for (const auto& m : modules ) {
2714
322
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
322
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
322
            moduleIDs.insert(moduleID);
2722
322
        }
2723
2724
183
        std::set<uint64_t> operationModuleIDs;
2725
296
        for (const auto& op : operations) {
2726
296
            operationModuleIDs.insert(op.first->ID);
2727
296
        }
2728
2729
183
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
183
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
183
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
183
        for (const auto& id : addModuleIDs) {
2734
159
            operations.push_back({ modules.at(id), operations[0].second});
2735
159
        }
2736
183
    }
2737
183
#endif
2738
2739
183
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
183
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
638
    for (size_t i = 0; i < operations.size(); i++) {
2747
455
        auto& operation = operations[i];
2748
2749
455
        auto& module = operation.first;
2750
455
        auto& op = operation.second;
2751
2752
455
        if ( i > 0 ) {
2753
294
            auto& prevModule = operations[i-1].first;
2754
294
            auto& prevOp = operations[i].second;
2755
2756
294
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
130
                auto& curModifier = op.modifier.GetVectorPtr();
2758
130
                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
2.86k
                    for (auto& c : curModifier) {
2764
2.86k
                        c++;
2765
2.86k
                    }
2766
38
                }
2767
130
            }
2768
294
        }
2769
2770
455
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
455
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
455
        const auto& result = results.back();
2777
2778
455
        if ( result.second != std::nullopt ) {
2779
189
            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
189
        }
2786
2787
455
        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
455
        if ( options.disableTests == false ) {
2796
455
            tests::test(op, result.second);
2797
455
        }
2798
2799
455
        postprocess(module, op, result);
2800
455
    }
2801
2802
183
    if ( options.noCompare == false ) {
2803
161
        compare(operations, results, data, size);
2804
161
    }
2805
183
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
42
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
42
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
42
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
849
    do {
2691
849
        auto op = getOp(&parentDs, data, size);
2692
849
        auto module = getModule(parentDs);
2693
849
        if ( module == nullptr ) {
2694
771
            continue;
2695
771
        }
2696
2697
78
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
78
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
848
    } while ( parentDs.Get<bool>() == true );
2704
2705
42
    if ( operations.empty() == true ) {
2706
1
        return;
2707
1
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
41
#if 1
2711
41
    {
2712
41
        std::set<uint64_t> moduleIDs;
2713
52
        for (const auto& m : modules ) {
2714
52
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
52
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
52
            moduleIDs.insert(moduleID);
2722
52
        }
2723
2724
41
        std::set<uint64_t> operationModuleIDs;
2725
55
        for (const auto& op : operations) {
2726
55
            operationModuleIDs.insert(op.first->ID);
2727
55
        }
2728
2729
41
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
41
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
41
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
41
        for (const auto& id : addModuleIDs) {
2734
24
            operations.push_back({ modules.at(id), operations[0].second});
2735
24
        }
2736
41
    }
2737
41
#endif
2738
2739
41
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
41
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
120
    for (size_t i = 0; i < operations.size(); i++) {
2747
79
        auto& operation = operations[i];
2748
2749
79
        auto& module = operation.first;
2750
79
        auto& op = operation.second;
2751
2752
79
        if ( i > 0 ) {
2753
53
            auto& prevModule = operations[i-1].first;
2754
53
            auto& prevOp = operations[i].second;
2755
2756
53
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
27
                auto& curModifier = op.modifier.GetVectorPtr();
2758
27
                if ( curModifier.size() == 0 ) {
2759
5.64k
                    for (size_t j = 0; j < 512; j++) {
2760
5.63k
                        curModifier.push_back(1);
2761
5.63k
                    }
2762
16
                } else {
2763
2.27k
                    for (auto& c : curModifier) {
2764
2.27k
                        c++;
2765
2.27k
                    }
2766
16
                }
2767
27
            }
2768
53
        }
2769
2770
79
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
79
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
79
        const auto& result = results.back();
2777
2778
79
        if ( result.second != std::nullopt ) {
2779
15
            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
15
        }
2786
2787
79
        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
79
        if ( options.disableTests == false ) {
2796
79
            tests::test(op, result.second);
2797
79
        }
2798
2799
79
        postprocess(module, op, result);
2800
79
    }
2801
2802
41
    if ( options.noCompare == false ) {
2803
26
        compare(operations, results, data, size);
2804
26
    }
2805
41
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
25
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
25
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
25
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
584
    do {
2691
584
        auto op = getOp(&parentDs, data, size);
2692
584
        auto module = getModule(parentDs);
2693
584
        if ( module == nullptr ) {
2694
541
            continue;
2695
541
        }
2696
2697
43
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
43
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
583
    } while ( parentDs.Get<bool>() == true );
2704
2705
25
    if ( operations.empty() == true ) {
2706
0
        return;
2707
0
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
25
#if 1
2711
25
    {
2712
25
        std::set<uint64_t> moduleIDs;
2713
25
        for (const auto& m : modules ) {
2714
14
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
14
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
14
            moduleIDs.insert(moduleID);
2722
14
        }
2723
2724
25
        std::set<uint64_t> operationModuleIDs;
2725
25
        for (const auto& op : operations) {
2726
21
            operationModuleIDs.insert(op.first->ID);
2727
21
        }
2728
2729
25
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
25
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
25
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
25
        for (const auto& id : addModuleIDs) {
2734
5
            operations.push_back({ modules.at(id), operations[0].second});
2735
5
        }
2736
25
    }
2737
25
#endif
2738
2739
25
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
25
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
51
    for (size_t i = 0; i < operations.size(); i++) {
2747
26
        auto& operation = operations[i];
2748
2749
26
        auto& module = operation.first;
2750
26
        auto& op = operation.second;
2751
2752
26
        if ( i > 0 ) {
2753
19
            auto& prevModule = operations[i-1].first;
2754
19
            auto& prevOp = operations[i].second;
2755
2756
19
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
9
                auto& curModifier = op.modifier.GetVectorPtr();
2758
9
                if ( curModifier.size() == 0 ) {
2759
1.53k
                    for (size_t j = 0; j < 512; j++) {
2760
1.53k
                        curModifier.push_back(1);
2761
1.53k
                    }
2762
6
                } else {
2763
244
                    for (auto& c : curModifier) {
2764
244
                        c++;
2765
244
                    }
2766
6
                }
2767
9
            }
2768
19
        }
2769
2770
26
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
26
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
26
        const auto& result = results.back();
2777
2778
26
        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
26
        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
26
        if ( options.disableTests == false ) {
2796
26
            tests::test(op, result.second);
2797
26
        }
2798
2799
26
        postprocess(module, op, result);
2800
26
    }
2801
2802
25
    if ( options.noCompare == false ) {
2803
7
        compare(operations, results, data, size);
2804
7
    }
2805
25
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
29
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
29
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
29
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
544
    do {
2691
544
        auto op = getOp(&parentDs, data, size);
2692
544
        auto module = getModule(parentDs);
2693
544
        if ( module == nullptr ) {
2694
496
            continue;
2695
496
        }
2696
2697
48
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
48
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
544
    } while ( parentDs.Get<bool>() == true );
2704
2705
29
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
24
#if 1
2711
24
    {
2712
24
        std::set<uint64_t> moduleIDs;
2713
24
        for (const auto& m : modules ) {
2714
20
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
20
            moduleIDs.insert(moduleID);
2722
20
        }
2723
2724
24
        std::set<uint64_t> operationModuleIDs;
2725
28
        for (const auto& op : operations) {
2726
28
            operationModuleIDs.insert(op.first->ID);
2727
28
        }
2728
2729
24
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
24
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
24
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
24
        for (const auto& id : addModuleIDs) {
2734
7
            operations.push_back({ modules.at(id), operations[0].second});
2735
7
        }
2736
24
    }
2737
24
#endif
2738
2739
24
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
24
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
59
    for (size_t i = 0; i < operations.size(); i++) {
2747
35
        auto& operation = operations[i];
2748
2749
35
        auto& module = operation.first;
2750
35
        auto& op = operation.second;
2751
2752
35
        if ( i > 0 ) {
2753
25
            auto& prevModule = operations[i-1].first;
2754
25
            auto& prevOp = operations[i].second;
2755
2756
25
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
15
                auto& curModifier = op.modifier.GetVectorPtr();
2758
15
                if ( curModifier.size() == 0 ) {
2759
1.53k
                    for (size_t j = 0; j < 512; j++) {
2760
1.53k
                        curModifier.push_back(1);
2761
1.53k
                    }
2762
12
                } else {
2763
92
                    for (auto& c : curModifier) {
2764
92
                        c++;
2765
92
                    }
2766
12
                }
2767
15
            }
2768
25
        }
2769
2770
35
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
35
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
35
        const auto& result = results.back();
2777
2778
35
        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
35
        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
35
        if ( options.disableTests == false ) {
2796
35
            tests::test(op, result.second);
2797
35
        }
2798
2799
35
        postprocess(module, op, result);
2800
35
    }
2801
2802
24
    if ( options.noCompare == false ) {
2803
10
        compare(operations, results, data, size);
2804
10
    }
2805
24
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
23
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
23
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
23
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
576
    do {
2691
576
        auto op = getOp(&parentDs, data, size);
2692
576
        auto module = getModule(parentDs);
2693
576
        if ( module == nullptr ) {
2694
548
            continue;
2695
548
        }
2696
2697
28
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
28
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
576
    } while ( parentDs.Get<bool>() == true );
2704
2705
23
    if ( operations.empty() == true ) {
2706
0
        return;
2707
0
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
23
#if 1
2711
23
    {
2712
23
        std::set<uint64_t> moduleIDs;
2713
23
        for (const auto& m : modules ) {
2714
8
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
8
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
8
            moduleIDs.insert(moduleID);
2722
8
        }
2723
2724
23
        std::set<uint64_t> operationModuleIDs;
2725
23
        for (const auto& op : operations) {
2726
8
            operationModuleIDs.insert(op.first->ID);
2727
8
        }
2728
2729
23
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
23
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
23
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
23
        for (const auto& id : addModuleIDs) {
2734
3
            operations.push_back({ modules.at(id), operations[0].second});
2735
3
        }
2736
23
    }
2737
23
#endif
2738
2739
23
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
23
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
34
    for (size_t i = 0; i < operations.size(); i++) {
2747
11
        auto& operation = operations[i];
2748
2749
11
        auto& module = operation.first;
2750
11
        auto& op = operation.second;
2751
2752
11
        if ( i > 0 ) {
2753
7
            auto& prevModule = operations[i-1].first;
2754
7
            auto& prevOp = operations[i].second;
2755
2756
7
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
3
                auto& curModifier = op.modifier.GetVectorPtr();
2758
3
                if ( curModifier.size() == 0 ) {
2759
0
                    for (size_t j = 0; j < 512; j++) {
2760
0
                        curModifier.push_back(1);
2761
0
                    }
2762
3
                } else {
2763
13
                    for (auto& c : curModifier) {
2764
13
                        c++;
2765
13
                    }
2766
3
                }
2767
3
            }
2768
7
        }
2769
2770
11
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
11
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
11
        const auto& result = results.back();
2777
2778
11
        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
11
        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
11
        if ( options.disableTests == false ) {
2796
11
            tests::test(op, result.second);
2797
11
        }
2798
2799
11
        postprocess(module, op, result);
2800
11
    }
2801
2802
23
    if ( options.noCompare == false ) {
2803
4
        compare(operations, results, data, size);
2804
4
    }
2805
23
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
107
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
107
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
107
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
825
    do {
2691
825
        auto op = getOp(&parentDs, data, size);
2692
825
        auto module = getModule(parentDs);
2693
825
        if ( module == nullptr ) {
2694
646
            continue;
2695
646
        }
2696
2697
179
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
179
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
3
            break;
2702
3
        }
2703
822
    } while ( parentDs.Get<bool>() == true );
2704
2705
107
    if ( operations.empty() == true ) {
2706
15
        return;
2707
15
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
92
#if 1
2711
92
    {
2712
92
        std::set<uint64_t> moduleIDs;
2713
136
        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
92
        std::set<uint64_t> operationModuleIDs;
2725
145
        for (const auto& op : operations) {
2726
145
            operationModuleIDs.insert(op.first->ID);
2727
145
        }
2728
2729
92
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
92
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
92
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
92
        for (const auto& id : addModuleIDs) {
2734
65
            operations.push_back({ modules.at(id), operations[0].second});
2735
65
        }
2736
92
    }
2737
92
#endif
2738
2739
92
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
92
    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
210
        auto& operation = operations[i];
2748
2749
210
        auto& module = operation.first;
2750
210
        auto& op = operation.second;
2751
2752
210
        if ( i > 0 ) {
2753
142
            auto& prevModule = operations[i-1].first;
2754
142
            auto& prevOp = operations[i].second;
2755
2756
142
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
69
                auto& curModifier = op.modifier.GetVectorPtr();
2758
69
                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
117
                    for (auto& c : curModifier) {
2764
117
                        c++;
2765
117
                    }
2766
31
                }
2767
69
            }
2768
142
        }
2769
2770
210
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
210
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
210
        const auto& result = results.back();
2777
2778
210
        if ( result.second != std::nullopt ) {
2779
105
            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
105
        }
2786
2787
210
        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
210
        if ( options.disableTests == false ) {
2796
210
            tests::test(op, result.second);
2797
210
        }
2798
2799
210
        postprocess(module, op, result);
2800
210
    }
2801
2802
92
    if ( options.noCompare == false ) {
2803
68
        compare(operations, results, data, size);
2804
68
    }
2805
92
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
43
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
43
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
43
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
450
    do {
2691
450
        auto op = getOp(&parentDs, data, size);
2692
450
        auto module = getModule(parentDs);
2693
450
        if ( module == nullptr ) {
2694
392
            continue;
2695
392
        }
2696
2697
58
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
58
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
450
    } while ( parentDs.Get<bool>() == true );
2704
2705
43
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
40
#if 1
2711
40
    {
2712
40
        std::set<uint64_t> moduleIDs;
2713
46
        for (const auto& m : modules ) {
2714
46
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
46
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
46
            moduleIDs.insert(moduleID);
2722
46
        }
2723
2724
40
        std::set<uint64_t> operationModuleIDs;
2725
42
        for (const auto& op : operations) {
2726
42
            operationModuleIDs.insert(op.first->ID);
2727
42
        }
2728
2729
40
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
40
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
40
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
40
        for (const auto& id : addModuleIDs) {
2734
22
            operations.push_back({ modules.at(id), operations[0].second});
2735
22
        }
2736
40
    }
2737
40
#endif
2738
2739
40
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
40
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
104
    for (size_t i = 0; i < operations.size(); i++) {
2747
64
        auto& operation = operations[i];
2748
2749
64
        auto& module = operation.first;
2750
64
        auto& op = operation.second;
2751
2752
64
        if ( i > 0 ) {
2753
41
            auto& prevModule = operations[i-1].first;
2754
41
            auto& prevOp = operations[i].second;
2755
2756
41
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
18
                auto& curModifier = op.modifier.GetVectorPtr();
2758
18
                if ( curModifier.size() == 0 ) {
2759
4.61k
                    for (size_t j = 0; j < 512; j++) {
2760
4.60k
                        curModifier.push_back(1);
2761
4.60k
                    }
2762
9
                } else {
2763
73
                    for (auto& c : curModifier) {
2764
73
                        c++;
2765
73
                    }
2766
9
                }
2767
18
            }
2768
41
        }
2769
2770
64
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
64
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
64
        const auto& result = results.back();
2777
2778
64
        if ( result.second != std::nullopt ) {
2779
19
            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
19
        }
2786
2787
64
        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
64
        if ( options.disableTests == false ) {
2796
64
            tests::test(op, result.second);
2797
64
        }
2798
2799
64
        postprocess(module, op, result);
2800
64
    }
2801
2802
40
    if ( options.noCompare == false ) {
2803
23
        compare(operations, results, data, size);
2804
23
    }
2805
40
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
21
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
21
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
21
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
577
    do {
2691
577
        auto op = getOp(&parentDs, data, size);
2692
577
        auto module = getModule(parentDs);
2693
577
        if ( module == nullptr ) {
2694
541
            continue;
2695
541
        }
2696
2697
36
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
36
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
577
    } while ( parentDs.Get<bool>() == true );
2704
2705
21
    if ( operations.empty() == true ) {
2706
1
        return;
2707
1
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
20
#if 1
2711
20
    {
2712
20
        std::set<uint64_t> moduleIDs;
2713
20
        for (const auto& m : modules ) {
2714
10
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
10
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
10
            moduleIDs.insert(moduleID);
2722
10
        }
2723
2724
20
        std::set<uint64_t> operationModuleIDs;
2725
20
        for (const auto& op : operations) {
2726
8
            operationModuleIDs.insert(op.first->ID);
2727
8
        }
2728
2729
20
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
20
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
20
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
20
        for (const auto& id : addModuleIDs) {
2734
4
            operations.push_back({ modules.at(id), operations[0].second});
2735
4
        }
2736
20
    }
2737
20
#endif
2738
2739
20
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
20
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
32
    for (size_t i = 0; i < operations.size(); i++) {
2747
12
        auto& operation = operations[i];
2748
2749
12
        auto& module = operation.first;
2750
12
        auto& op = operation.second;
2751
2752
12
        if ( i > 0 ) {
2753
7
            auto& prevModule = operations[i-1].first;
2754
7
            auto& prevOp = operations[i].second;
2755
2756
7
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
2
                auto& curModifier = op.modifier.GetVectorPtr();
2758
2
                if ( curModifier.size() == 0 ) {
2759
0
                    for (size_t j = 0; j < 512; j++) {
2760
0
                        curModifier.push_back(1);
2761
0
                    }
2762
2
                } else {
2763
2
                    for (auto& c : curModifier) {
2764
2
                        c++;
2765
2
                    }
2766
2
                }
2767
2
            }
2768
7
        }
2769
2770
12
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
12
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
12
        const auto& result = results.back();
2777
2778
12
        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
12
        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
        if ( options.disableTests == false ) {
2796
12
            tests::test(op, result.second);
2797
12
        }
2798
2799
12
        postprocess(module, op, result);
2800
12
    }
2801
2802
20
    if ( options.noCompare == false ) {
2803
5
        compare(operations, results, data, size);
2804
5
    }
2805
20
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
16
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
16
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
16
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
85
    do {
2691
85
        auto op = getOp(&parentDs, data, size);
2692
85
        auto module = getModule(parentDs);
2693
85
        if ( module == nullptr ) {
2694
55
            continue;
2695
55
        }
2696
2697
30
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
30
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
84
    } while ( parentDs.Get<bool>() == true );
2704
2705
16
    if ( operations.empty() == true ) {
2706
0
        return;
2707
0
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
16
#if 1
2711
16
    {
2712
16
        std::set<uint64_t> moduleIDs;
2713
16
        for (const auto& m : modules ) {
2714
12
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
12
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
12
            moduleIDs.insert(moduleID);
2722
12
        }
2723
2724
16
        std::set<uint64_t> operationModuleIDs;
2725
19
        for (const auto& op : operations) {
2726
19
            operationModuleIDs.insert(op.first->ID);
2727
19
        }
2728
2729
16
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
16
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
16
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
16
        for (const auto& id : addModuleIDs) {
2734
3
            operations.push_back({ modules.at(id), operations[0].second});
2735
3
        }
2736
16
    }
2737
16
#endif
2738
2739
16
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
16
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
38
    for (size_t i = 0; i < operations.size(); i++) {
2747
22
        auto& operation = operations[i];
2748
2749
22
        auto& module = operation.first;
2750
22
        auto& op = operation.second;
2751
2752
22
        if ( i > 0 ) {
2753
16
            auto& prevModule = operations[i-1].first;
2754
16
            auto& prevOp = operations[i].second;
2755
2756
16
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
7
                auto& curModifier = op.modifier.GetVectorPtr();
2758
7
                if ( curModifier.size() == 0 ) {
2759
2.56k
                    for (size_t j = 0; j < 512; j++) {
2760
2.56k
                        curModifier.push_back(1);
2761
2.56k
                    }
2762
5
                } else {
2763
3
                    for (auto& c : curModifier) {
2764
3
                        c++;
2765
3
                    }
2766
2
                }
2767
7
            }
2768
16
        }
2769
2770
22
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
22
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
22
        const auto& result = results.back();
2777
2778
22
        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
22
        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
        if ( options.disableTests == false ) {
2796
22
            tests::test(op, result.second);
2797
22
        }
2798
2799
22
        postprocess(module, op, result);
2800
22
    }
2801
2802
16
    if ( options.noCompare == false ) {
2803
6
        compare(operations, results, data, size);
2804
6
    }
2805
16
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
133
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
133
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
133
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
825
    do {
2691
825
        auto op = getOp(&parentDs, data, size);
2692
825
        auto module = getModule(parentDs);
2693
825
        if ( module == nullptr ) {
2694
623
            continue;
2695
623
        }
2696
2697
202
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
202
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
820
    } while ( parentDs.Get<bool>() == true );
2704
2705
133
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
131
#if 1
2711
131
    {
2712
131
        std::set<uint64_t> moduleIDs;
2713
230
        for (const auto& m : modules ) {
2714
230
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
230
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
230
            moduleIDs.insert(moduleID);
2722
230
        }
2723
2724
131
        std::set<uint64_t> operationModuleIDs;
2725
181
        for (const auto& op : operations) {
2726
181
            operationModuleIDs.insert(op.first->ID);
2727
181
        }
2728
2729
131
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
131
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
131
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
131
        for (const auto& id : addModuleIDs) {
2734
112
            operations.push_back({ modules.at(id), operations[0].second});
2735
112
        }
2736
131
    }
2737
131
#endif
2738
2739
131
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
131
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
424
    for (size_t i = 0; i < operations.size(); i++) {
2747
293
        auto& operation = operations[i];
2748
2749
293
        auto& module = operation.first;
2750
293
        auto& op = operation.second;
2751
2752
293
        if ( i > 0 ) {
2753
178
            auto& prevModule = operations[i-1].first;
2754
178
            auto& prevOp = operations[i].second;
2755
2756
178
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
61
                auto& curModifier = op.modifier.GetVectorPtr();
2758
61
                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
19
                    for (auto& c : curModifier) {
2764
19
                        c++;
2765
19
                    }
2766
12
                }
2767
61
            }
2768
178
        }
2769
2770
293
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
293
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
293
        const auto& result = results.back();
2777
2778
293
        if ( result.second != std::nullopt ) {
2779
118
            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
118
        }
2786
2787
293
        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
293
        if ( options.disableTests == false ) {
2796
293
            tests::test(op, result.second);
2797
293
        }
2798
2799
293
        postprocess(module, op, result);
2800
293
    }
2801
2802
131
    if ( options.noCompare == false ) {
2803
115
        compare(operations, results, data, size);
2804
115
    }
2805
131
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
57
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
57
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
57
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
341
    do {
2691
341
        auto op = getOp(&parentDs, data, size);
2692
341
        auto module = getModule(parentDs);
2693
341
        if ( module == nullptr ) {
2694
258
            continue;
2695
258
        }
2696
2697
83
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
83
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
340
    } while ( parentDs.Get<bool>() == true );
2704
2705
57
    if ( operations.empty() == true ) {
2706
1
        return;
2707
1
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
56
#if 1
2711
56
    {
2712
56
        std::set<uint64_t> moduleIDs;
2713
88
        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
56
        std::set<uint64_t> operationModuleIDs;
2725
74
        for (const auto& op : operations) {
2726
74
            operationModuleIDs.insert(op.first->ID);
2727
74
        }
2728
2729
56
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
56
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
56
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
56
        for (const auto& id : addModuleIDs) {
2734
44
            operations.push_back({ modules.at(id), operations[0].second});
2735
44
        }
2736
56
    }
2737
56
#endif
2738
2739
56
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
56
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
174
    for (size_t i = 0; i < operations.size(); i++) {
2747
118
        auto& operation = operations[i];
2748
2749
118
        auto& module = operation.first;
2750
118
        auto& op = operation.second;
2751
2752
118
        if ( i > 0 ) {
2753
74
            auto& prevModule = operations[i-1].first;
2754
74
            auto& prevOp = operations[i].second;
2755
2756
74
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
30
                auto& curModifier = op.modifier.GetVectorPtr();
2758
30
                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
23
                } else {
2763
230
                    for (auto& c : curModifier) {
2764
230
                        c++;
2765
230
                    }
2766
7
                }
2767
30
            }
2768
74
        }
2769
2770
118
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
118
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
118
        const auto& result = results.back();
2777
2778
118
        if ( result.second != std::nullopt ) {
2779
50
            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
50
        }
2786
2787
118
        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
118
        if ( options.disableTests == false ) {
2796
118
            tests::test(op, result.second);
2797
118
        }
2798
2799
118
        postprocess(module, op, result);
2800
118
    }
2801
2802
56
    if ( options.noCompare == false ) {
2803
44
        compare(operations, results, data, size);
2804
44
    }
2805
56
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
42
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
42
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
42
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
588
    do {
2691
588
        auto op = getOp(&parentDs, data, size);
2692
588
        auto module = getModule(parentDs);
2693
588
        if ( module == nullptr ) {
2694
537
            continue;
2695
537
        }
2696
2697
51
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
51
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
588
    } while ( parentDs.Get<bool>() == true );
2704
2705
42
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
37
#if 1
2711
37
    {
2712
37
        std::set<uint64_t> moduleIDs;
2713
37
        for (const auto& m : modules ) {
2714
22
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
22
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
22
            moduleIDs.insert(moduleID);
2722
22
        }
2723
2724
37
        std::set<uint64_t> operationModuleIDs;
2725
37
        for (const auto& op : operations) {
2726
29
            operationModuleIDs.insert(op.first->ID);
2727
29
        }
2728
2729
37
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
37
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
37
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
37
        for (const auto& id : addModuleIDs) {
2734
9
            operations.push_back({ modules.at(id), operations[0].second});
2735
9
        }
2736
37
    }
2737
37
#endif
2738
2739
37
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
37
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
75
    for (size_t i = 0; i < operations.size(); i++) {
2747
38
        auto& operation = operations[i];
2748
2749
38
        auto& module = operation.first;
2750
38
        auto& op = operation.second;
2751
2752
38
        if ( i > 0 ) {
2753
27
            auto& prevModule = operations[i-1].first;
2754
27
            auto& prevOp = operations[i].second;
2755
2756
27
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
14
                auto& curModifier = op.modifier.GetVectorPtr();
2758
14
                if ( curModifier.size() == 0 ) {
2759
4.10k
                    for (size_t j = 0; j < 512; j++) {
2760
4.09k
                        curModifier.push_back(1);
2761
4.09k
                    }
2762
8
                } else {
2763
142
                    for (auto& c : curModifier) {
2764
142
                        c++;
2765
142
                    }
2766
6
                }
2767
14
            }
2768
27
        }
2769
2770
38
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
38
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
38
        const auto& result = results.back();
2777
2778
38
        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
38
        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
38
        if ( options.disableTests == false ) {
2796
38
            tests::test(op, result.second);
2797
38
        }
2798
2799
38
        postprocess(module, op, result);
2800
38
    }
2801
2802
37
    if ( options.noCompare == false ) {
2803
11
        compare(operations, results, data, size);
2804
11
    }
2805
37
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
62
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
62
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
62
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
213
    do {
2691
213
        auto op = getOp(&parentDs, data, size);
2692
213
        auto module = getModule(parentDs);
2693
213
        if ( module == nullptr ) {
2694
170
            continue;
2695
170
        }
2696
2697
43
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
43
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
212
    } while ( parentDs.Get<bool>() == true );
2704
2705
62
    if ( operations.empty() == true ) {
2706
9
        return;
2707
9
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
53
#if 1
2711
53
    {
2712
53
        std::set<uint64_t> moduleIDs;
2713
53
        for (const auto& m : modules ) {
2714
14
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
14
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
14
            moduleIDs.insert(moduleID);
2722
14
        }
2723
2724
53
        std::set<uint64_t> operationModuleIDs;
2725
53
        for (const auto& op : operations) {
2726
19
            operationModuleIDs.insert(op.first->ID);
2727
19
        }
2728
2729
53
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
53
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
53
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
53
        for (const auto& id : addModuleIDs) {
2734
6
            operations.push_back({ modules.at(id), operations[0].second});
2735
6
        }
2736
53
    }
2737
53
#endif
2738
2739
53
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
53
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
78
    for (size_t i = 0; i < operations.size(); i++) {
2747
25
        auto& operation = operations[i];
2748
2749
25
        auto& module = operation.first;
2750
25
        auto& op = operation.second;
2751
2752
25
        if ( i > 0 ) {
2753
18
            auto& prevModule = operations[i-1].first;
2754
18
            auto& prevOp = operations[i].second;
2755
2756
18
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
9
                auto& curModifier = op.modifier.GetVectorPtr();
2758
9
                if ( curModifier.size() == 0 ) {
2759
3.59k
                    for (size_t j = 0; j < 512; j++) {
2760
3.58k
                        curModifier.push_back(1);
2761
3.58k
                    }
2762
7
                } else {
2763
16
                    for (auto& c : curModifier) {
2764
16
                        c++;
2765
16
                    }
2766
2
                }
2767
9
            }
2768
18
        }
2769
2770
25
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
25
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
25
        const auto& result = results.back();
2777
2778
25
        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
25
        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
25
        if ( options.disableTests == false ) {
2796
25
            tests::test(op, result.second);
2797
25
        }
2798
2799
25
        postprocess(module, op, result);
2800
25
    }
2801
2802
53
    if ( options.noCompare == false ) {
2803
7
        compare(operations, results, data, size);
2804
7
    }
2805
53
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
38
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
38
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
38
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
761
    do {
2691
761
        auto op = getOp(&parentDs, data, size);
2692
761
        auto module = getModule(parentDs);
2693
761
        if ( module == nullptr ) {
2694
715
            continue;
2695
715
        }
2696
2697
46
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
46
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
761
    } while ( parentDs.Get<bool>() == true );
2704
2705
38
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
36
#if 1
2711
36
    {
2712
36
        std::set<uint64_t> moduleIDs;
2713
36
        for (const auto& m : modules ) {
2714
14
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
14
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
14
            moduleIDs.insert(moduleID);
2722
14
        }
2723
2724
36
        std::set<uint64_t> operationModuleIDs;
2725
36
        for (const auto& op : operations) {
2726
17
            operationModuleIDs.insert(op.first->ID);
2727
17
        }
2728
2729
36
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
36
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
36
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
36
        for (const auto& id : addModuleIDs) {
2734
4
            operations.push_back({ modules.at(id), operations[0].second});
2735
4
        }
2736
36
    }
2737
36
#endif
2738
2739
36
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
36
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
57
    for (size_t i = 0; i < operations.size(); i++) {
2747
21
        auto& operation = operations[i];
2748
2749
21
        auto& module = operation.first;
2750
21
        auto& op = operation.second;
2751
2752
21
        if ( i > 0 ) {
2753
14
            auto& prevModule = operations[i-1].first;
2754
14
            auto& prevOp = operations[i].second;
2755
2756
14
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
7
                auto& curModifier = op.modifier.GetVectorPtr();
2758
7
                if ( curModifier.size() == 0 ) {
2759
3.59k
                    for (size_t j = 0; j < 512; j++) {
2760
3.58k
                        curModifier.push_back(1);
2761
3.58k
                    }
2762
7
                } else {
2763
0
                    for (auto& c : curModifier) {
2764
0
                        c++;
2765
0
                    }
2766
0
                }
2767
7
            }
2768
14
        }
2769
2770
21
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
21
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
21
        const auto& result = results.back();
2777
2778
21
        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
21
        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
        if ( options.disableTests == false ) {
2796
21
            tests::test(op, result.second);
2797
21
        }
2798
2799
21
        postprocess(module, op, result);
2800
21
    }
2801
2802
36
    if ( options.noCompare == false ) {
2803
7
        compare(operations, results, data, size);
2804
7
    }
2805
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
54
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
54
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
54
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
333
    do {
2691
333
        auto op = getOp(&parentDs, data, size);
2692
333
        auto module = getModule(parentDs);
2693
333
        if ( module == nullptr ) {
2694
285
            continue;
2695
285
        }
2696
2697
48
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
48
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
331
    } while ( parentDs.Get<bool>() == true );
2704
2705
54
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
50
#if 1
2711
50
    {
2712
50
        std::set<uint64_t> moduleIDs;
2713
50
        for (const auto& m : modules ) {
2714
14
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
14
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
14
            moduleIDs.insert(moduleID);
2722
14
        }
2723
2724
50
        std::set<uint64_t> operationModuleIDs;
2725
50
        for (const auto& op : operations) {
2726
22
            operationModuleIDs.insert(op.first->ID);
2727
22
        }
2728
2729
50
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
50
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
50
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
50
        for (const auto& id : addModuleIDs) {
2734
4
            operations.push_back({ modules.at(id), operations[0].second});
2735
4
        }
2736
50
    }
2737
50
#endif
2738
2739
50
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
50
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
76
    for (size_t i = 0; i < operations.size(); i++) {
2747
26
        auto& operation = operations[i];
2748
2749
26
        auto& module = operation.first;
2750
26
        auto& op = operation.second;
2751
2752
26
        if ( i > 0 ) {
2753
19
            auto& prevModule = operations[i-1].first;
2754
19
            auto& prevOp = operations[i].second;
2755
2756
19
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
10
                auto& curModifier = op.modifier.GetVectorPtr();
2758
10
                if ( curModifier.size() == 0 ) {
2759
3.59k
                    for (size_t j = 0; j < 512; j++) {
2760
3.58k
                        curModifier.push_back(1);
2761
3.58k
                    }
2762
7
                } else {
2763
59
                    for (auto& c : curModifier) {
2764
59
                        c++;
2765
59
                    }
2766
3
                }
2767
10
            }
2768
19
        }
2769
2770
26
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
26
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
26
        const auto& result = results.back();
2777
2778
26
        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
26
        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
26
        if ( options.disableTests == false ) {
2796
26
            tests::test(op, result.second);
2797
26
        }
2798
2799
26
        postprocess(module, op, result);
2800
26
    }
2801
2802
50
    if ( options.noCompare == false ) {
2803
7
        compare(operations, results, data, size);
2804
7
    }
2805
50
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
63
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
63
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
63
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
490
    do {
2691
490
        auto op = getOp(&parentDs, data, size);
2692
490
        auto module = getModule(parentDs);
2693
490
        if ( module == nullptr ) {
2694
439
            continue;
2695
439
        }
2696
2697
51
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
51
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
488
    } while ( parentDs.Get<bool>() == true );
2704
2705
63
    if ( operations.empty() == true ) {
2706
22
        return;
2707
22
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
41
#if 1
2711
41
    {
2712
41
        std::set<uint64_t> moduleIDs;
2713
41
        for (const auto& m : modules ) {
2714
14
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
14
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
14
            moduleIDs.insert(moduleID);
2722
14
        }
2723
2724
41
        std::set<uint64_t> operationModuleIDs;
2725
41
        for (const auto& op : operations) {
2726
23
            operationModuleIDs.insert(op.first->ID);
2727
23
        }
2728
2729
41
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
41
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
41
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
41
        for (const auto& id : addModuleIDs) {
2734
4
            operations.push_back({ modules.at(id), operations[0].second});
2735
4
        }
2736
41
    }
2737
41
#endif
2738
2739
41
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
41
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
68
    for (size_t i = 0; i < operations.size(); i++) {
2747
27
        auto& operation = operations[i];
2748
2749
27
        auto& module = operation.first;
2750
27
        auto& op = operation.second;
2751
2752
27
        if ( i > 0 ) {
2753
20
            auto& prevModule = operations[i-1].first;
2754
20
            auto& prevOp = operations[i].second;
2755
2756
20
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
13
                auto& curModifier = op.modifier.GetVectorPtr();
2758
13
                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
12
                } else {
2763
8
                    for (auto& c : curModifier) {
2764
8
                        c++;
2765
8
                    }
2766
1
                }
2767
13
            }
2768
20
        }
2769
2770
27
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
27
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
27
        const auto& result = results.back();
2777
2778
27
        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
27
        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
27
        if ( options.disableTests == false ) {
2796
27
            tests::test(op, result.second);
2797
27
        }
2798
2799
27
        postprocess(module, op, result);
2800
27
    }
2801
2802
41
    if ( options.noCompare == false ) {
2803
7
        compare(operations, results, data, size);
2804
7
    }
2805
41
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
31
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
31
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
31
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
818
    do {
2691
818
        auto op = getOp(&parentDs, data, size);
2692
818
        auto module = getModule(parentDs);
2693
818
        if ( module == nullptr ) {
2694
767
            continue;
2695
767
        }
2696
2697
51
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
51
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
816
    } while ( parentDs.Get<bool>() == true );
2704
2705
31
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
28
#if 1
2711
28
    {
2712
28
        std::set<uint64_t> moduleIDs;
2713
28
        for (const auto& m : modules ) {
2714
18
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
18
            moduleIDs.insert(moduleID);
2722
18
        }
2723
2724
28
        std::set<uint64_t> operationModuleIDs;
2725
30
        for (const auto& op : operations) {
2726
30
            operationModuleIDs.insert(op.first->ID);
2727
30
        }
2728
2729
28
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
28
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
28
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
28
        for (const auto& id : addModuleIDs) {
2734
6
            operations.push_back({ modules.at(id), operations[0].second});
2735
6
        }
2736
28
    }
2737
28
#endif
2738
2739
28
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
28
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
64
    for (size_t i = 0; i < operations.size(); i++) {
2747
36
        auto& operation = operations[i];
2748
2749
36
        auto& module = operation.first;
2750
36
        auto& op = operation.second;
2751
2752
36
        if ( i > 0 ) {
2753
27
            auto& prevModule = operations[i-1].first;
2754
27
            auto& prevOp = operations[i].second;
2755
2756
27
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
15
                auto& curModifier = op.modifier.GetVectorPtr();
2758
15
                if ( curModifier.size() == 0 ) {
2759
3.59k
                    for (size_t j = 0; j < 512; j++) {
2760
3.58k
                        curModifier.push_back(1);
2761
3.58k
                    }
2762
8
                } else {
2763
315
                    for (auto& c : curModifier) {
2764
315
                        c++;
2765
315
                    }
2766
8
                }
2767
15
            }
2768
27
        }
2769
2770
36
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
36
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
36
        const auto& result = results.back();
2777
2778
36
        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
36
        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
36
        if ( options.disableTests == false ) {
2796
36
            tests::test(op, result.second);
2797
36
        }
2798
2799
36
        postprocess(module, op, result);
2800
36
    }
2801
2802
28
    if ( options.noCompare == false ) {
2803
9
        compare(operations, results, data, size);
2804
9
    }
2805
28
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
27
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
27
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
27
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
653
    do {
2691
653
        auto op = getOp(&parentDs, data, size);
2692
653
        auto module = getModule(parentDs);
2693
653
        if ( module == nullptr ) {
2694
608
            continue;
2695
608
        }
2696
2697
45
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
45
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
4
            break;
2702
4
        }
2703
649
    } while ( parentDs.Get<bool>() == true );
2704
2705
27
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
25
#if 1
2711
25
    {
2712
25
        std::set<uint64_t> moduleIDs;
2713
25
        for (const auto& m : modules ) {
2714
24
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
24
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
24
            moduleIDs.insert(moduleID);
2722
24
        }
2723
2724
25
        std::set<uint64_t> operationModuleIDs;
2725
34
        for (const auto& op : operations) {
2726
34
            operationModuleIDs.insert(op.first->ID);
2727
34
        }
2728
2729
25
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
25
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
25
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
25
        for (const auto& id : addModuleIDs) {
2734
8
            operations.push_back({ modules.at(id), operations[0].second});
2735
8
        }
2736
25
    }
2737
25
#endif
2738
2739
25
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
25
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
67
    for (size_t i = 0; i < operations.size(); i++) {
2747
42
        auto& operation = operations[i];
2748
2749
42
        auto& module = operation.first;
2750
42
        auto& op = operation.second;
2751
2752
42
        if ( i > 0 ) {
2753
30
            auto& prevModule = operations[i-1].first;
2754
30
            auto& prevOp = operations[i].second;
2755
2756
30
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
16
                auto& curModifier = op.modifier.GetVectorPtr();
2758
16
                if ( curModifier.size() == 0 ) {
2759
4.61k
                    for (size_t j = 0; j < 512; j++) {
2760
4.60k
                        curModifier.push_back(1);
2761
4.60k
                    }
2762
9
                } else {
2763
176
                    for (auto& c : curModifier) {
2764
176
                        c++;
2765
176
                    }
2766
7
                }
2767
16
            }
2768
30
        }
2769
2770
42
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
42
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
42
        const auto& result = results.back();
2777
2778
42
        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
42
        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
42
        if ( options.disableTests == false ) {
2796
42
            tests::test(op, result.second);
2797
42
        }
2798
2799
42
        postprocess(module, op, result);
2800
42
    }
2801
2802
25
    if ( options.noCompare == false ) {
2803
12
        compare(operations, results, data, size);
2804
12
    }
2805
25
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
34
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
34
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
34
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
325
    do {
2691
325
        auto op = getOp(&parentDs, data, size);
2692
325
        auto module = getModule(parentDs);
2693
325
        if ( module == nullptr ) {
2694
249
            continue;
2695
249
        }
2696
2697
76
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
76
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
3
            break;
2702
3
        }
2703
322
    } while ( parentDs.Get<bool>() == true );
2704
2705
34
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
32
#if 1
2711
32
    {
2712
32
        std::set<uint64_t> moduleIDs;
2713
32
        for (const auto& m : modules ) {
2714
24
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
24
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
24
            moduleIDs.insert(moduleID);
2722
24
        }
2723
2724
32
        std::set<uint64_t> operationModuleIDs;
2725
43
        for (const auto& op : operations) {
2726
43
            operationModuleIDs.insert(op.first->ID);
2727
43
        }
2728
2729
32
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
32
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
32
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
32
        for (const auto& id : addModuleIDs) {
2734
10
            operations.push_back({ modules.at(id), operations[0].second});
2735
10
        }
2736
32
    }
2737
32
#endif
2738
2739
32
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
32
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
85
    for (size_t i = 0; i < operations.size(); i++) {
2747
53
        auto& operation = operations[i];
2748
2749
53
        auto& module = operation.first;
2750
53
        auto& op = operation.second;
2751
2752
53
        if ( i > 0 ) {
2753
41
            auto& prevModule = operations[i-1].first;
2754
41
            auto& prevOp = operations[i].second;
2755
2756
41
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
28
                auto& curModifier = op.modifier.GetVectorPtr();
2758
28
                if ( curModifier.size() == 0 ) {
2759
8.72k
                    for (size_t j = 0; j < 512; j++) {
2760
8.70k
                        curModifier.push_back(1);
2761
8.70k
                    }
2762
17
                } else {
2763
15
                    for (auto& c : curModifier) {
2764
15
                        c++;
2765
15
                    }
2766
11
                }
2767
28
            }
2768
41
        }
2769
2770
53
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
53
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
53
        const auto& result = results.back();
2777
2778
53
        if ( result.second != std::nullopt ) {
2779
3
            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
        }
2786
2787
53
        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
53
        if ( options.disableTests == false ) {
2796
53
            tests::test(op, result.second);
2797
53
        }
2798
2799
53
        postprocess(module, op, result);
2800
53
    }
2801
2802
32
    if ( options.noCompare == false ) {
2803
12
        compare(operations, results, data, size);
2804
12
    }
2805
32
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
31
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
31
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
31
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
451
    do {
2691
451
        auto op = getOp(&parentDs, data, size);
2692
451
        auto module = getModule(parentDs);
2693
451
        if ( module == nullptr ) {
2694
393
            continue;
2695
393
        }
2696
2697
58
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
58
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
3
            break;
2702
3
        }
2703
448
    } while ( parentDs.Get<bool>() == true );
2704
2705
31
    if ( operations.empty() == true ) {
2706
1
        return;
2707
1
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
30
#if 1
2711
30
    {
2712
30
        std::set<uint64_t> moduleIDs;
2713
30
        for (const auto& m : modules ) {
2714
28
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
28
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
28
            moduleIDs.insert(moduleID);
2722
28
        }
2723
2724
30
        std::set<uint64_t> operationModuleIDs;
2725
40
        for (const auto& op : operations) {
2726
40
            operationModuleIDs.insert(op.first->ID);
2727
40
        }
2728
2729
30
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
30
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
30
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
30
        for (const auto& id : addModuleIDs) {
2734
12
            operations.push_back({ modules.at(id), operations[0].second});
2735
12
        }
2736
30
    }
2737
30
#endif
2738
2739
30
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
30
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
82
    for (size_t i = 0; i < operations.size(); i++) {
2747
52
        auto& operation = operations[i];
2748
2749
52
        auto& module = operation.first;
2750
52
        auto& op = operation.second;
2751
2752
52
        if ( i > 0 ) {
2753
38
            auto& prevModule = operations[i-1].first;
2754
38
            auto& prevOp = operations[i].second;
2755
2756
38
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
22
                auto& curModifier = op.modifier.GetVectorPtr();
2758
22
                if ( curModifier.size() == 0 ) {
2759
8.72k
                    for (size_t j = 0; j < 512; j++) {
2760
8.70k
                        curModifier.push_back(1);
2761
8.70k
                    }
2762
17
                } else {
2763
9
                    for (auto& c : curModifier) {
2764
9
                        c++;
2765
9
                    }
2766
5
                }
2767
22
            }
2768
38
        }
2769
2770
52
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
52
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
52
        const auto& result = results.back();
2777
2778
52
        if ( result.second != std::nullopt ) {
2779
4
            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
4
        }
2786
2787
52
        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
52
        if ( options.disableTests == false ) {
2796
52
            tests::test(op, result.second);
2797
52
        }
2798
2799
52
        postprocess(module, op, result);
2800
52
    }
2801
2802
30
    if ( options.noCompare == false ) {
2803
14
        compare(operations, results, data, size);
2804
14
    }
2805
30
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
151
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
151
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
151
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
463
    do {
2691
463
        auto op = getOp(&parentDs, data, size);
2692
463
        auto module = getModule(parentDs);
2693
463
        if ( module == nullptr ) {
2694
195
            continue;
2695
195
        }
2696
2697
268
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
268
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
457
    } while ( parentDs.Get<bool>() == true );
2704
2705
151
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
146
#if 1
2711
146
    {
2712
146
        std::set<uint64_t> moduleIDs;
2713
264
        for (const auto& m : modules ) {
2714
264
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
264
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
264
            moduleIDs.insert(moduleID);
2722
264
        }
2723
2724
146
        std::set<uint64_t> operationModuleIDs;
2725
257
        for (const auto& op : operations) {
2726
257
            operationModuleIDs.insert(op.first->ID);
2727
257
        }
2728
2729
146
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
146
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
146
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
146
        for (const auto& id : addModuleIDs) {
2734
130
            operations.push_back({ modules.at(id), operations[0].second});
2735
130
        }
2736
146
    }
2737
146
#endif
2738
2739
146
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
146
    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
387
        auto& operation = operations[i];
2748
2749
387
        auto& module = operation.first;
2750
387
        auto& op = operation.second;
2751
2752
387
        if ( i > 0 ) {
2753
255
            auto& prevModule = operations[i-1].first;
2754
255
            auto& prevOp = operations[i].second;
2755
2756
255
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
123
                auto& curModifier = op.modifier.GetVectorPtr();
2758
123
                if ( curModifier.size() == 0 ) {
2759
61.0k
                    for (size_t j = 0; j < 512; j++) {
2760
60.9k
                        curModifier.push_back(1);
2761
60.9k
                    }
2762
119
                } else {
2763
7
                    for (auto& c : curModifier) {
2764
7
                        c++;
2765
7
                    }
2766
4
                }
2767
123
            }
2768
255
        }
2769
2770
387
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
387
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
387
        const auto& result = results.back();
2777
2778
387
        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
387
        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
387
        if ( options.disableTests == false ) {
2796
387
            tests::test(op, result.second);
2797
387
        }
2798
2799
387
        postprocess(module, op, result);
2800
387
    }
2801
2802
146
    if ( options.noCompare == false ) {
2803
132
        compare(operations, results, data, size);
2804
132
    }
2805
146
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
52
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
52
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
52
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
407
    do {
2691
407
        auto op = getOp(&parentDs, data, size);
2692
407
        auto module = getModule(parentDs);
2693
407
        if ( module == nullptr ) {
2694
335
            continue;
2695
335
        }
2696
2697
72
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
72
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
405
    } while ( parentDs.Get<bool>() == true );
2704
2705
52
    if ( operations.empty() == true ) {
2706
9
        return;
2707
9
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
43
#if 1
2711
43
    {
2712
43
        std::set<uint64_t> moduleIDs;
2713
43
        for (const auto& m : modules ) {
2714
42
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
42
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
42
            moduleIDs.insert(moduleID);
2722
42
        }
2723
2724
43
        std::set<uint64_t> operationModuleIDs;
2725
51
        for (const auto& op : operations) {
2726
51
            operationModuleIDs.insert(op.first->ID);
2727
51
        }
2728
2729
43
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
43
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
43
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
43
        for (const auto& id : addModuleIDs) {
2734
20
            operations.push_back({ modules.at(id), operations[0].second});
2735
20
        }
2736
43
    }
2737
43
#endif
2738
2739
43
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
43
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
114
    for (size_t i = 0; i < operations.size(); i++) {
2747
71
        auto& operation = operations[i];
2748
2749
71
        auto& module = operation.first;
2750
71
        auto& op = operation.second;
2751
2752
71
        if ( i > 0 ) {
2753
50
            auto& prevModule = operations[i-1].first;
2754
50
            auto& prevOp = operations[i].second;
2755
2756
50
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
29
                auto& curModifier = op.modifier.GetVectorPtr();
2758
29
                if ( curModifier.size() == 0 ) {
2759
9.23k
                    for (size_t j = 0; j < 512; j++) {
2760
9.21k
                        curModifier.push_back(1);
2761
9.21k
                    }
2762
18
                } else {
2763
68
                    for (auto& c : curModifier) {
2764
68
                        c++;
2765
68
                    }
2766
11
                }
2767
29
            }
2768
50
        }
2769
2770
71
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
71
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
71
        const auto& result = results.back();
2777
2778
71
        if ( result.second != std::nullopt ) {
2779
22
            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
22
        }
2786
2787
71
        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
71
        if ( options.disableTests == false ) {
2796
71
            tests::test(op, result.second);
2797
71
        }
2798
2799
71
        postprocess(module, op, result);
2800
71
    }
2801
2802
43
    if ( options.noCompare == false ) {
2803
21
        compare(operations, results, data, size);
2804
21
    }
2805
43
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
45
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
45
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
45
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
613
    do {
2691
613
        auto op = getOp(&parentDs, data, size);
2692
613
        auto module = getModule(parentDs);
2693
613
        if ( module == nullptr ) {
2694
563
            continue;
2695
563
        }
2696
2697
50
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
50
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
611
    } while ( parentDs.Get<bool>() == true );
2704
2705
45
    if ( operations.empty() == true ) {
2706
10
        return;
2707
10
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
35
#if 1
2711
35
    {
2712
35
        std::set<uint64_t> moduleIDs;
2713
35
        for (const auto& m : modules ) {
2714
30
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
30
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
30
            moduleIDs.insert(moduleID);
2722
30
        }
2723
2724
35
        std::set<uint64_t> operationModuleIDs;
2725
39
        for (const auto& op : operations) {
2726
39
            operationModuleIDs.insert(op.first->ID);
2727
39
        }
2728
2729
35
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
35
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
35
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
35
        for (const auto& id : addModuleIDs) {
2734
12
            operations.push_back({ modules.at(id), operations[0].second});
2735
12
        }
2736
35
    }
2737
35
#endif
2738
2739
35
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
35
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
86
    for (size_t i = 0; i < operations.size(); i++) {
2747
51
        auto& operation = operations[i];
2748
2749
51
        auto& module = operation.first;
2750
51
        auto& op = operation.second;
2751
2752
51
        if ( i > 0 ) {
2753
36
            auto& prevModule = operations[i-1].first;
2754
36
            auto& prevOp = operations[i].second;
2755
2756
36
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
21
                auto& curModifier = op.modifier.GetVectorPtr();
2758
21
                if ( curModifier.size() == 0 ) {
2759
8.20k
                    for (size_t j = 0; j < 512; j++) {
2760
8.19k
                        curModifier.push_back(1);
2761
8.19k
                    }
2762
16
                } else {
2763
51
                    for (auto& c : curModifier) {
2764
51
                        c++;
2765
51
                    }
2766
5
                }
2767
21
            }
2768
36
        }
2769
2770
51
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
51
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
51
        const auto& result = results.back();
2777
2778
51
        if ( result.second != std::nullopt ) {
2779
3
            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
        }
2786
2787
51
        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
51
        if ( options.disableTests == false ) {
2796
51
            tests::test(op, result.second);
2797
51
        }
2798
2799
51
        postprocess(module, op, result);
2800
51
    }
2801
2802
35
    if ( options.noCompare == false ) {
2803
15
        compare(operations, results, data, size);
2804
15
    }
2805
35
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
40
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
40
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
40
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
335
    do {
2691
335
        auto op = getOp(&parentDs, data, size);
2692
335
        auto module = getModule(parentDs);
2693
335
        if ( module == nullptr ) {
2694
258
            continue;
2695
258
        }
2696
2697
77
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
77
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
3
            break;
2702
3
        }
2703
332
    } while ( parentDs.Get<bool>() == true );
2704
2705
40
    if ( operations.empty() == true ) {
2706
1
        return;
2707
1
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
39
#if 1
2711
39
    {
2712
39
        std::set<uint64_t> moduleIDs;
2713
39
        for (const auto& m : modules ) {
2714
36
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
36
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
36
            moduleIDs.insert(moduleID);
2722
36
        }
2723
2724
39
        std::set<uint64_t> operationModuleIDs;
2725
55
        for (const auto& op : operations) {
2726
55
            operationModuleIDs.insert(op.first->ID);
2727
55
        }
2728
2729
39
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
39
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
39
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
39
        for (const auto& id : addModuleIDs) {
2734
13
            operations.push_back({ modules.at(id), operations[0].second});
2735
13
        }
2736
39
    }
2737
39
#endif
2738
2739
39
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
39
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
107
    for (size_t i = 0; i < operations.size(); i++) {
2747
68
        auto& operation = operations[i];
2748
2749
68
        auto& module = operation.first;
2750
68
        auto& op = operation.second;
2751
2752
68
        if ( i > 0 ) {
2753
50
            auto& prevModule = operations[i-1].first;
2754
50
            auto& prevOp = operations[i].second;
2755
2756
50
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
29
                auto& curModifier = op.modifier.GetVectorPtr();
2758
29
                if ( curModifier.size() == 0 ) {
2759
10.2k
                    for (size_t j = 0; j < 512; j++) {
2760
10.2k
                        curModifier.push_back(1);
2761
10.2k
                    }
2762
20
                } else {
2763
58
                    for (auto& c : curModifier) {
2764
58
                        c++;
2765
58
                    }
2766
9
                }
2767
29
            }
2768
50
        }
2769
2770
68
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
68
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
68
        const auto& result = results.back();
2777
2778
68
        if ( result.second != std::nullopt ) {
2779
6
            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
6
        }
2786
2787
68
        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
68
        if ( options.disableTests == false ) {
2796
68
            tests::test(op, result.second);
2797
68
        }
2798
2799
68
        postprocess(module, op, result);
2800
68
    }
2801
2802
39
    if ( options.noCompare == false ) {
2803
18
        compare(operations, results, data, size);
2804
18
    }
2805
39
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
51
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
51
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
51
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
445
    do {
2691
445
        auto op = getOp(&parentDs, data, size);
2692
445
        auto module = getModule(parentDs);
2693
445
        if ( module == nullptr ) {
2694
386
            continue;
2695
386
        }
2696
2697
59
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
59
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
444
    } while ( parentDs.Get<bool>() == true );
2704
2705
51
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
48
#if 1
2711
48
    {
2712
48
        std::set<uint64_t> moduleIDs;
2713
48
        for (const auto& m : modules ) {
2714
30
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
30
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
30
            moduleIDs.insert(moduleID);
2722
30
        }
2723
2724
48
        std::set<uint64_t> operationModuleIDs;
2725
48
        for (const auto& op : operations) {
2726
34
            operationModuleIDs.insert(op.first->ID);
2727
34
        }
2728
2729
48
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
48
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
48
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
48
        for (const auto& id : addModuleIDs) {
2734
11
            operations.push_back({ modules.at(id), operations[0].second});
2735
11
        }
2736
48
    }
2737
48
#endif
2738
2739
48
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
48
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
93
    for (size_t i = 0; i < operations.size(); i++) {
2747
45
        auto& operation = operations[i];
2748
2749
45
        auto& module = operation.first;
2750
45
        auto& op = operation.second;
2751
2752
45
        if ( i > 0 ) {
2753
30
            auto& prevModule = operations[i-1].first;
2754
30
            auto& prevOp = operations[i].second;
2755
2756
30
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
13
                auto& curModifier = op.modifier.GetVectorPtr();
2758
13
                if ( curModifier.size() == 0 ) {
2759
3.07k
                    for (size_t j = 0; j < 512; j++) {
2760
3.07k
                        curModifier.push_back(1);
2761
3.07k
                    }
2762
7
                } else {
2763
22
                    for (auto& c : curModifier) {
2764
22
                        c++;
2765
22
                    }
2766
7
                }
2767
13
            }
2768
30
        }
2769
2770
45
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
45
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
45
        const auto& result = results.back();
2777
2778
45
        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
45
        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
45
        if ( options.disableTests == false ) {
2796
45
            tests::test(op, result.second);
2797
45
        }
2798
2799
45
        postprocess(module, op, result);
2800
45
    }
2801
2802
48
    if ( options.noCompare == false ) {
2803
15
        compare(operations, results, data, size);
2804
15
    }
2805
48
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
99
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
99
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
99
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
661
    do {
2691
661
        auto op = getOp(&parentDs, data, size);
2692
661
        auto module = getModule(parentDs);
2693
661
        if ( module == nullptr ) {
2694
539
            continue;
2695
539
        }
2696
2697
122
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
122
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
659
    } while ( parentDs.Get<bool>() == true );
2704
2705
99
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
97
#if 1
2711
97
    {
2712
97
        std::set<uint64_t> moduleIDs;
2713
116
        for (const auto& m : modules ) {
2714
116
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
116
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
116
            moduleIDs.insert(moduleID);
2722
116
        }
2723
2724
97
        std::set<uint64_t> operationModuleIDs;
2725
101
        for (const auto& op : operations) {
2726
101
            operationModuleIDs.insert(op.first->ID);
2727
101
        }
2728
2729
97
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
97
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
97
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
97
        for (const auto& id : addModuleIDs) {
2734
55
            operations.push_back({ modules.at(id), operations[0].second});
2735
55
        }
2736
97
    }
2737
97
#endif
2738
2739
97
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
97
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
253
    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
98
            auto& prevModule = operations[i-1].first;
2754
98
            auto& prevOp = operations[i].second;
2755
2756
98
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
37
                auto& curModifier = op.modifier.GetVectorPtr();
2758
37
                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
26
                } else {
2763
222
                    for (auto& c : curModifier) {
2764
222
                        c++;
2765
222
                    }
2766
11
                }
2767
37
            }
2768
98
        }
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
3
            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
        }
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
97
    if ( options.noCompare == false ) {
2803
58
        compare(operations, results, data, size);
2804
58
    }
2805
97
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
1.86k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
1.86k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
1.86k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
4.93k
    do {
2691
4.93k
        auto op = getOp(&parentDs, data, size);
2692
4.93k
        auto module = getModule(parentDs);
2693
4.93k
        if ( module == nullptr ) {
2694
2.34k
            continue;
2695
2.34k
        }
2696
2697
2.59k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
2.59k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
30
            break;
2702
30
        }
2703
4.90k
    } while ( parentDs.Get<bool>() == true );
2704
2705
1.86k
    if ( operations.empty() == true ) {
2706
16
        return;
2707
16
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
1.85k
#if 1
2711
1.85k
    {
2712
1.85k
        std::set<uint64_t> moduleIDs;
2713
3.57k
        for (const auto& m : modules ) {
2714
3.57k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
3.57k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
3.57k
            moduleIDs.insert(moduleID);
2722
3.57k
        }
2723
2724
1.85k
        std::set<uint64_t> operationModuleIDs;
2725
2.51k
        for (const auto& op : operations) {
2726
2.51k
            operationModuleIDs.insert(op.first->ID);
2727
2.51k
        }
2728
2729
1.85k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
1.85k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
1.85k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
1.85k
        for (const auto& id : addModuleIDs) {
2734
1.78k
            operations.push_back({ modules.at(id), operations[0].second});
2735
1.78k
        }
2736
1.85k
    }
2737
1.85k
#endif
2738
2739
1.85k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
1.85k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
6.14k
    for (size_t i = 0; i < operations.size(); i++) {
2747
4.29k
        auto& operation = operations[i];
2748
2749
4.29k
        auto& module = operation.first;
2750
4.29k
        auto& op = operation.second;
2751
2752
4.29k
        if ( i > 0 ) {
2753
2.50k
            auto& prevModule = operations[i-1].first;
2754
2.50k
            auto& prevOp = operations[i].second;
2755
2756
2.50k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
724
                auto& curModifier = op.modifier.GetVectorPtr();
2758
724
                if ( curModifier.size() == 0 ) {
2759
243k
                    for (size_t j = 0; j < 512; j++) {
2760
242k
                        curModifier.push_back(1);
2761
242k
                    }
2762
474
                } else {
2763
12.0k
                    for (auto& c : curModifier) {
2764
12.0k
                        c++;
2765
12.0k
                    }
2766
250
                }
2767
724
            }
2768
2.50k
        }
2769
2770
4.29k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
4.29k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
4.29k
        const auto& result = results.back();
2777
2778
4.29k
        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
4.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
4.29k
        if ( options.disableTests == false ) {
2796
4.29k
            tests::test(op, result.second);
2797
4.29k
        }
2798
2799
4.29k
        postprocess(module, op, result);
2800
4.29k
    }
2801
2802
1.85k
    if ( options.noCompare == false ) {
2803
1.78k
        compare(operations, results, data, size);
2804
1.78k
    }
2805
1.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
37
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
37
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
37
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
195
    do {
2691
195
        auto op = getOp(&parentDs, data, size);
2692
195
        auto module = getModule(parentDs);
2693
195
        if ( module == nullptr ) {
2694
106
            continue;
2695
106
        }
2696
2697
89
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
89
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
188
    } while ( parentDs.Get<bool>() == true );
2704
2705
37
    if ( operations.empty() == true ) {
2706
1
        return;
2707
1
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
36
#if 1
2711
36
    {
2712
36
        std::set<uint64_t> moduleIDs;
2713
46
        for (const auto& m : modules ) {
2714
46
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
46
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
46
            moduleIDs.insert(moduleID);
2722
46
        }
2723
2724
36
        std::set<uint64_t> operationModuleIDs;
2725
70
        for (const auto& op : operations) {
2726
70
            operationModuleIDs.insert(op.first->ID);
2727
70
        }
2728
2729
36
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
36
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
36
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
36
        for (const auto& id : addModuleIDs) {
2734
19
            operations.push_back({ modules.at(id), operations[0].second});
2735
19
        }
2736
36
    }
2737
36
#endif
2738
2739
36
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
36
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
125
    for (size_t i = 0; i < operations.size(); i++) {
2747
89
        auto& operation = operations[i];
2748
2749
89
        auto& module = operation.first;
2750
89
        auto& op = operation.second;
2751
2752
89
        if ( i > 0 ) {
2753
66
            auto& prevModule = operations[i-1].first;
2754
66
            auto& prevOp = operations[i].second;
2755
2756
66
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
39
                auto& curModifier = op.modifier.GetVectorPtr();
2758
39
                if ( curModifier.size() == 0 ) {
2759
5.13k
                    for (size_t j = 0; j < 512; j++) {
2760
5.12k
                        curModifier.push_back(1);
2761
5.12k
                    }
2762
29
                } else {
2763
577
                    for (auto& c : curModifier) {
2764
577
                        c++;
2765
577
                    }
2766
29
                }
2767
39
            }
2768
66
        }
2769
2770
89
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
89
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
89
        const auto& result = results.back();
2777
2778
89
        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
89
        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
89
        if ( options.disableTests == false ) {
2796
89
            tests::test(op, result.second);
2797
89
        }
2798
2799
89
        postprocess(module, op, result);
2800
89
    }
2801
2802
36
    if ( options.noCompare == false ) {
2803
23
        compare(operations, results, data, size);
2804
23
    }
2805
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
77
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
77
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
77
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
452
    do {
2691
452
        auto op = getOp(&parentDs, data, size);
2692
452
        auto module = getModule(parentDs);
2693
452
        if ( module == nullptr ) {
2694
320
            continue;
2695
320
        }
2696
2697
132
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
132
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
450
    } while ( parentDs.Get<bool>() == true );
2704
2705
77
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
74
#if 1
2711
74
    {
2712
74
        std::set<uint64_t> moduleIDs;
2713
114
        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
74
        std::set<uint64_t> operationModuleIDs;
2725
113
        for (const auto& op : operations) {
2726
113
            operationModuleIDs.insert(op.first->ID);
2727
113
        }
2728
2729
74
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
74
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
74
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
74
        for (const auto& id : addModuleIDs) {
2734
56
            operations.push_back({ modules.at(id), operations[0].second});
2735
56
        }
2736
74
    }
2737
74
#endif
2738
2739
74
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
74
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
243
    for (size_t i = 0; i < operations.size(); i++) {
2747
169
        auto& operation = operations[i];
2748
2749
169
        auto& module = operation.first;
2750
169
        auto& op = operation.second;
2751
2752
169
        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
55
                auto& curModifier = op.modifier.GetVectorPtr();
2758
55
                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
156
                    for (auto& c : curModifier) {
2764
156
                        c++;
2765
156
                    }
2766
12
                }
2767
55
            }
2768
112
        }
2769
2770
169
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
169
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
169
        const auto& result = results.back();
2777
2778
169
        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
169
        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
169
        if ( options.disableTests == false ) {
2796
169
            tests::test(op, result.second);
2797
169
        }
2798
2799
169
        postprocess(module, op, result);
2800
169
    }
2801
2802
74
    if ( options.noCompare == false ) {
2803
57
        compare(operations, results, data, size);
2804
57
    }
2805
74
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
20
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
20
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
20
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
48
    do {
2691
48
        auto op = getOp(&parentDs, data, size);
2692
48
        auto module = getModule(parentDs);
2693
48
        if ( module == nullptr ) {
2694
22
            continue;
2695
22
        }
2696
2697
26
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
26
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
48
    } while ( parentDs.Get<bool>() == true );
2704
2705
20
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
18
#if 1
2711
18
    {
2712
18
        std::set<uint64_t> moduleIDs;
2713
18
        for (const auto& m : modules ) {
2714
18
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
18
            moduleIDs.insert(moduleID);
2722
18
        }
2723
2724
18
        std::set<uint64_t> operationModuleIDs;
2725
18
        for (const auto& op : operations) {
2726
17
            operationModuleIDs.insert(op.first->ID);
2727
17
        }
2728
2729
18
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
18
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
18
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
18
        for (const auto& id : addModuleIDs) {
2734
8
            operations.push_back({ modules.at(id), operations[0].second});
2735
8
        }
2736
18
    }
2737
18
#endif
2738
2739
18
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
18
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
43
    for (size_t i = 0; i < operations.size(); i++) {
2747
25
        auto& operation = operations[i];
2748
2749
25
        auto& module = operation.first;
2750
25
        auto& op = operation.second;
2751
2752
25
        if ( i > 0 ) {
2753
16
            auto& prevModule = operations[i-1].first;
2754
16
            auto& prevOp = operations[i].second;
2755
2756
16
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
7
                auto& curModifier = op.modifier.GetVectorPtr();
2758
7
                if ( curModifier.size() == 0 ) {
2759
1.53k
                    for (size_t j = 0; j < 512; j++) {
2760
1.53k
                        curModifier.push_back(1);
2761
1.53k
                    }
2762
4
                } else {
2763
7
                    for (auto& c : curModifier) {
2764
7
                        c++;
2765
7
                    }
2766
4
                }
2767
7
            }
2768
16
        }
2769
2770
25
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
25
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
25
        const auto& result = results.back();
2777
2778
25
        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
25
        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
25
        if ( options.disableTests == false ) {
2796
25
            tests::test(op, result.second);
2797
25
        }
2798
2799
25
        postprocess(module, op, result);
2800
25
    }
2801
2802
18
    if ( options.noCompare == false ) {
2803
9
        compare(operations, results, data, size);
2804
9
    }
2805
18
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
51
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
51
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
51
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
560
    do {
2691
560
        auto op = getOp(&parentDs, data, size);
2692
560
        auto module = getModule(parentDs);
2693
560
        if ( module == nullptr ) {
2694
502
            continue;
2695
502
        }
2696
2697
58
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
58
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
558
    } while ( parentDs.Get<bool>() == true );
2704
2705
51
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
44
#if 1
2711
44
    {
2712
44
        std::set<uint64_t> moduleIDs;
2713
44
        for (const auto& m : modules ) {
2714
32
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
32
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
32
            moduleIDs.insert(moduleID);
2722
32
        }
2723
2724
44
        std::set<uint64_t> operationModuleIDs;
2725
44
        for (const auto& op : operations) {
2726
41
            operationModuleIDs.insert(op.first->ID);
2727
41
        }
2728
2729
44
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
44
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
44
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
44
        for (const auto& id : addModuleIDs) {
2734
14
            operations.push_back({ modules.at(id), operations[0].second});
2735
14
        }
2736
44
    }
2737
44
#endif
2738
2739
44
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
44
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
99
    for (size_t i = 0; i < operations.size(); i++) {
2747
55
        auto& operation = operations[i];
2748
2749
55
        auto& module = operation.first;
2750
55
        auto& op = operation.second;
2751
2752
55
        if ( i > 0 ) {
2753
39
            auto& prevModule = operations[i-1].first;
2754
39
            auto& prevOp = operations[i].second;
2755
2756
39
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
20
                auto& curModifier = op.modifier.GetVectorPtr();
2758
20
                if ( curModifier.size() == 0 ) {
2759
3.07k
                    for (size_t j = 0; j < 512; j++) {
2760
3.07k
                        curModifier.push_back(1);
2761
3.07k
                    }
2762
14
                } else {
2763
97
                    for (auto& c : curModifier) {
2764
97
                        c++;
2765
97
                    }
2766
14
                }
2767
20
            }
2768
39
        }
2769
2770
55
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
55
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
55
        const auto& result = results.back();
2777
2778
55
        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
55
        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
55
        if ( options.disableTests == false ) {
2796
55
            tests::test(op, result.second);
2797
55
        }
2798
2799
55
        postprocess(module, op, result);
2800
55
    }
2801
2802
44
    if ( options.noCompare == false ) {
2803
16
        compare(operations, results, data, size);
2804
16
    }
2805
44
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
27
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
27
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
27
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
250
    do {
2691
250
        auto op = getOp(&parentDs, data, size);
2692
250
        auto module = getModule(parentDs);
2693
250
        if ( module == nullptr ) {
2694
199
            continue;
2695
199
        }
2696
2697
51
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
51
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
248
    } while ( parentDs.Get<bool>() == true );
2704
2705
27
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
25
#if 1
2711
25
    {
2712
25
        std::set<uint64_t> moduleIDs;
2713
25
        for (const auto& m : modules ) {
2714
20
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
20
            moduleIDs.insert(moduleID);
2722
20
        }
2723
2724
25
        std::set<uint64_t> operationModuleIDs;
2725
29
        for (const auto& op : operations) {
2726
29
            operationModuleIDs.insert(op.first->ID);
2727
29
        }
2728
2729
25
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
25
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
25
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
25
        for (const auto& id : addModuleIDs) {
2734
9
            operations.push_back({ modules.at(id), operations[0].second});
2735
9
        }
2736
25
    }
2737
25
#endif
2738
2739
25
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
25
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
63
    for (size_t i = 0; i < operations.size(); i++) {
2747
38
        auto& operation = operations[i];
2748
2749
38
        auto& module = operation.first;
2750
38
        auto& op = operation.second;
2751
2752
38
        if ( i > 0 ) {
2753
28
            auto& prevModule = operations[i-1].first;
2754
28
            auto& prevOp = operations[i].second;
2755
2756
28
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
18
                auto& curModifier = op.modifier.GetVectorPtr();
2758
18
                if ( curModifier.size() == 0 ) {
2759
5.13k
                    for (size_t j = 0; j < 512; j++) {
2760
5.12k
                        curModifier.push_back(1);
2761
5.12k
                    }
2762
10
                } else {
2763
529
                    for (auto& c : curModifier) {
2764
529
                        c++;
2765
529
                    }
2766
8
                }
2767
18
            }
2768
28
        }
2769
2770
38
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
38
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
38
        const auto& result = results.back();
2777
2778
38
        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
38
        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
38
        if ( options.disableTests == false ) {
2796
38
            tests::test(op, result.second);
2797
38
        }
2798
2799
38
        postprocess(module, op, result);
2800
38
    }
2801
2802
25
    if ( options.noCompare == false ) {
2803
10
        compare(operations, results, data, size);
2804
10
    }
2805
25
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
44
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
44
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
44
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
526
    do {
2691
526
        auto op = getOp(&parentDs, data, size);
2692
526
        auto module = getModule(parentDs);
2693
526
        if ( module == nullptr ) {
2694
471
            continue;
2695
471
        }
2696
2697
55
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
55
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
3
            break;
2702
3
        }
2703
523
    } while ( parentDs.Get<bool>() == true );
2704
2705
44
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
37
#if 1
2711
37
    {
2712
37
        std::set<uint64_t> moduleIDs;
2713
37
        for (const auto& m : modules ) {
2714
22
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
22
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
22
            moduleIDs.insert(moduleID);
2722
22
        }
2723
2724
37
        std::set<uint64_t> operationModuleIDs;
2725
37
        for (const auto& op : operations) {
2726
31
            operationModuleIDs.insert(op.first->ID);
2727
31
        }
2728
2729
37
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
37
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
37
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
37
        for (const auto& id : addModuleIDs) {
2734
9
            operations.push_back({ modules.at(id), operations[0].second});
2735
9
        }
2736
37
    }
2737
37
#endif
2738
2739
37
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
37
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
77
    for (size_t i = 0; i < operations.size(); i++) {
2747
40
        auto& operation = operations[i];
2748
2749
40
        auto& module = operation.first;
2750
40
        auto& op = operation.second;
2751
2752
40
        if ( i > 0 ) {
2753
29
            auto& prevModule = operations[i-1].first;
2754
29
            auto& prevOp = operations[i].second;
2755
2756
29
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
18
                auto& curModifier = op.modifier.GetVectorPtr();
2758
18
                if ( curModifier.size() == 0 ) {
2759
5.13k
                    for (size_t j = 0; j < 512; j++) {
2760
5.12k
                        curModifier.push_back(1);
2761
5.12k
                    }
2762
10
                } else {
2763
20
                    for (auto& c : curModifier) {
2764
20
                        c++;
2765
20
                    }
2766
8
                }
2767
18
            }
2768
29
        }
2769
2770
40
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
40
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
40
        const auto& result = results.back();
2777
2778
40
        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
40
        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
40
        if ( options.disableTests == false ) {
2796
40
            tests::test(op, result.second);
2797
40
        }
2798
2799
40
        postprocess(module, op, result);
2800
40
    }
2801
2802
37
    if ( options.noCompare == false ) {
2803
11
        compare(operations, results, data, size);
2804
11
    }
2805
37
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
58
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
58
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
58
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
407
    do {
2691
407
        auto op = getOp(&parentDs, data, size);
2692
407
        auto module = getModule(parentDs);
2693
407
        if ( module == nullptr ) {
2694
328
            continue;
2695
328
        }
2696
2697
79
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
79
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
406
    } while ( parentDs.Get<bool>() == true );
2704
2705
58
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
55
#if 1
2711
55
    {
2712
55
        std::set<uint64_t> moduleIDs;
2713
55
        for (const auto& m : modules ) {
2714
32
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
32
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
32
            moduleIDs.insert(moduleID);
2722
32
        }
2723
2724
55
        std::set<uint64_t> operationModuleIDs;
2725
55
        for (const auto& op : operations) {
2726
41
            operationModuleIDs.insert(op.first->ID);
2727
41
        }
2728
2729
55
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
55
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
55
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
55
        for (const auto& id : addModuleIDs) {
2734
11
            operations.push_back({ modules.at(id), operations[0].second});
2735
11
        }
2736
55
    }
2737
55
#endif
2738
2739
55
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
55
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
107
    for (size_t i = 0; i < operations.size(); i++) {
2747
52
        auto& operation = operations[i];
2748
2749
52
        auto& module = operation.first;
2750
52
        auto& op = operation.second;
2751
2752
52
        if ( i > 0 ) {
2753
36
            auto& prevModule = operations[i-1].first;
2754
36
            auto& prevOp = operations[i].second;
2755
2756
36
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
18
                auto& curModifier = op.modifier.GetVectorPtr();
2758
18
                if ( curModifier.size() == 0 ) {
2759
4.61k
                    for (size_t j = 0; j < 512; j++) {
2760
4.60k
                        curModifier.push_back(1);
2761
4.60k
                    }
2762
9
                } else {
2763
85
                    for (auto& c : curModifier) {
2764
85
                        c++;
2765
85
                    }
2766
9
                }
2767
18
            }
2768
36
        }
2769
2770
52
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
52
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
52
        const auto& result = results.back();
2777
2778
52
        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
52
        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
52
        if ( options.disableTests == false ) {
2796
52
            tests::test(op, result.second);
2797
52
        }
2798
2799
52
        postprocess(module, op, result);
2800
52
    }
2801
2802
55
    if ( options.noCompare == false ) {
2803
16
        compare(operations, results, data, size);
2804
16
    }
2805
55
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
76
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
76
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
76
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
387
    do {
2691
387
        auto op = getOp(&parentDs, data, size);
2692
387
        auto module = getModule(parentDs);
2693
387
        if ( module == nullptr ) {
2694
312
            continue;
2695
312
        }
2696
2697
75
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
75
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
4
            break;
2702
4
        }
2703
383
    } while ( parentDs.Get<bool>() == true );
2704
2705
76
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
74
#if 1
2711
74
    {
2712
74
        std::set<uint64_t> moduleIDs;
2713
74
        for (const auto& m : modules ) {
2714
22
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
22
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
22
            moduleIDs.insert(moduleID);
2722
22
        }
2723
2724
74
        std::set<uint64_t> operationModuleIDs;
2725
74
        for (const auto& op : operations) {
2726
41
            operationModuleIDs.insert(op.first->ID);
2727
41
        }
2728
2729
74
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
74
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
74
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
74
        for (const auto& id : addModuleIDs) {
2734
6
            operations.push_back({ modules.at(id), operations[0].second});
2735
6
        }
2736
74
    }
2737
74
#endif
2738
2739
74
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
74
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
121
    for (size_t i = 0; i < operations.size(); i++) {
2747
47
        auto& operation = operations[i];
2748
2749
47
        auto& module = operation.first;
2750
47
        auto& op = operation.second;
2751
2752
47
        if ( i > 0 ) {
2753
36
            auto& prevModule = operations[i-1].first;
2754
36
            auto& prevOp = operations[i].second;
2755
2756
36
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
22
                auto& curModifier = op.modifier.GetVectorPtr();
2758
22
                if ( curModifier.size() == 0 ) {
2759
6.66k
                    for (size_t j = 0; j < 512; j++) {
2760
6.65k
                        curModifier.push_back(1);
2761
6.65k
                    }
2762
13
                } else {
2763
13
                    for (auto& c : curModifier) {
2764
13
                        c++;
2765
13
                    }
2766
9
                }
2767
22
            }
2768
36
        }
2769
2770
47
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
47
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
47
        const auto& result = results.back();
2777
2778
47
        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
47
        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
47
        if ( options.disableTests == false ) {
2796
47
            tests::test(op, result.second);
2797
47
        }
2798
2799
47
        postprocess(module, op, result);
2800
47
    }
2801
2802
74
    if ( options.noCompare == false ) {
2803
11
        compare(operations, results, data, size);
2804
11
    }
2805
74
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
39
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
39
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
39
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
286
    do {
2691
286
        auto op = getOp(&parentDs, data, size);
2692
286
        auto module = getModule(parentDs);
2693
286
        if ( module == nullptr ) {
2694
224
            continue;
2695
224
        }
2696
2697
62
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
62
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
4
            break;
2702
4
        }
2703
282
    } while ( parentDs.Get<bool>() == true );
2704
2705
39
    if ( operations.empty() == true ) {
2706
0
        return;
2707
0
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
39
#if 1
2711
39
    {
2712
39
        std::set<uint64_t> moduleIDs;
2713
39
        for (const auto& m : modules ) {
2714
16
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
16
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
16
            moduleIDs.insert(moduleID);
2722
16
        }
2723
2724
39
        std::set<uint64_t> operationModuleIDs;
2725
39
        for (const auto& op : operations) {
2726
28
            operationModuleIDs.insert(op.first->ID);
2727
28
        }
2728
2729
39
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
39
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
39
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
39
        for (const auto& id : addModuleIDs) {
2734
4
            operations.push_back({ modules.at(id), operations[0].second});
2735
4
        }
2736
39
    }
2737
39
#endif
2738
2739
39
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
39
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
71
    for (size_t i = 0; i < operations.size(); i++) {
2747
32
        auto& operation = operations[i];
2748
2749
32
        auto& module = operation.first;
2750
32
        auto& op = operation.second;
2751
2752
32
        if ( i > 0 ) {
2753
24
            auto& prevModule = operations[i-1].first;
2754
24
            auto& prevOp = operations[i].second;
2755
2756
24
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
10
                auto& curModifier = op.modifier.GetVectorPtr();
2758
10
                if ( curModifier.size() == 0 ) {
2759
4.10k
                    for (size_t j = 0; j < 512; j++) {
2760
4.09k
                        curModifier.push_back(1);
2761
4.09k
                    }
2762
8
                } else {
2763
5
                    for (auto& c : curModifier) {
2764
5
                        c++;
2765
5
                    }
2766
2
                }
2767
10
            }
2768
24
        }
2769
2770
32
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
32
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
32
        const auto& result = results.back();
2777
2778
32
        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
32
        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
32
        if ( options.disableTests == false ) {
2796
32
            tests::test(op, result.second);
2797
32
        }
2798
2799
32
        postprocess(module, op, result);
2800
32
    }
2801
2802
39
    if ( options.noCompare == false ) {
2803
8
        compare(operations, results, data, size);
2804
8
    }
2805
39
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
24
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
24
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
24
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
176
    do {
2691
176
        auto op = getOp(&parentDs, data, size);
2692
176
        auto module = getModule(parentDs);
2693
176
        if ( module == nullptr ) {
2694
127
            continue;
2695
127
        }
2696
2697
49
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
49
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
175
    } while ( parentDs.Get<bool>() == true );
2704
2705
24
    if ( operations.empty() == true ) {
2706
0
        return;
2707
0
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
24
#if 1
2711
24
    {
2712
24
        std::set<uint64_t> moduleIDs;
2713
24
        for (const auto& m : modules ) {
2714
16
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
16
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
16
            moduleIDs.insert(moduleID);
2722
16
        }
2723
2724
24
        std::set<uint64_t> operationModuleIDs;
2725
24
        for (const auto& op : operations) {
2726
23
            operationModuleIDs.insert(op.first->ID);
2727
23
        }
2728
2729
24
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
24
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
24
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
24
        for (const auto& id : addModuleIDs) {
2734
6
            operations.push_back({ modules.at(id), operations[0].second});
2735
6
        }
2736
24
    }
2737
24
#endif
2738
2739
24
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
24
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
53
    for (size_t i = 0; i < operations.size(); i++) {
2747
29
        auto& operation = operations[i];
2748
2749
29
        auto& module = operation.first;
2750
29
        auto& op = operation.second;
2751
2752
29
        if ( i > 0 ) {
2753
21
            auto& prevModule = operations[i-1].first;
2754
21
            auto& prevOp = operations[i].second;
2755
2756
21
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
11
                auto& curModifier = op.modifier.GetVectorPtr();
2758
11
                if ( curModifier.size() == 0 ) {
2759
1.53k
                    for (size_t j = 0; j < 512; j++) {
2760
1.53k
                        curModifier.push_back(1);
2761
1.53k
                    }
2762
8
                } else {
2763
137
                    for (auto& c : curModifier) {
2764
137
                        c++;
2765
137
                    }
2766
8
                }
2767
11
            }
2768
21
        }
2769
2770
29
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
29
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
29
        const auto& result = results.back();
2777
2778
29
        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
29
        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
29
        if ( options.disableTests == false ) {
2796
29
            tests::test(op, result.second);
2797
29
        }
2798
2799
29
        postprocess(module, op, result);
2800
29
    }
2801
2802
24
    if ( options.noCompare == false ) {
2803
8
        compare(operations, results, data, size);
2804
8
    }
2805
24
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
34
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
34
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
34
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
718
    do {
2691
718
        auto op = getOp(&parentDs, data, size);
2692
718
        auto module = getModule(parentDs);
2693
718
        if ( module == nullptr ) {
2694
658
            continue;
2695
658
        }
2696
2697
60
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
60
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
3
            break;
2702
3
        }
2703
715
    } while ( parentDs.Get<bool>() == true );
2704
2705
34
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
30
#if 1
2711
30
    {
2712
30
        std::set<uint64_t> moduleIDs;
2713
30
        for (const auto& m : modules ) {
2714
18
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
18
            moduleIDs.insert(moduleID);
2722
18
        }
2723
2724
30
        std::set<uint64_t> operationModuleIDs;
2725
33
        for (const auto& op : operations) {
2726
33
            operationModuleIDs.insert(op.first->ID);
2727
33
        }
2728
2729
30
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
30
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
30
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
30
        for (const auto& id : addModuleIDs) {
2734
5
            operations.push_back({ modules.at(id), operations[0].second});
2735
5
        }
2736
30
    }
2737
30
#endif
2738
2739
30
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
30
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
68
    for (size_t i = 0; i < operations.size(); i++) {
2747
38
        auto& operation = operations[i];
2748
2749
38
        auto& module = operation.first;
2750
38
        auto& op = operation.second;
2751
2752
38
        if ( i > 0 ) {
2753
29
            auto& prevModule = operations[i-1].first;
2754
29
            auto& prevOp = operations[i].second;
2755
2756
29
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
14
                auto& curModifier = op.modifier.GetVectorPtr();
2758
14
                if ( curModifier.size() == 0 ) {
2759
2.56k
                    for (size_t j = 0; j < 512; j++) {
2760
2.56k
                        curModifier.push_back(1);
2761
2.56k
                    }
2762
9
                } else {
2763
23
                    for (auto& c : curModifier) {
2764
23
                        c++;
2765
23
                    }
2766
9
                }
2767
14
            }
2768
29
        }
2769
2770
38
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
38
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
38
        const auto& result = results.back();
2777
2778
38
        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
38
        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
38
        if ( options.disableTests == false ) {
2796
38
            tests::test(op, result.second);
2797
38
        }
2798
2799
38
        postprocess(module, op, result);
2800
38
    }
2801
2802
30
    if ( options.noCompare == false ) {
2803
9
        compare(operations, results, data, size);
2804
9
    }
2805
30
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
37
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
37
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
37
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
471
    do {
2691
471
        auto op = getOp(&parentDs, data, size);
2692
471
        auto module = getModule(parentDs);
2693
471
        if ( module == nullptr ) {
2694
411
            continue;
2695
411
        }
2696
2697
60
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
60
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
469
    } while ( parentDs.Get<bool>() == true );
2704
2705
37
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
35
#if 1
2711
35
    {
2712
35
        std::set<uint64_t> moduleIDs;
2713
35
        for (const auto& m : modules ) {
2714
14
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
14
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
14
            moduleIDs.insert(moduleID);
2722
14
        }
2723
2724
35
        std::set<uint64_t> operationModuleIDs;
2725
35
        for (const auto& op : operations) {
2726
21
            operationModuleIDs.insert(op.first->ID);
2727
21
        }
2728
2729
35
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
35
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
35
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
35
        for (const auto& id : addModuleIDs) {
2734
5
            operations.push_back({ modules.at(id), operations[0].second});
2735
5
        }
2736
35
    }
2737
35
#endif
2738
2739
35
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
35
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
61
    for (size_t i = 0; i < operations.size(); i++) {
2747
26
        auto& operation = operations[i];
2748
2749
26
        auto& module = operation.first;
2750
26
        auto& op = operation.second;
2751
2752
26
        if ( i > 0 ) {
2753
19
            auto& prevModule = operations[i-1].first;
2754
19
            auto& prevOp = operations[i].second;
2755
2756
19
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
12
                auto& curModifier = op.modifier.GetVectorPtr();
2758
12
                if ( curModifier.size() == 0 ) {
2759
4.10k
                    for (size_t j = 0; j < 512; j++) {
2760
4.09k
                        curModifier.push_back(1);
2761
4.09k
                    }
2762
8
                } else {
2763
375
                    for (auto& c : curModifier) {
2764
375
                        c++;
2765
375
                    }
2766
4
                }
2767
12
            }
2768
19
        }
2769
2770
26
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
26
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
26
        const auto& result = results.back();
2777
2778
26
        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
26
        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
26
        if ( options.disableTests == false ) {
2796
26
            tests::test(op, result.second);
2797
26
        }
2798
2799
26
        postprocess(module, op, result);
2800
26
    }
2801
2802
35
    if ( options.noCompare == false ) {
2803
7
        compare(operations, results, data, size);
2804
7
    }
2805
35
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
35
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
35
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
35
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
411
    do {
2691
411
        auto op = getOp(&parentDs, data, size);
2692
411
        auto module = getModule(parentDs);
2693
411
        if ( module == nullptr ) {
2694
357
            continue;
2695
357
        }
2696
2697
54
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
54
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
410
    } while ( parentDs.Get<bool>() == true );
2704
2705
35
    if ( operations.empty() == true ) {
2706
0
        return;
2707
0
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
35
#if 1
2711
35
    {
2712
35
        std::set<uint64_t> moduleIDs;
2713
35
        for (const auto& m : modules ) {
2714
24
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
24
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
24
            moduleIDs.insert(moduleID);
2722
24
        }
2723
2724
35
        std::set<uint64_t> operationModuleIDs;
2725
35
        for (const auto& op : operations) {
2726
28
            operationModuleIDs.insert(op.first->ID);
2727
28
        }
2728
2729
35
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
35
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
35
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
35
        for (const auto& id : addModuleIDs) {
2734
11
            operations.push_back({ modules.at(id), operations[0].second});
2735
11
        }
2736
35
    }
2737
35
#endif
2738
2739
35
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
35
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
74
    for (size_t i = 0; i < operations.size(); i++) {
2747
39
        auto& operation = operations[i];
2748
2749
39
        auto& module = operation.first;
2750
39
        auto& op = operation.second;
2751
2752
39
        if ( i > 0 ) {
2753
27
            auto& prevModule = operations[i-1].first;
2754
27
            auto& prevOp = operations[i].second;
2755
2756
27
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
15
                auto& curModifier = op.modifier.GetVectorPtr();
2758
15
                if ( curModifier.size() == 0 ) {
2759
3.59k
                    for (size_t j = 0; j < 512; j++) {
2760
3.58k
                        curModifier.push_back(1);
2761
3.58k
                    }
2762
8
                } else {
2763
73
                    for (auto& c : curModifier) {
2764
73
                        c++;
2765
73
                    }
2766
8
                }
2767
15
            }
2768
27
        }
2769
2770
39
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
39
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
39
        const auto& result = results.back();
2777
2778
39
        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
39
        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
39
        if ( options.disableTests == false ) {
2796
39
            tests::test(op, result.second);
2797
39
        }
2798
2799
39
        postprocess(module, op, result);
2800
39
    }
2801
2802
35
    if ( options.noCompare == false ) {
2803
12
        compare(operations, results, data, size);
2804
12
    }
2805
35
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
28
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
28
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
28
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
643
    do {
2691
643
        auto op = getOp(&parentDs, data, size);
2692
643
        auto module = getModule(parentDs);
2693
643
        if ( module == nullptr ) {
2694
598
            continue;
2695
598
        }
2696
2697
45
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
45
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
641
    } while ( parentDs.Get<bool>() == true );
2704
2705
28
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
23
#if 1
2711
23
    {
2712
23
        std::set<uint64_t> moduleIDs;
2713
23
        for (const auto& m : modules ) {
2714
10
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
10
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
10
            moduleIDs.insert(moduleID);
2722
10
        }
2723
2724
23
        std::set<uint64_t> operationModuleIDs;
2725
23
        for (const auto& op : operations) {
2726
18
            operationModuleIDs.insert(op.first->ID);
2727
18
        }
2728
2729
23
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
23
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
23
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
23
        for (const auto& id : addModuleIDs) {
2734
4
            operations.push_back({ modules.at(id), operations[0].second});
2735
4
        }
2736
23
    }
2737
23
#endif
2738
2739
23
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
23
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
45
    for (size_t i = 0; i < operations.size(); i++) {
2747
22
        auto& operation = operations[i];
2748
2749
22
        auto& module = operation.first;
2750
22
        auto& op = operation.second;
2751
2752
22
        if ( i > 0 ) {
2753
17
            auto& prevModule = operations[i-1].first;
2754
17
            auto& prevOp = operations[i].second;
2755
2756
17
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
9
                auto& curModifier = op.modifier.GetVectorPtr();
2758
9
                if ( curModifier.size() == 0 ) {
2759
2.56k
                    for (size_t j = 0; j < 512; j++) {
2760
2.56k
                        curModifier.push_back(1);
2761
2.56k
                    }
2762
5
                } else {
2763
11
                    for (auto& c : curModifier) {
2764
11
                        c++;
2765
11
                    }
2766
4
                }
2767
9
            }
2768
17
        }
2769
2770
22
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
22
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
22
        const auto& result = results.back();
2777
2778
22
        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
22
        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
        if ( options.disableTests == false ) {
2796
22
            tests::test(op, result.second);
2797
22
        }
2798
2799
22
        postprocess(module, op, result);
2800
22
    }
2801
2802
23
    if ( options.noCompare == false ) {
2803
5
        compare(operations, results, data, size);
2804
5
    }
2805
23
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
33
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
33
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
33
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
816
    do {
2691
816
        auto op = getOp(&parentDs, data, size);
2692
816
        auto module = getModule(parentDs);
2693
816
        if ( module == nullptr ) {
2694
780
            continue;
2695
780
        }
2696
2697
36
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
36
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
816
    } while ( parentDs.Get<bool>() == true );
2704
2705
33
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
29
#if 1
2711
29
    {
2712
29
        std::set<uint64_t> moduleIDs;
2713
29
        for (const auto& m : modules ) {
2714
16
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
16
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
16
            moduleIDs.insert(moduleID);
2722
16
        }
2723
2724
29
        std::set<uint64_t> operationModuleIDs;
2725
29
        for (const auto& op : operations) {
2726
18
            operationModuleIDs.insert(op.first->ID);
2727
18
        }
2728
2729
29
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
29
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
29
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
29
        for (const auto& id : addModuleIDs) {
2734
5
            operations.push_back({ modules.at(id), operations[0].second});
2735
5
        }
2736
29
    }
2737
29
#endif
2738
2739
29
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
29
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
52
    for (size_t i = 0; i < operations.size(); i++) {
2747
23
        auto& operation = operations[i];
2748
2749
23
        auto& module = operation.first;
2750
23
        auto& op = operation.second;
2751
2752
23
        if ( i > 0 ) {
2753
15
            auto& prevModule = operations[i-1].first;
2754
15
            auto& prevOp = operations[i].second;
2755
2756
15
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
7
                auto& curModifier = op.modifier.GetVectorPtr();
2758
7
                if ( curModifier.size() == 0 ) {
2759
2.05k
                    for (size_t j = 0; j < 512; j++) {
2760
2.04k
                        curModifier.push_back(1);
2761
2.04k
                    }
2762
4
                } else {
2763
25
                    for (auto& c : curModifier) {
2764
25
                        c++;
2765
25
                    }
2766
3
                }
2767
7
            }
2768
15
        }
2769
2770
23
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
23
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
23
        const auto& result = results.back();
2777
2778
23
        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
23
        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
23
        if ( options.disableTests == false ) {
2796
23
            tests::test(op, result.second);
2797
23
        }
2798
2799
23
        postprocess(module, op, result);
2800
23
    }
2801
2802
29
    if ( options.noCompare == false ) {
2803
8
        compare(operations, results, data, size);
2804
8
    }
2805
29
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
30
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
30
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
30
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
593
    do {
2691
593
        auto op = getOp(&parentDs, data, size);
2692
593
        auto module = getModule(parentDs);
2693
593
        if ( module == nullptr ) {
2694
550
            continue;
2695
550
        }
2696
2697
43
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
43
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
592
    } while ( parentDs.Get<bool>() == true );
2704
2705
30
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
26
#if 1
2711
26
    {
2712
26
        std::set<uint64_t> moduleIDs;
2713
26
        for (const auto& m : modules ) {
2714
12
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
12
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
12
            moduleIDs.insert(moduleID);
2722
12
        }
2723
2724
26
        std::set<uint64_t> operationModuleIDs;
2725
26
        for (const auto& op : operations) {
2726
21
            operationModuleIDs.insert(op.first->ID);
2727
21
        }
2728
2729
26
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
26
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
26
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
26
        for (const auto& id : addModuleIDs) {
2734
3
            operations.push_back({ modules.at(id), operations[0].second});
2735
3
        }
2736
26
    }
2737
26
#endif
2738
2739
26
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
26
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
50
    for (size_t i = 0; i < operations.size(); i++) {
2747
24
        auto& operation = operations[i];
2748
2749
24
        auto& module = operation.first;
2750
24
        auto& op = operation.second;
2751
2752
24
        if ( i > 0 ) {
2753
18
            auto& prevModule = operations[i-1].first;
2754
18
            auto& prevOp = operations[i].second;
2755
2756
18
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
9
                auto& curModifier = op.modifier.GetVectorPtr();
2758
9
                if ( curModifier.size() == 0 ) {
2759
513
                    for (size_t j = 0; j < 512; j++) {
2760
512
                        curModifier.push_back(1);
2761
512
                    }
2762
8
                } else {
2763
258
                    for (auto& c : curModifier) {
2764
258
                        c++;
2765
258
                    }
2766
8
                }
2767
9
            }
2768
18
        }
2769
2770
24
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
24
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
24
        const auto& result = results.back();
2777
2778
24
        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
24
        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
24
        if ( options.disableTests == false ) {
2796
24
            tests::test(op, result.second);
2797
24
        }
2798
2799
24
        postprocess(module, op, result);
2800
24
    }
2801
2802
26
    if ( options.noCompare == false ) {
2803
6
        compare(operations, results, data, size);
2804
6
    }
2805
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
25
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
25
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
25
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
213
    do {
2691
213
        auto op = getOp(&parentDs, data, size);
2692
213
        auto module = getModule(parentDs);
2693
213
        if ( module == nullptr ) {
2694
157
            continue;
2695
157
        }
2696
2697
56
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
56
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
211
    } while ( parentDs.Get<bool>() == true );
2704
2705
25
    if ( operations.empty() == true ) {
2706
0
        return;
2707
0
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
25
#if 1
2711
25
    {
2712
25
        std::set<uint64_t> moduleIDs;
2713
25
        for (const auto& m : modules ) {
2714
20
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
20
            moduleIDs.insert(moduleID);
2722
20
        }
2723
2724
25
        std::set<uint64_t> operationModuleIDs;
2725
32
        for (const auto& op : operations) {
2726
32
            operationModuleIDs.insert(op.first->ID);
2727
32
        }
2728
2729
25
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
25
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
25
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
25
        for (const auto& id : addModuleIDs) {
2734
5
            operations.push_back({ modules.at(id), operations[0].second});
2735
5
        }
2736
25
    }
2737
25
#endif
2738
2739
25
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
25
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
62
    for (size_t i = 0; i < operations.size(); i++) {
2747
37
        auto& operation = operations[i];
2748
2749
37
        auto& module = operation.first;
2750
37
        auto& op = operation.second;
2751
2752
37
        if ( i > 0 ) {
2753
27
            auto& prevModule = operations[i-1].first;
2754
27
            auto& prevOp = operations[i].second;
2755
2756
27
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
15
                auto& curModifier = op.modifier.GetVectorPtr();
2758
15
                if ( curModifier.size() == 0 ) {
2759
3.59k
                    for (size_t j = 0; j < 512; j++) {
2760
3.58k
                        curModifier.push_back(1);
2761
3.58k
                    }
2762
8
                } else {
2763
542
                    for (auto& c : curModifier) {
2764
542
                        c++;
2765
542
                    }
2766
8
                }
2767
15
            }
2768
27
        }
2769
2770
37
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
37
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
37
        const auto& result = results.back();
2777
2778
37
        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
37
        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
37
        if ( options.disableTests == false ) {
2796
37
            tests::test(op, result.second);
2797
37
        }
2798
2799
37
        postprocess(module, op, result);
2800
37
    }
2801
2802
25
    if ( options.noCompare == false ) {
2803
10
        compare(operations, results, data, size);
2804
10
    }
2805
25
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
56
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
56
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
56
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
468
    do {
2691
468
        auto op = getOp(&parentDs, data, size);
2692
468
        auto module = getModule(parentDs);
2693
468
        if ( module == nullptr ) {
2694
411
            continue;
2695
411
        }
2696
2697
57
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
57
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
467
    } while ( parentDs.Get<bool>() == true );
2704
2705
56
    if ( operations.empty() == true ) {
2706
8
        return;
2707
8
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
48
#if 1
2711
48
    {
2712
48
        std::set<uint64_t> moduleIDs;
2713
48
        for (const auto& m : modules ) {
2714
22
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
22
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
22
            moduleIDs.insert(moduleID);
2722
22
        }
2723
2724
48
        std::set<uint64_t> operationModuleIDs;
2725
48
        for (const auto& op : operations) {
2726
30
            operationModuleIDs.insert(op.first->ID);
2727
30
        }
2728
2729
48
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
48
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
48
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
48
        for (const auto& id : addModuleIDs) {
2734
8
            operations.push_back({ modules.at(id), operations[0].second});
2735
8
        }
2736
48
    }
2737
48
#endif
2738
2739
48
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
48
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
86
    for (size_t i = 0; i < operations.size(); i++) {
2747
38
        auto& operation = operations[i];
2748
2749
38
        auto& module = operation.first;
2750
38
        auto& op = operation.second;
2751
2752
38
        if ( i > 0 ) {
2753
27
            auto& prevModule = operations[i-1].first;
2754
27
            auto& prevOp = operations[i].second;
2755
2756
27
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
15
                auto& curModifier = op.modifier.GetVectorPtr();
2758
15
                if ( curModifier.size() == 0 ) {
2759
4.61k
                    for (size_t j = 0; j < 512; j++) {
2760
4.60k
                        curModifier.push_back(1);
2761
4.60k
                    }
2762
9
                } else {
2763
15
                    for (auto& c : curModifier) {
2764
15
                        c++;
2765
15
                    }
2766
6
                }
2767
15
            }
2768
27
        }
2769
2770
38
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
38
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
38
        const auto& result = results.back();
2777
2778
38
        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
38
        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
38
        if ( options.disableTests == false ) {
2796
38
            tests::test(op, result.second);
2797
38
        }
2798
2799
38
        postprocess(module, op, result);
2800
38
    }
2801
2802
48
    if ( options.noCompare == false ) {
2803
11
        compare(operations, results, data, size);
2804
11
    }
2805
48
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
46
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
46
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
46
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
171
    do {
2691
171
        auto op = getOp(&parentDs, data, size);
2692
171
        auto module = getModule(parentDs);
2693
171
        if ( module == nullptr ) {
2694
107
            continue;
2695
107
        }
2696
2697
64
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
64
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
169
    } while ( parentDs.Get<bool>() == true );
2704
2705
46
    if ( operations.empty() == true ) {
2706
0
        return;
2707
0
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
46
#if 1
2711
46
    {
2712
46
        std::set<uint64_t> moduleIDs;
2713
46
        for (const auto& m : modules ) {
2714
24
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
24
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
24
            moduleIDs.insert(moduleID);
2722
24
        }
2723
2724
46
        std::set<uint64_t> operationModuleIDs;
2725
46
        for (const auto& op : operations) {
2726
30
            operationModuleIDs.insert(op.first->ID);
2727
30
        }
2728
2729
46
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
46
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
46
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
46
        for (const auto& id : addModuleIDs) {
2734
10
            operations.push_back({ modules.at(id), operations[0].second});
2735
10
        }
2736
46
    }
2737
46
#endif
2738
2739
46
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
46
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
86
    for (size_t i = 0; i < operations.size(); i++) {
2747
40
        auto& operation = operations[i];
2748
2749
40
        auto& module = operation.first;
2750
40
        auto& op = operation.second;
2751
2752
40
        if ( i > 0 ) {
2753
28
            auto& prevModule = operations[i-1].first;
2754
28
            auto& prevOp = operations[i].second;
2755
2756
28
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
15
                auto& curModifier = op.modifier.GetVectorPtr();
2758
15
                if ( curModifier.size() == 0 ) {
2759
3.59k
                    for (size_t j = 0; j < 512; j++) {
2760
3.58k
                        curModifier.push_back(1);
2761
3.58k
                    }
2762
8
                } else {
2763
46
                    for (auto& c : curModifier) {
2764
46
                        c++;
2765
46
                    }
2766
8
                }
2767
15
            }
2768
28
        }
2769
2770
40
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
40
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
40
        const auto& result = results.back();
2777
2778
40
        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
40
        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
40
        if ( options.disableTests == false ) {
2796
40
            tests::test(op, result.second);
2797
40
        }
2798
2799
40
        postprocess(module, op, result);
2800
40
    }
2801
2802
46
    if ( options.noCompare == false ) {
2803
12
        compare(operations, results, data, size);
2804
12
    }
2805
46
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
24
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
24
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
24
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
578
    do {
2691
578
        auto op = getOp(&parentDs, data, size);
2692
578
        auto module = getModule(parentDs);
2693
578
        if ( module == nullptr ) {
2694
544
            continue;
2695
544
        }
2696
2697
34
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
34
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
577
    } while ( parentDs.Get<bool>() == true );
2704
2705
24
    if ( operations.empty() == true ) {
2706
0
        return;
2707
0
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
24
#if 1
2711
24
    {
2712
24
        std::set<uint64_t> moduleIDs;
2713
24
        for (const auto& m : modules ) {
2714
18
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
18
            moduleIDs.insert(moduleID);
2722
18
        }
2723
2724
24
        std::set<uint64_t> operationModuleIDs;
2725
24
        for (const auto& op : operations) {
2726
18
            operationModuleIDs.insert(op.first->ID);
2727
18
        }
2728
2729
24
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
24
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
24
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
24
        for (const auto& id : addModuleIDs) {
2734
7
            operations.push_back({ modules.at(id), operations[0].second});
2735
7
        }
2736
24
    }
2737
24
#endif
2738
2739
24
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
24
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
49
    for (size_t i = 0; i < operations.size(); i++) {
2747
25
        auto& operation = operations[i];
2748
2749
25
        auto& module = operation.first;
2750
25
        auto& op = operation.second;
2751
2752
25
        if ( i > 0 ) {
2753
16
            auto& prevModule = operations[i-1].first;
2754
16
            auto& prevOp = operations[i].second;
2755
2756
16
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
7
                auto& curModifier = op.modifier.GetVectorPtr();
2758
7
                if ( curModifier.size() == 0 ) {
2759
2.05k
                    for (size_t j = 0; j < 512; j++) {
2760
2.04k
                        curModifier.push_back(1);
2761
2.04k
                    }
2762
4
                } else {
2763
12
                    for (auto& c : curModifier) {
2764
12
                        c++;
2765
12
                    }
2766
3
                }
2767
7
            }
2768
16
        }
2769
2770
25
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
25
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
25
        const auto& result = results.back();
2777
2778
25
        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
25
        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
25
        if ( options.disableTests == false ) {
2796
25
            tests::test(op, result.second);
2797
25
        }
2798
2799
25
        postprocess(module, op, result);
2800
25
    }
2801
2802
24
    if ( options.noCompare == false ) {
2803
9
        compare(operations, results, data, size);
2804
9
    }
2805
24
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
35
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
35
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
35
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
99
    do {
2691
99
        auto op = getOp(&parentDs, data, size);
2692
99
        auto module = getModule(parentDs);
2693
99
        if ( module == nullptr ) {
2694
69
            continue;
2695
69
        }
2696
2697
30
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
30
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
99
    } while ( parentDs.Get<bool>() == true );
2704
2705
35
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
33
#if 1
2711
33
    {
2712
33
        std::set<uint64_t> moduleIDs;
2713
33
        for (const auto& m : modules ) {
2714
14
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
14
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
14
            moduleIDs.insert(moduleID);
2722
14
        }
2723
2724
33
        std::set<uint64_t> operationModuleIDs;
2725
33
        for (const auto& op : operations) {
2726
18
            operationModuleIDs.insert(op.first->ID);
2727
18
        }
2728
2729
33
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
33
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
33
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
33
        for (const auto& id : addModuleIDs) {
2734
6
            operations.push_back({ modules.at(id), operations[0].second});
2735
6
        }
2736
33
    }
2737
33
#endif
2738
2739
33
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
33
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
57
    for (size_t i = 0; i < operations.size(); i++) {
2747
24
        auto& operation = operations[i];
2748
2749
24
        auto& module = operation.first;
2750
24
        auto& op = operation.second;
2751
2752
24
        if ( i > 0 ) {
2753
17
            auto& prevModule = operations[i-1].first;
2754
17
            auto& prevOp = operations[i].second;
2755
2756
17
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
9
                auto& curModifier = op.modifier.GetVectorPtr();
2758
9
                if ( curModifier.size() == 0 ) {
2759
3.59k
                    for (size_t j = 0; j < 512; j++) {
2760
3.58k
                        curModifier.push_back(1);
2761
3.58k
                    }
2762
7
                } else {
2763
4
                    for (auto& c : curModifier) {
2764
4
                        c++;
2765
4
                    }
2766
2
                }
2767
9
            }
2768
17
        }
2769
2770
24
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
24
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
24
        const auto& result = results.back();
2777
2778
24
        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
24
        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
24
        if ( options.disableTests == false ) {
2796
24
            tests::test(op, result.second);
2797
24
        }
2798
2799
24
        postprocess(module, op, result);
2800
24
    }
2801
2802
33
    if ( options.noCompare == false ) {
2803
7
        compare(operations, results, data, size);
2804
7
    }
2805
33
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
34
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
34
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
34
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
358
    do {
2691
358
        auto op = getOp(&parentDs, data, size);
2692
358
        auto module = getModule(parentDs);
2693
358
        if ( module == nullptr ) {
2694
319
            continue;
2695
319
        }
2696
2697
39
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
39
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
357
    } while ( parentDs.Get<bool>() == true );
2704
2705
34
    if ( operations.empty() == true ) {
2706
1
        return;
2707
1
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
33
#if 1
2711
33
    {
2712
33
        std::set<uint64_t> moduleIDs;
2713
33
        for (const auto& m : modules ) {
2714
12
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
12
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
12
            moduleIDs.insert(moduleID);
2722
12
        }
2723
2724
33
        std::set<uint64_t> operationModuleIDs;
2725
33
        for (const auto& op : operations) {
2726
23
            operationModuleIDs.insert(op.first->ID);
2727
23
        }
2728
2729
33
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
33
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
33
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
33
        for (const auto& id : addModuleIDs) {
2734
2
            operations.push_back({ modules.at(id), operations[0].second});
2735
2
        }
2736
33
    }
2737
33
#endif
2738
2739
33
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
33
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
58
    for (size_t i = 0; i < operations.size(); i++) {
2747
25
        auto& operation = operations[i];
2748
2749
25
        auto& module = operation.first;
2750
25
        auto& op = operation.second;
2751
2752
25
        if ( i > 0 ) {
2753
19
            auto& prevModule = operations[i-1].first;
2754
19
            auto& prevOp = operations[i].second;
2755
2756
19
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
11
                auto& curModifier = op.modifier.GetVectorPtr();
2758
11
                if ( curModifier.size() == 0 ) {
2759
2.56k
                    for (size_t j = 0; j < 512; j++) {
2760
2.56k
                        curModifier.push_back(1);
2761
2.56k
                    }
2762
6
                } else {
2763
410
                    for (auto& c : curModifier) {
2764
410
                        c++;
2765
410
                    }
2766
6
                }
2767
11
            }
2768
19
        }
2769
2770
25
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
25
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
25
        const auto& result = results.back();
2777
2778
25
        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
25
        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
25
        if ( options.disableTests == false ) {
2796
25
            tests::test(op, result.second);
2797
25
        }
2798
2799
25
        postprocess(module, op, result);
2800
25
    }
2801
2802
33
    if ( options.noCompare == false ) {
2803
6
        compare(operations, results, data, size);
2804
6
    }
2805
33
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
30
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
30
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
30
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
294
    do {
2691
294
        auto op = getOp(&parentDs, data, size);
2692
294
        auto module = getModule(parentDs);
2693
294
        if ( module == nullptr ) {
2694
245
            continue;
2695
245
        }
2696
2697
49
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
49
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
293
    } while ( parentDs.Get<bool>() == true );
2704
2705
30
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
27
#if 1
2711
27
    {
2712
27
        std::set<uint64_t> moduleIDs;
2713
27
        for (const auto& m : modules ) {
2714
20
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
20
            moduleIDs.insert(moduleID);
2722
20
        }
2723
2724
27
        std::set<uint64_t> operationModuleIDs;
2725
32
        for (const auto& op : operations) {
2726
32
            operationModuleIDs.insert(op.first->ID);
2727
32
        }
2728
2729
27
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
27
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
27
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
27
        for (const auto& id : addModuleIDs) {
2734
6
            operations.push_back({ modules.at(id), operations[0].second});
2735
6
        }
2736
27
    }
2737
27
#endif
2738
2739
27
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
27
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
65
    for (size_t i = 0; i < operations.size(); i++) {
2747
38
        auto& operation = operations[i];
2748
2749
38
        auto& module = operation.first;
2750
38
        auto& op = operation.second;
2751
2752
38
        if ( i > 0 ) {
2753
28
            auto& prevModule = operations[i-1].first;
2754
28
            auto& prevOp = operations[i].second;
2755
2756
28
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
15
                auto& curModifier = op.modifier.GetVectorPtr();
2758
15
                if ( curModifier.size() == 0 ) {
2759
5.13k
                    for (size_t j = 0; j < 512; j++) {
2760
5.12k
                        curModifier.push_back(1);
2761
5.12k
                    }
2762
10
                } else {
2763
555
                    for (auto& c : curModifier) {
2764
555
                        c++;
2765
555
                    }
2766
5
                }
2767
15
            }
2768
28
        }
2769
2770
38
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
38
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
38
        const auto& result = results.back();
2777
2778
38
        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
38
        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
38
        if ( options.disableTests == false ) {
2796
38
            tests::test(op, result.second);
2797
38
        }
2798
2799
38
        postprocess(module, op, result);
2800
38
    }
2801
2802
27
    if ( options.noCompare == false ) {
2803
10
        compare(operations, results, data, size);
2804
10
    }
2805
27
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
27
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
27
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
27
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
134
    do {
2691
134
        auto op = getOp(&parentDs, data, size);
2692
134
        auto module = getModule(parentDs);
2693
134
        if ( module == nullptr ) {
2694
81
            continue;
2695
81
        }
2696
2697
53
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
53
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
133
    } while ( parentDs.Get<bool>() == true );
2704
2705
27
    if ( operations.empty() == true ) {
2706
1
        return;
2707
1
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
26
#if 1
2711
26
    {
2712
26
        std::set<uint64_t> moduleIDs;
2713
26
        for (const auto& m : modules ) {
2714
22
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
22
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
22
            moduleIDs.insert(moduleID);
2722
22
        }
2723
2724
26
        std::set<uint64_t> operationModuleIDs;
2725
32
        for (const auto& op : operations) {
2726
32
            operationModuleIDs.insert(op.first->ID);
2727
32
        }
2728
2729
26
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
26
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
26
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
26
        for (const auto& id : addModuleIDs) {
2734
7
            operations.push_back({ modules.at(id), operations[0].second});
2735
7
        }
2736
26
    }
2737
26
#endif
2738
2739
26
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
26
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
65
    for (size_t i = 0; i < operations.size(); i++) {
2747
39
        auto& operation = operations[i];
2748
2749
39
        auto& module = operation.first;
2750
39
        auto& op = operation.second;
2751
2752
39
        if ( i > 0 ) {
2753
28
            auto& prevModule = operations[i-1].first;
2754
28
            auto& prevOp = operations[i].second;
2755
2756
28
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
17
                auto& curModifier = op.modifier.GetVectorPtr();
2758
17
                if ( curModifier.size() == 0 ) {
2759
3.07k
                    for (size_t j = 0; j < 512; j++) {
2760
3.07k
                        curModifier.push_back(1);
2761
3.07k
                    }
2762
11
                } else {
2763
280
                    for (auto& c : curModifier) {
2764
280
                        c++;
2765
280
                    }
2766
11
                }
2767
17
            }
2768
28
        }
2769
2770
39
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
39
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
39
        const auto& result = results.back();
2777
2778
39
        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
39
        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
39
        if ( options.disableTests == false ) {
2796
39
            tests::test(op, result.second);
2797
39
        }
2798
2799
39
        postprocess(module, op, result);
2800
39
    }
2801
2802
26
    if ( options.noCompare == false ) {
2803
11
        compare(operations, results, data, size);
2804
11
    }
2805
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
44
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
44
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
44
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
330
    do {
2691
330
        auto op = getOp(&parentDs, data, size);
2692
330
        auto module = getModule(parentDs);
2693
330
        if ( module == nullptr ) {
2694
267
            continue;
2695
267
        }
2696
2697
63
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
63
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
330
    } while ( parentDs.Get<bool>() == true );
2704
2705
44
    if ( operations.empty() == true ) {
2706
1
        return;
2707
1
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
43
#if 1
2711
43
    {
2712
43
        std::set<uint64_t> moduleIDs;
2713
43
        for (const auto& m : modules ) {
2714
28
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
28
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
28
            moduleIDs.insert(moduleID);
2722
28
        }
2723
2724
43
        std::set<uint64_t> operationModuleIDs;
2725
43
        for (const auto& op : operations) {
2726
28
            operationModuleIDs.insert(op.first->ID);
2727
28
        }
2728
2729
43
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
43
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
43
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
43
        for (const auto& id : addModuleIDs) {
2734
11
            operations.push_back({ modules.at(id), operations[0].second});
2735
11
        }
2736
43
    }
2737
43
#endif
2738
2739
43
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
43
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
82
    for (size_t i = 0; i < operations.size(); i++) {
2747
39
        auto& operation = operations[i];
2748
2749
39
        auto& module = operation.first;
2750
39
        auto& op = operation.second;
2751
2752
39
        if ( i > 0 ) {
2753
25
            auto& prevModule = operations[i-1].first;
2754
25
            auto& prevOp = operations[i].second;
2755
2756
25
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
11
                auto& curModifier = op.modifier.GetVectorPtr();
2758
11
                if ( curModifier.size() == 0 ) {
2759
3.07k
                    for (size_t j = 0; j < 512; j++) {
2760
3.07k
                        curModifier.push_back(1);
2761
3.07k
                    }
2762
6
                } else {
2763
226
                    for (auto& c : curModifier) {
2764
226
                        c++;
2765
226
                    }
2766
5
                }
2767
11
            }
2768
25
        }
2769
2770
39
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
39
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
39
        const auto& result = results.back();
2777
2778
39
        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
39
        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
39
        if ( options.disableTests == false ) {
2796
39
            tests::test(op, result.second);
2797
39
        }
2798
2799
39
        postprocess(module, op, result);
2800
39
    }
2801
2802
43
    if ( options.noCompare == false ) {
2803
14
        compare(operations, results, data, size);
2804
14
    }
2805
43
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
34
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
34
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
34
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
270
    do {
2691
270
        auto op = getOp(&parentDs, data, size);
2692
270
        auto module = getModule(parentDs);
2693
270
        if ( module == nullptr ) {
2694
227
            continue;
2695
227
        }
2696
2697
43
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
43
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
268
    } while ( parentDs.Get<bool>() == true );
2704
2705
34
    if ( operations.empty() == true ) {
2706
1
        return;
2707
1
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
33
#if 1
2711
33
    {
2712
33
        std::set<uint64_t> moduleIDs;
2713
33
        for (const auto& m : modules ) {
2714
26
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
26
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
26
            moduleIDs.insert(moduleID);
2722
26
        }
2723
2724
33
        std::set<uint64_t> operationModuleIDs;
2725
33
        for (const auto& op : operations) {
2726
28
            operationModuleIDs.insert(op.first->ID);
2727
28
        }
2728
2729
33
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
33
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
33
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
33
        for (const auto& id : addModuleIDs) {
2734
11
            operations.push_back({ modules.at(id), operations[0].second});
2735
11
        }
2736
33
    }
2737
33
#endif
2738
2739
33
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
33
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
72
    for (size_t i = 0; i < operations.size(); i++) {
2747
39
        auto& operation = operations[i];
2748
2749
39
        auto& module = operation.first;
2750
39
        auto& op = operation.second;
2751
2752
39
        if ( i > 0 ) {
2753
26
            auto& prevModule = operations[i-1].first;
2754
26
            auto& prevOp = operations[i].second;
2755
2756
26
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
12
                auto& curModifier = op.modifier.GetVectorPtr();
2758
12
                if ( curModifier.size() == 0 ) {
2759
1.02k
                    for (size_t j = 0; j < 512; j++) {
2760
1.02k
                        curModifier.push_back(1);
2761
1.02k
                    }
2762
10
                } else {
2763
180
                    for (auto& c : curModifier) {
2764
180
                        c++;
2765
180
                    }
2766
10
                }
2767
12
            }
2768
26
        }
2769
2770
39
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
39
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
39
        const auto& result = results.back();
2777
2778
39
        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
39
        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
39
        if ( options.disableTests == false ) {
2796
39
            tests::test(op, result.second);
2797
39
        }
2798
2799
39
        postprocess(module, op, result);
2800
39
    }
2801
2802
33
    if ( options.noCompare == false ) {
2803
13
        compare(operations, results, data, size);
2804
13
    }
2805
33
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
36
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
36
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
36
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
380
    do {
2691
380
        auto op = getOp(&parentDs, data, size);
2692
380
        auto module = getModule(parentDs);
2693
380
        if ( module == nullptr ) {
2694
316
            continue;
2695
316
        }
2696
2697
64
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
64
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
378
    } while ( parentDs.Get<bool>() == true );
2704
2705
36
    if ( operations.empty() == true ) {
2706
0
        return;
2707
0
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
36
#if 1
2711
36
    {
2712
36
        std::set<uint64_t> moduleIDs;
2713
36
        for (const auto& m : modules ) {
2714
32
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
32
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
32
            moduleIDs.insert(moduleID);
2722
32
        }
2723
2724
36
        std::set<uint64_t> operationModuleIDs;
2725
36
        for (const auto& op : operations) {
2726
36
            operationModuleIDs.insert(op.first->ID);
2727
36
        }
2728
2729
36
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
36
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
36
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
36
        for (const auto& id : addModuleIDs) {
2734
13
            operations.push_back({ modules.at(id), operations[0].second});
2735
13
        }
2736
36
    }
2737
36
#endif
2738
2739
36
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
36
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
85
    for (size_t i = 0; i < operations.size(); i++) {
2747
49
        auto& operation = operations[i];
2748
2749
49
        auto& module = operation.first;
2750
49
        auto& op = operation.second;
2751
2752
49
        if ( i > 0 ) {
2753
33
            auto& prevModule = operations[i-1].first;
2754
33
            auto& prevOp = operations[i].second;
2755
2756
33
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
15
                auto& curModifier = op.modifier.GetVectorPtr();
2758
15
                if ( curModifier.size() == 0 ) {
2759
5.64k
                    for (size_t j = 0; j < 512; j++) {
2760
5.63k
                        curModifier.push_back(1);
2761
5.63k
                    }
2762
11
                } else {
2763
13
                    for (auto& c : curModifier) {
2764
13
                        c++;
2765
13
                    }
2766
4
                }
2767
15
            }
2768
33
        }
2769
2770
49
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
49
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
49
        const auto& result = results.back();
2777
2778
49
        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
49
        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
49
        if ( options.disableTests == false ) {
2796
49
            tests::test(op, result.second);
2797
49
        }
2798
2799
49
        postprocess(module, op, result);
2800
49
    }
2801
2802
36
    if ( options.noCompare == false ) {
2803
16
        compare(operations, results, data, size);
2804
16
    }
2805
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
29
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
29
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
29
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
106
    do {
2691
106
        auto op = getOp(&parentDs, data, size);
2692
106
        auto module = getModule(parentDs);
2693
106
        if ( module == nullptr ) {
2694
70
            continue;
2695
70
        }
2696
2697
36
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
36
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
106
    } while ( parentDs.Get<bool>() == true );
2704
2705
29
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
25
#if 1
2711
25
    {
2712
25
        std::set<uint64_t> moduleIDs;
2713
25
        for (const auto& m : modules ) {
2714
18
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
18
            moduleIDs.insert(moduleID);
2722
18
        }
2723
2724
25
        std::set<uint64_t> operationModuleIDs;
2725
25
        for (const auto& op : operations) {
2726
22
            operationModuleIDs.insert(op.first->ID);
2727
22
        }
2728
2729
25
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
25
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
25
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
25
        for (const auto& id : addModuleIDs) {
2734
6
            operations.push_back({ modules.at(id), operations[0].second});
2735
6
        }
2736
25
    }
2737
25
#endif
2738
2739
25
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
25
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
53
    for (size_t i = 0; i < operations.size(); i++) {
2747
28
        auto& operation = operations[i];
2748
2749
28
        auto& module = operation.first;
2750
28
        auto& op = operation.second;
2751
2752
28
        if ( i > 0 ) {
2753
19
            auto& prevModule = operations[i-1].first;
2754
19
            auto& prevOp = operations[i].second;
2755
2756
19
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
9
                auto& curModifier = op.modifier.GetVectorPtr();
2758
9
                if ( curModifier.size() == 0 ) {
2759
3.07k
                    for (size_t j = 0; j < 512; j++) {
2760
3.07k
                        curModifier.push_back(1);
2761
3.07k
                    }
2762
6
                } else {
2763
7
                    for (auto& c : curModifier) {
2764
7
                        c++;
2765
7
                    }
2766
3
                }
2767
9
            }
2768
19
        }
2769
2770
28
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
28
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
28
        const auto& result = results.back();
2777
2778
28
        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
28
        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
28
        if ( options.disableTests == false ) {
2796
28
            tests::test(op, result.second);
2797
28
        }
2798
2799
28
        postprocess(module, op, result);
2800
28
    }
2801
2802
25
    if ( options.noCompare == false ) {
2803
9
        compare(operations, results, data, size);
2804
9
    }
2805
25
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
39
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
39
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
39
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
354
    do {
2691
354
        auto op = getOp(&parentDs, data, size);
2692
354
        auto module = getModule(parentDs);
2693
354
        if ( module == nullptr ) {
2694
302
            continue;
2695
302
        }
2696
2697
52
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
52
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
353
    } while ( parentDs.Get<bool>() == true );
2704
2705
39
    if ( operations.empty() == true ) {
2706
0
        return;
2707
0
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
39
#if 1
2711
39
    {
2712
39
        std::set<uint64_t> moduleIDs;
2713
39
        for (const auto& m : modules ) {
2714
32
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
32
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
32
            moduleIDs.insert(moduleID);
2722
32
        }
2723
2724
39
        std::set<uint64_t> operationModuleIDs;
2725
39
        for (const auto& op : operations) {
2726
30
            operationModuleIDs.insert(op.first->ID);
2727
30
        }
2728
2729
39
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
39
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
39
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
39
        for (const auto& id : addModuleIDs) {
2734
14
            operations.push_back({ modules.at(id), operations[0].second});
2735
14
        }
2736
39
    }
2737
39
#endif
2738
2739
39
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
39
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
83
    for (size_t i = 0; i < operations.size(); i++) {
2747
44
        auto& operation = operations[i];
2748
2749
44
        auto& module = operation.first;
2750
44
        auto& op = operation.second;
2751
2752
44
        if ( i > 0 ) {
2753
28
            auto& prevModule = operations[i-1].first;
2754
28
            auto& prevOp = operations[i].second;
2755
2756
28
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
12
                auto& curModifier = op.modifier.GetVectorPtr();
2758
12
                if ( curModifier.size() == 0 ) {
2759
2.56k
                    for (size_t j = 0; j < 512; j++) {
2760
2.56k
                        curModifier.push_back(1);
2761
2.56k
                    }
2762
7
                } else {
2763
58
                    for (auto& c : curModifier) {
2764
58
                        c++;
2765
58
                    }
2766
7
                }
2767
12
            }
2768
28
        }
2769
2770
44
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
44
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
44
        const auto& result = results.back();
2777
2778
44
        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
44
        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
44
        if ( options.disableTests == false ) {
2796
44
            tests::test(op, result.second);
2797
44
        }
2798
2799
44
        postprocess(module, op, result);
2800
44
    }
2801
2802
39
    if ( options.noCompare == false ) {
2803
16
        compare(operations, results, data, size);
2804
16
    }
2805
39
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
32
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
32
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
32
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
358
    do {
2691
358
        auto op = getOp(&parentDs, data, size);
2692
358
        auto module = getModule(parentDs);
2693
358
        if ( module == nullptr ) {
2694
307
            continue;
2695
307
        }
2696
2697
51
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
51
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
357
    } while ( parentDs.Get<bool>() == true );
2704
2705
32
    if ( operations.empty() == true ) {
2706
0
        return;
2707
0
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
32
#if 1
2711
32
    {
2712
32
        std::set<uint64_t> moduleIDs;
2713
32
        for (const auto& m : modules ) {
2714
24
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
24
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
24
            moduleIDs.insert(moduleID);
2722
24
        }
2723
2724
32
        std::set<uint64_t> operationModuleIDs;
2725
32
        for (const auto& op : operations) {
2726
27
            operationModuleIDs.insert(op.first->ID);
2727
27
        }
2728
2729
32
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
32
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
32
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
32
        for (const auto& id : addModuleIDs) {
2734
10
            operations.push_back({ modules.at(id), operations[0].second});
2735
10
        }
2736
32
    }
2737
32
#endif
2738
2739
32
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
32
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
69
    for (size_t i = 0; i < operations.size(); i++) {
2747
37
        auto& operation = operations[i];
2748
2749
37
        auto& module = operation.first;
2750
37
        auto& op = operation.second;
2751
2752
37
        if ( i > 0 ) {
2753
25
            auto& prevModule = operations[i-1].first;
2754
25
            auto& prevOp = operations[i].second;
2755
2756
25
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
13
                auto& curModifier = op.modifier.GetVectorPtr();
2758
13
                if ( curModifier.size() == 0 ) {
2759
2.05k
                    for (size_t j = 0; j < 512; j++) {
2760
2.04k
                        curModifier.push_back(1);
2761
2.04k
                    }
2762
9
                } else {
2763
17
                    for (auto& c : curModifier) {
2764
17
                        c++;
2765
17
                    }
2766
9
                }
2767
13
            }
2768
25
        }
2769
2770
37
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
37
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
37
        const auto& result = results.back();
2777
2778
37
        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
37
        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
37
        if ( options.disableTests == false ) {
2796
37
            tests::test(op, result.second);
2797
37
        }
2798
2799
37
        postprocess(module, op, result);
2800
37
    }
2801
2802
32
    if ( options.noCompare == false ) {
2803
12
        compare(operations, results, data, size);
2804
12
    }
2805
32
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
54
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
54
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
54
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
927
    do {
2691
927
        auto op = getOp(&parentDs, data, size);
2692
927
        auto module = getModule(parentDs);
2693
927
        if ( module == nullptr ) {
2694
835
            continue;
2695
835
        }
2696
2697
92
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
92
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
922
    } while ( parentDs.Get<bool>() == true );
2704
2705
54
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
50
#if 1
2711
50
    {
2712
50
        std::set<uint64_t> moduleIDs;
2713
50
        for (const auto& m : modules ) {
2714
38
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
38
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
38
            moduleIDs.insert(moduleID);
2722
38
        }
2723
2724
50
        std::set<uint64_t> operationModuleIDs;
2725
56
        for (const auto& op : operations) {
2726
56
            operationModuleIDs.insert(op.first->ID);
2727
56
        }
2728
2729
50
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
50
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
50
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
50
        for (const auto& id : addModuleIDs) {
2734
15
            operations.push_back({ modules.at(id), operations[0].second});
2735
15
        }
2736
50
    }
2737
50
#endif
2738
2739
50
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
50
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
121
    for (size_t i = 0; i < operations.size(); i++) {
2747
71
        auto& operation = operations[i];
2748
2749
71
        auto& module = operation.first;
2750
71
        auto& op = operation.second;
2751
2752
71
        if ( i > 0 ) {
2753
52
            auto& prevModule = operations[i-1].first;
2754
52
            auto& prevOp = operations[i].second;
2755
2756
52
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
33
                auto& curModifier = op.modifier.GetVectorPtr();
2758
33
                if ( curModifier.size() == 0 ) {
2759
8.72k
                    for (size_t j = 0; j < 512; j++) {
2760
8.70k
                        curModifier.push_back(1);
2761
8.70k
                    }
2762
17
                } else {
2763
466
                    for (auto& c : curModifier) {
2764
466
                        c++;
2765
466
                    }
2766
16
                }
2767
33
            }
2768
52
        }
2769
2770
71
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
71
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
71
        const auto& result = results.back();
2777
2778
71
        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
71
        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
71
        if ( options.disableTests == false ) {
2796
71
            tests::test(op, result.second);
2797
71
        }
2798
2799
71
        postprocess(module, op, result);
2800
71
    }
2801
2802
50
    if ( options.noCompare == false ) {
2803
19
        compare(operations, results, data, size);
2804
19
    }
2805
50
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
32
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
32
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
32
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
431
    do {
2691
431
        auto op = getOp(&parentDs, data, size);
2692
431
        auto module = getModule(parentDs);
2693
431
        if ( module == nullptr ) {
2694
388
            continue;
2695
388
        }
2696
2697
43
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
43
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
430
    } while ( parentDs.Get<bool>() == true );
2704
2705
32
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
29
#if 1
2711
29
    {
2712
29
        std::set<uint64_t> moduleIDs;
2713
29
        for (const auto& m : modules ) {
2714
28
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
28
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
28
            moduleIDs.insert(moduleID);
2722
28
        }
2723
2724
29
        std::set<uint64_t> operationModuleIDs;
2725
29
        for (const auto& op : operations) {
2726
26
            operationModuleIDs.insert(op.first->ID);
2727
26
        }
2728
2729
29
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
29
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
29
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
29
        for (const auto& id : addModuleIDs) {
2734
13
            operations.push_back({ modules.at(id), operations[0].second});
2735
13
        }
2736
29
    }
2737
29
#endif
2738
2739
29
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
29
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
68
    for (size_t i = 0; i < operations.size(); i++) {
2747
39
        auto& operation = operations[i];
2748
2749
39
        auto& module = operation.first;
2750
39
        auto& op = operation.second;
2751
2752
39
        if ( i > 0 ) {
2753
25
            auto& prevModule = operations[i-1].first;
2754
25
            auto& prevOp = operations[i].second;
2755
2756
25
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
11
                auto& curModifier = op.modifier.GetVectorPtr();
2758
11
                if ( curModifier.size() == 0 ) {
2759
3.59k
                    for (size_t j = 0; j < 512; j++) {
2760
3.58k
                        curModifier.push_back(1);
2761
3.58k
                    }
2762
7
                } else {
2763
242
                    for (auto& c : curModifier) {
2764
242
                        c++;
2765
242
                    }
2766
4
                }
2767
11
            }
2768
25
        }
2769
2770
39
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
39
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
39
        const auto& result = results.back();
2777
2778
39
        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
39
        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
39
        if ( options.disableTests == false ) {
2796
39
            tests::test(op, result.second);
2797
39
        }
2798
2799
39
        postprocess(module, op, result);
2800
39
    }
2801
2802
29
    if ( options.noCompare == false ) {
2803
14
        compare(operations, results, data, size);
2804
14
    }
2805
29
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
48
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
48
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
48
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
246
    do {
2691
246
        auto op = getOp(&parentDs, data, size);
2692
246
        auto module = getModule(parentDs);
2693
246
        if ( module == nullptr ) {
2694
158
            continue;
2695
158
        }
2696
2697
88
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
88
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
244
    } while ( parentDs.Get<bool>() == true );
2704
2705
48
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
46
#if 1
2711
46
    {
2712
46
        std::set<uint64_t> moduleIDs;
2713
46
        for (const auto& m : modules ) {
2714
28
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
28
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
28
            moduleIDs.insert(moduleID);
2722
28
        }
2723
2724
46
        std::set<uint64_t> operationModuleIDs;
2725
46
        for (const auto& op : operations) {
2726
39
            operationModuleIDs.insert(op.first->ID);
2727
39
        }
2728
2729
46
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
46
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
46
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
46
        for (const auto& id : addModuleIDs) {
2734
10
            operations.push_back({ modules.at(id), operations[0].second});
2735
10
        }
2736
46
    }
2737
46
#endif
2738
2739
46
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
46
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
95
    for (size_t i = 0; i < operations.size(); i++) {
2747
49
        auto& operation = operations[i];
2748
2749
49
        auto& module = operation.first;
2750
49
        auto& op = operation.second;
2751
2752
49
        if ( i > 0 ) {
2753
35
            auto& prevModule = operations[i-1].first;
2754
35
            auto& prevOp = operations[i].second;
2755
2756
35
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
21
                auto& curModifier = op.modifier.GetVectorPtr();
2758
21
                if ( curModifier.size() == 0 ) {
2759
2.56k
                    for (size_t j = 0; j < 512; j++) {
2760
2.56k
                        curModifier.push_back(1);
2761
2.56k
                    }
2762
16
                } else {
2763
32
                    for (auto& c : curModifier) {
2764
32
                        c++;
2765
32
                    }
2766
16
                }
2767
21
            }
2768
35
        }
2769
2770
49
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
49
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
49
        const auto& result = results.back();
2777
2778
49
        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
49
        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
49
        if ( options.disableTests == false ) {
2796
49
            tests::test(op, result.second);
2797
49
        }
2798
2799
49
        postprocess(module, op, result);
2800
49
    }
2801
2802
46
    if ( options.noCompare == false ) {
2803
14
        compare(operations, results, data, size);
2804
14
    }
2805
46
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
34
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
34
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
34
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
579
    do {
2691
579
        auto op = getOp(&parentDs, data, size);
2692
579
        auto module = getModule(parentDs);
2693
579
        if ( module == nullptr ) {
2694
549
            continue;
2695
549
        }
2696
2697
30
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
30
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
0
            break;
2702
0
        }
2703
579
    } while ( parentDs.Get<bool>() == true );
2704
2705
34
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
32
#if 1
2711
32
    {
2712
32
        std::set<uint64_t> moduleIDs;
2713
32
        for (const auto& m : modules ) {
2714
4
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
4
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
4
            moduleIDs.insert(moduleID);
2722
4
        }
2723
2724
32
        std::set<uint64_t> operationModuleIDs;
2725
32
        for (const auto& op : operations) {
2726
6
            operationModuleIDs.insert(op.first->ID);
2727
6
        }
2728
2729
32
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
32
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
32
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
32
        for (const auto& id : addModuleIDs) {
2734
2
            operations.push_back({ modules.at(id), operations[0].second});
2735
2
        }
2736
32
    }
2737
32
#endif
2738
2739
32
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
32
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
40
    for (size_t i = 0; i < operations.size(); i++) {
2747
8
        auto& operation = operations[i];
2748
2749
8
        auto& module = operation.first;
2750
8
        auto& op = operation.second;
2751
2752
8
        if ( i > 0 ) {
2753
6
            auto& prevModule = operations[i-1].first;
2754
6
            auto& prevOp = operations[i].second;
2755
2756
6
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
4
                auto& curModifier = op.modifier.GetVectorPtr();
2758
4
                if ( curModifier.size() == 0 ) {
2759
0
                    for (size_t j = 0; j < 512; j++) {
2760
0
                        curModifier.push_back(1);
2761
0
                    }
2762
4
                } else {
2763
5
                    for (auto& c : curModifier) {
2764
5
                        c++;
2765
5
                    }
2766
4
                }
2767
4
            }
2768
6
        }
2769
2770
8
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
8
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
8
        const auto& result = results.back();
2777
2778
8
        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
8
        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
8
        if ( options.disableTests == false ) {
2796
8
            tests::test(op, result.second);
2797
8
        }
2798
2799
8
        postprocess(module, op, result);
2800
8
    }
2801
2802
32
    if ( options.noCompare == false ) {
2803
2
        compare(operations, results, data, size);
2804
2
    }
2805
32
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
35
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
35
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
35
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
368
    do {
2691
368
        auto op = getOp(&parentDs, data, size);
2692
368
        auto module = getModule(parentDs);
2693
368
        if ( module == nullptr ) {
2694
315
            continue;
2695
315
        }
2696
2697
53
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
53
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
3
            break;
2702
3
        }
2703
365
    } while ( parentDs.Get<bool>() == true );
2704
2705
35
    if ( operations.empty() == true ) {
2706
0
        return;
2707
0
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
35
#if 1
2711
35
    {
2712
35
        std::set<uint64_t> moduleIDs;
2713
35
        for (const auto& m : modules ) {
2714
18
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
18
            moduleIDs.insert(moduleID);
2722
18
        }
2723
2724
35
        std::set<uint64_t> operationModuleIDs;
2725
35
        for (const auto& op : operations) {
2726
29
            operationModuleIDs.insert(op.first->ID);
2727
29
        }
2728
2729
35
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
35
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
35
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
35
        for (const auto& id : addModuleIDs) {
2734
6
            operations.push_back({ modules.at(id), operations[0].second});
2735
6
        }
2736
35
    }
2737
35
#endif
2738
2739
35
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
35
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
70
    for (size_t i = 0; i < operations.size(); i++) {
2747
35
        auto& operation = operations[i];
2748
2749
35
        auto& module = operation.first;
2750
35
        auto& op = operation.second;
2751
2752
35
        if ( i > 0 ) {
2753
26
            auto& prevModule = operations[i-1].first;
2754
26
            auto& prevOp = operations[i].second;
2755
2756
26
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
17
                auto& curModifier = op.modifier.GetVectorPtr();
2758
17
                if ( curModifier.size() == 0 ) {
2759
5.64k
                    for (size_t j = 0; j < 512; j++) {
2760
5.63k
                        curModifier.push_back(1);
2761
5.63k
                    }
2762
11
                } else {
2763
89
                    for (auto& c : curModifier) {
2764
89
                        c++;
2765
89
                    }
2766
6
                }
2767
17
            }
2768
26
        }
2769
2770
35
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
35
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
35
        const auto& result = results.back();
2777
2778
35
        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
35
        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
35
        if ( options.disableTests == false ) {
2796
35
            tests::test(op, result.second);
2797
35
        }
2798
2799
35
        postprocess(module, op, result);
2800
35
    }
2801
2802
35
    if ( options.noCompare == false ) {
2803
9
        compare(operations, results, data, size);
2804
9
    }
2805
35
}
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 */