Coverage Report

Created: 2023-02-22 06:14

/src/cryptofuzz/executor.cpp
Line
Count
Source (jump to first uncovered line)
1
#include "executor.h"
2
#include "tests.h"
3
#include "mutatorpool.h"
4
#include "config.h"
5
#include <cryptofuzz/util.h>
6
#include <fuzzing/memory.hpp>
7
#include <algorithm>
8
#include <set>
9
#include <boost/multiprecision/cpp_int.hpp>
10
11
uint32_t PRNG(void);
12
13
90.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
6.16k
template<> void ExecutorBase<component::Digest, operation::Digest>::postprocess(std::shared_ptr<Module> module, operation::Digest& op, const ExecutorBase<component::Digest, operation::Digest>::ResultPair& result) const {
52
6.16k
    (void)module;
53
6.16k
    (void)op;
54
55
6.16k
    if ( result.second != std::nullopt ) {
56
2.45k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
2.45k
    }
58
6.16k
}
59
60
6.16k
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
6.16k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
6.16k
    return module->OpDigest(op);
64
6.16k
}
65
66
/* Specialization for operation::HMAC */
67
3.06k
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
3.06k
    (void)module;
69
3.06k
    (void)op;
70
71
3.06k
    if ( result.second != std::nullopt ) {
72
1.26k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
1.26k
    }
74
3.06k
}
75
76
3.06k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
3.06k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
3.06k
    return module->OpHMAC(op);
80
3.06k
}
81
82
/* Specialization for operation::UMAC */
83
3.19k
template<> void ExecutorBase<component::MAC, operation::UMAC>::postprocess(std::shared_ptr<Module> module, operation::UMAC& op, const ExecutorBase<component::MAC, operation::UMAC>::ResultPair& result) const {
84
3.19k
    (void)module;
85
3.19k
    (void)op;
86
87
3.19k
    if ( result.second != std::nullopt ) {
88
1.62k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
1.62k
    }
90
3.19k
}
91
92
3.19k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
3.19k
    return module->OpUMAC(op);
94
3.19k
}
95
96
/* Specialization for operation::CMAC */
97
3.47k
template<> void ExecutorBase<component::MAC, operation::CMAC>::postprocess(std::shared_ptr<Module> module, operation::CMAC& op, const ExecutorBase<component::MAC, operation::CMAC>::ResultPair& result) const {
98
3.47k
    (void)module;
99
3.47k
    (void)op;
100
101
3.47k
    if ( result.second != std::nullopt ) {
102
1.68k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
1.68k
    }
104
3.47k
}
105
106
3.47k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
3.47k
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
3.47k
    return module->OpCMAC(op);
110
3.47k
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
15.6k
template<> void ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::postprocess(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op, const ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::ResultPair& result) const {
114
15.6k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
15.6k
    if ( result.second != std::nullopt ) {
119
5.42k
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
5.42k
        if ( result.second->tag != std::nullopt ) {
121
1.90k
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
1.90k
        }
123
5.42k
    }
124
125
15.6k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
4.64k
        using fuzzing::datasource::ID;
127
128
4.64k
        bool tryDecrypt = true;
129
130
4.64k
        if ( module->ID == CF_MODULE("OpenSSL") ) {
131
0
            switch ( op.cipher.cipherType.Get() ) {
132
0
                case    ID("Cryptofuzz/Cipher/AES_128_OCB"):
133
0
                case    ID("Cryptofuzz/Cipher/AES_256_OCB"):
134
0
                    tryDecrypt = false;
135
0
                    break;
136
0
                case    ID("Cryptofuzz/Cipher/AES_128_GCM"):
137
0
                case    ID("Cryptofuzz/Cipher/AES_192_GCM"):
138
0
                case    ID("Cryptofuzz/Cipher/AES_256_GCM"):
139
0
                case    ID("Cryptofuzz/Cipher/AES_128_CCM"):
140
0
                case    ID("Cryptofuzz/Cipher/AES_192_CCM"):
141
0
                case    ID("Cryptofuzz/Cipher/AES_256_CCM"):
142
0
                case    ID("Cryptofuzz/Cipher/ARIA_128_CCM"):
143
0
                case    ID("Cryptofuzz/Cipher/ARIA_192_CCM"):
144
0
                case    ID("Cryptofuzz/Cipher/ARIA_256_CCM"):
145
0
                case    ID("Cryptofuzz/Cipher/ARIA_128_GCM"):
146
0
                case    ID("Cryptofuzz/Cipher/ARIA_192_GCM"):
147
0
                case    ID("Cryptofuzz/Cipher/ARIA_256_GCM"):
148
0
                    if ( op.tagSize == std::nullopt ) {
149
                        /* OpenSSL fails to decrypt its own CCM and GCM ciphertexts if
150
                         * a tag is not included
151
                         */
152
0
                        tryDecrypt = false;
153
0
                    }
154
0
                    break;
155
0
            }
156
0
        }
157
158
4.64k
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
4.64k
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
4.64k
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
4.64k
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
4.64k
                    op.cleartext.GetSize() + 32,
171
172
4.64k
                    op.aad,
173
174
                    /* Empty modifier */
175
4.64k
                    {});
176
177
4.64k
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
4.64k
            if ( cleartext == std::nullopt ) {
180
                /* Decryption failed, OpSymmetricDecrypt() returned std::nullopt */
181
0
                printf("Cannot decrypt ciphertext\n\n");
182
0
                printf("Operation:\n%s\n", op.ToString().c_str());
183
0
                printf("Ciphertext: %s\n", util::HexDump(result.second->ciphertext.Get()).c_str());
184
0
                printf("Tag: %s\n", result.second->tag ? util::HexDump(result.second->tag->Get()).c_str() : "nullopt");
185
0
                abort(
186
0
                        {module->name},
187
0
                        op.Name(),
188
0
                        op.GetAlgorithmString(),
189
0
                        "cannot decrypt ciphertext"
190
0
                );
191
4.64k
            } else if ( cleartext->Get() != op.cleartext.Get() ) {
192
                /* Decryption ostensibly succeeded, but the cleartext returned by OpSymmetricDecrypt()
193
                 * does not match to original cleartext */
194
195
0
                printf("Cannot decrypt ciphertext (but decryption ostensibly succeeded)\n\n");
196
0
                printf("Operation:\n%s\n", op.ToString().c_str());
197
0
                printf("Ciphertext: %s\n", util::HexDump(result.second->ciphertext.Get()).c_str());
198
0
                printf("Tag: %s\n", result.second->tag ? util::HexDump(result.second->tag->Get()).c_str() : "nullopt");
199
0
                printf("Purported cleartext: %s\n", util::HexDump(cleartext->Get()).c_str());
200
0
                abort(
201
0
                        {module->name},
202
0
                        op.Name(),
203
0
                        op.GetAlgorithmString(),
204
0
                        "cannot decrypt ciphertext"
205
0
                );
206
0
            }
207
4.64k
        }
208
4.64k
    }
209
15.6k
}
210
211
15.6k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
15.6k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
15.6k
    return module->OpSymmetricEncrypt(op);
215
15.6k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
12.1k
template<> void ExecutorBase<component::MAC, operation::SymmetricDecrypt>::postprocess(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op, const ExecutorBase<component::MAC, operation::SymmetricDecrypt>::ResultPair& result) const {
219
12.1k
    (void)module;
220
12.1k
    (void)op;
221
222
12.1k
    if ( result.second != std::nullopt ) {
223
808
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
808
    }
225
12.1k
}
226
227
12.1k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
12.1k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
12.1k
    return module->OpSymmetricDecrypt(op);
231
12.1k
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
779
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
779
    (void)module;
236
779
    (void)op;
237
238
779
    if ( result.second != std::nullopt ) {
239
213
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
213
    }
241
779
}
242
243
779
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
779
    return module->OpKDF_SCRYPT(op);
245
779
}
246
247
/* Specialization for operation::KDF_HKDF */
248
6.08k
template<> void ExecutorBase<component::Key, operation::KDF_HKDF>::postprocess(std::shared_ptr<Module> module, operation::KDF_HKDF& op, const ExecutorBase<component::Key, operation::KDF_HKDF>::ResultPair& result) const {
249
6.08k
    (void)module;
250
6.08k
    (void)op;
251
252
6.08k
    if ( result.second != std::nullopt ) {
253
2.44k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
2.44k
    }
255
6.08k
}
256
257
6.08k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
6.08k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
6.08k
    return module->OpKDF_HKDF(op);
261
6.08k
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
414
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
414
    (void)module;
266
414
    (void)op;
267
268
414
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
414
}
272
273
414
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
414
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
414
    return module->OpKDF_PBKDF(op);
277
414
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
491
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
491
    (void)module;
282
491
    (void)op;
283
284
491
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
491
}
288
289
491
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
491
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
491
    return module->OpKDF_PBKDF1(op);
293
491
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
1.74k
template<> void ExecutorBase<component::Key, operation::KDF_PBKDF2>::postprocess(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op, const ExecutorBase<component::Key, operation::KDF_PBKDF2>::ResultPair& result) const {
297
1.74k
    (void)module;
298
1.74k
    (void)op;
299
300
1.74k
    if ( result.second != std::nullopt ) {
301
806
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
806
    }
303
1.74k
}
304
305
1.74k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
1.74k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
1.74k
    return module->OpKDF_PBKDF2(op);
309
1.74k
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
642
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
642
    (void)module;
314
642
    (void)op;
315
316
642
    if ( result.second != std::nullopt ) {
317
315
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
315
    }
319
642
}
320
321
642
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
642
    return module->OpKDF_ARGON2(op);
323
642
}
324
325
/* Specialization for operation::KDF_SSH */
326
406
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
406
    (void)module;
328
406
    (void)op;
329
330
406
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
406
}
334
335
406
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
406
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
406
    return module->OpKDF_SSH(op);
339
406
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
662
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
662
    (void)module;
344
662
    (void)op;
345
346
662
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
662
}
350
351
662
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
662
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
662
    return module->OpKDF_TLS1_PRF(op);
355
662
}
356
357
/* Specialization for operation::KDF_X963 */
358
349
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
349
    (void)module;
360
349
    (void)op;
361
362
349
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
349
}
366
367
349
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
349
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
349
    return module->OpKDF_X963(op);
371
349
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
147
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
147
    (void)module;
376
147
    (void)op;
377
378
147
    if ( result.second != std::nullopt ) {
379
33
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
33
    }
381
147
}
382
383
147
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
147
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
147
    return module->OpKDF_BCRYPT(op);
387
147
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
1.53k
template<> void ExecutorBase<component::Key, operation::KDF_SP_800_108>::postprocess(std::shared_ptr<Module> module, operation::KDF_SP_800_108& op, const ExecutorBase<component::Key, operation::KDF_SP_800_108>::ResultPair& result) const {
391
1.53k
    (void)module;
392
1.53k
    (void)op;
393
394
1.53k
    if ( result.second != std::nullopt ) {
395
694
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
694
    }
397
1.53k
}
398
399
1.53k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SP_800_108>::callModule(std::shared_ptr<Module> module, operation::KDF_SP_800_108& op) const {
400
1.53k
    if ( op.mech.mode == true ) {
401
995
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
995
    }
403
404
1.53k
    return module->OpKDF_SP_800_108(op);
405
1.53k
}
406
407
408
/* Specialization for operation::ECC_PrivateToPublic */
409
2.51k
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op, const ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::ResultPair& result) const {
410
2.51k
    (void)module;
411
412
2.51k
    if ( result.second != std::nullopt  ) {
413
519
        const auto curveID = op.curveType.Get();
414
519
        const auto privkey = op.priv.ToTrimmedString();
415
519
        const auto pub_x = result.second->first.ToTrimmedString();
416
519
        const auto pub_y = result.second->second.ToTrimmedString();
417
418
519
        Pool_CurvePrivkey.Set({ curveID, privkey });
419
519
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
420
519
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
421
422
519
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
423
519
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
424
519
    }
425
2.51k
}
426
427
2.51k
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op) const {
428
2.51k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
429
430
2.51k
    const size_t size = op.priv.ToTrimmedString().size();
431
432
2.51k
    if ( size == 0 || size > 4096 ) {
433
0
        return std::nullopt;
434
0
    }
435
436
2.51k
    return module->OpECC_PrivateToPublic(op);
437
2.51k
}
438
439
/* Specialization for operation::ECC_ValidatePubkey */
440
527
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
527
    (void)module;
442
527
    (void)op;
443
527
    (void)result;
444
527
}
445
446
527
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
447
527
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
448
449
527
    return module->OpECC_ValidatePubkey(op);
450
527
}
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
49
void ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DH_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
457
49
    (void)operations;
458
49
    (void)results;
459
49
    (void)data;
460
49
    (void)size;
461
49
}
462
463
1.48k
template<> void ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op, const ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::ResultPair& result) const {
464
1.48k
    (void)module;
465
466
1.48k
    if ( result.second != std::nullopt  ) {
467
272
        const auto curveID = op.curveType.Get();
468
272
        const auto privkey = result.second->priv.ToTrimmedString();
469
272
        const auto pub_x = result.second->pub.first.ToTrimmedString();
470
272
        const auto pub_y = result.second->pub.second.ToTrimmedString();
471
472
272
        Pool_CurvePrivkey.Set({ curveID, privkey });
473
272
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
474
272
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
475
272
    }
476
1.48k
}
477
478
1.48k
template<> std::optional<component::ECC_KeyPair> ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op) const {
479
1.48k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
480
481
1.48k
    return module->OpECC_GenerateKeyPair(op);
482
1.48k
}
483
484
/* Specialization for operation::ECCSI_Sign */
485
186
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
186
    (void)module;
487
488
186
    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
186
}
531
532
186
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
186
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
534
186
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
535
536
186
    const size_t size = op.priv.ToTrimmedString().size();
537
538
186
    if ( size == 0 || size > 4096 ) {
539
2
        return std::nullopt;
540
2
    }
541
542
184
    return module->OpECCSI_Sign(op);
543
186
}
544
545
/* Specialization for operation::ECDSA_Sign */
546
1.62k
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
1.62k
    (void)module;
548
549
1.62k
    if ( result.second != std::nullopt  ) {
550
741
        const auto curveID = op.curveType.Get();
551
741
        const auto cleartext = op.cleartext.ToHex();
552
741
        const auto pub_x = result.second->pub.first.ToTrimmedString();
553
741
        const auto pub_y = result.second->pub.second.ToTrimmedString();
554
741
        const auto sig_r = result.second->signature.first.ToTrimmedString();
555
741
        const auto sig_s = result.second->signature.second.ToTrimmedString();
556
557
741
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
558
741
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
559
741
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
560
561
741
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
562
741
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
563
741
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
564
741
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
565
566
741
        {
567
741
            auto opVerify = operation::ECDSA_Verify(
568
741
                    op,
569
741
                    *(result.second),
570
741
                    op.modifier);
571
572
741
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
573
741
            CF_ASSERT(
574
741
                    verifyResult == std::nullopt ||
575
741
                    *verifyResult == true,
576
741
                    "Cannot verify generated signature");
577
741
        }
578
741
    }
579
1.62k
}
580
581
1.62k
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
1.62k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
583
1.62k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
584
585
1.62k
    const size_t size = op.priv.ToTrimmedString().size();
586
587
1.62k
    if ( size == 0 || size > 4096 ) {
588
2
        return std::nullopt;
589
2
    }
590
591
1.62k
    return module->OpECDSA_Sign(op);
592
1.62k
}
593
594
/* Specialization for operation::ECGDSA_Sign */
595
508
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
508
    (void)module;
597
598
508
    if ( result.second != std::nullopt  ) {
599
68
        const auto curveID = op.curveType.Get();
600
68
        const auto cleartext = op.cleartext.ToHex();
601
68
        const auto pub_x = result.second->pub.first.ToTrimmedString();
602
68
        const auto pub_y = result.second->pub.second.ToTrimmedString();
603
68
        const auto sig_r = result.second->signature.first.ToTrimmedString();
604
68
        const auto sig_s = result.second->signature.second.ToTrimmedString();
605
606
68
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
607
68
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
608
68
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
609
610
68
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
611
68
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
612
68
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
613
68
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
614
68
    }
615
508
}
616
617
508
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
508
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
619
508
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
620
621
508
    const size_t size = op.priv.ToTrimmedString().size();
622
623
508
    if ( size == 0 || size > 4096 ) {
624
0
        return std::nullopt;
625
0
    }
626
627
508
    return module->OpECGDSA_Sign(op);
628
508
}
629
630
/* Specialization for operation::ECRDSA_Sign */
631
149
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
149
    (void)module;
633
634
149
    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
149
}
652
653
149
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
149
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
655
149
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
656
657
149
    const size_t size = op.priv.ToTrimmedString().size();
658
659
149
    if ( size == 0 || size > 4096 ) {
660
0
        return std::nullopt;
661
0
    }
662
663
149
    return module->OpECRDSA_Sign(op);
664
149
}
665
666
/* Specialization for operation::Schnorr_Sign */
667
181
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
181
    (void)module;
669
670
181
    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
181
}
688
689
181
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
181
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
691
181
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
692
693
181
    const size_t size = op.priv.ToTrimmedString().size();
694
695
181
    if ( size == 0 || size > 4096 ) {
696
0
        return std::nullopt;
697
0
    }
698
699
181
    return module->OpSchnorr_Sign(op);
700
181
}
701
702
/* Specialization for operation::ECCSI_Verify */
703
144
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
144
    (void)module;
705
144
    (void)op;
706
144
    (void)result;
707
144
}
708
709
144
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
710
144
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
711
144
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
712
713
144
    return module->OpECCSI_Verify(op);
714
144
}
715
716
/* Specialization for operation::ECDSA_Verify */
717
863
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
863
    (void)module;
719
863
    (void)op;
720
863
    (void)result;
721
863
}
722
723
863
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
724
863
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
863
    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
863
    return module->OpECDSA_Verify(op);
738
863
}
739
740
/* Specialization for operation::ECGDSA_Verify */
741
354
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
354
    (void)module;
743
354
    (void)op;
744
354
    (void)result;
745
354
}
746
747
354
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
748
354
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
749
354
    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
354
    return module->OpECGDSA_Verify(op);
762
354
}
763
764
/* Specialization for operation::ECRDSA_Verify */
765
113
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
113
    (void)module;
767
113
    (void)op;
768
113
    (void)result;
769
113
}
770
771
113
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
772
113
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
773
113
    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
113
    return module->OpECRDSA_Verify(op);
786
113
}
787
788
/* Specialization for operation::Schnorr_Verify */
789
135
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
135
    (void)module;
791
135
    (void)op;
792
135
    (void)result;
793
135
}
794
795
135
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
796
135
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
797
135
    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
135
    return module->OpSchnorr_Verify(op);
810
135
}
811
812
1.47k
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Recover& op, const ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::ResultPair& result) const {
813
1.47k
    (void)module;
814
1.47k
    (void)op;
815
1.47k
    (void)result;
816
1.47k
}
817
818
1.47k
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Recover& op) const {
819
1.47k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
820
1.47k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
821
822
1.47k
    return module->OpECDSA_Recover(op);
823
1.47k
}
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
176
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
176
    (void)module;
835
176
    (void)op;
836
176
    (void)result;
837
176
}
838
839
176
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
840
176
    const std::vector<size_t> sizes = {
841
176
        op.parameters.p.ToTrimmedString().size(),
842
176
        op.parameters.q.ToTrimmedString().size(),
843
176
        op.parameters.g.ToTrimmedString().size(),
844
176
        op.pub.ToTrimmedString().size(),
845
176
        op.signature.first.ToTrimmedString().size(),
846
176
        op.signature.second.ToTrimmedString().size(),
847
176
    };
848
849
1.02k
    for (const auto& size : sizes) {
850
1.02k
        if ( size == 0 || size > 4096 ) {
851
11
            return std::nullopt;
852
11
        }
853
1.02k
    }
854
855
165
    return module->OpDSA_Verify(op);
856
176
}
857
858
/* Specialization for operation::DSA_Sign */
859
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
860
template <>
861
53
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
53
    (void)operations;
863
53
    (void)results;
864
53
    (void)data;
865
53
    (void)size;
866
53
}
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
174
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
174
    (void)module;
876
174
    (void)op;
877
174
    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
174
}
900
901
174
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
174
    const std::vector<size_t> sizes = {
903
174
        op.parameters.p.ToTrimmedString().size(),
904
174
        op.parameters.q.ToTrimmedString().size(),
905
174
        op.parameters.g.ToTrimmedString().size(),
906
174
        op.priv.ToTrimmedString().size(),
907
174
    };
908
909
687
    for (const auto& size : sizes) {
910
687
        if ( size == 0 || size > 4096 ) {
911
9
            return std::nullopt;
912
9
        }
913
687
    }
914
915
165
    return module->OpDSA_Sign(op);
916
174
}
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
139
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
139
    (void)result;
929
139
    (void)module;
930
139
    if ( result.second != std::nullopt ) {
931
        //Pool_DSA_PubPriv.Set({pub, priv});
932
0
    }
933
139
}
934
935
139
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
936
139
    return module->OpDSA_PrivateToPublic(op);
937
139
}
938
939
/* Specialization for operation::DSA_GenerateKeyPair */
940
941
/* Do not compare DSA_GenerateKeyPair results, because the result can be produced indeterministically */
942
template <>
943
56
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 {
944
56
    (void)operations;
945
56
    (void)results;
946
56
    (void)data;
947
56
    (void)size;
948
56
}
949
950
0
template<> void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateKeyPair& op) const {
951
0
    (void)moduleID;
952
0
    (void)op;
953
954
    /* TODO */
955
0
}
956
957
177
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 {
958
177
    (void)result;
959
177
    (void)module;
960
177
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
961
0
        const auto priv = result.second->first.ToTrimmedString();
962
0
        const auto pub = result.second->second.ToTrimmedString();
963
964
0
        Pool_DSA_PubPriv.Set({pub, priv});
965
0
    }
966
177
}
967
968
177
template<> std::optional<component::DSA_KeyPair> ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateKeyPair& op) const {
969
177
    const std::vector<size_t> sizes = {
970
177
        op.p.ToTrimmedString().size(),
971
177
        op.q.ToTrimmedString().size(),
972
177
        op.g.ToTrimmedString().size(),
973
177
    };
974
975
529
    for (const auto& size : sizes) {
976
529
        if ( size == 0 || size > 4096 ) {
977
11
            return std::nullopt;
978
11
        }
979
529
    }
980
981
166
    return module->OpDSA_GenerateKeyPair(op);
982
177
}
983
984
/* Specialization for operation::DSA_GenerateParameters */
985
986
/* Do not compare DSA_GenerateParameters results, because the result can be produced indeterministically */
987
template <>
988
35
void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DSA_GenerateParameters> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
989
35
    (void)operations;
990
35
    (void)results;
991
35
    (void)data;
992
35
    (void)size;
993
35
}
994
995
0
template<> void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateParameters& op) const {
996
0
    (void)moduleID;
997
0
    (void)op;
998
999
    /* TODO */
1000
0
}
1001
1002
122
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 {
1003
122
    (void)result;
1004
122
    (void)module;
1005
122
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1006
0
        const auto P = result.second->p.ToTrimmedString();
1007
0
        const auto Q = result.second->q.ToTrimmedString();
1008
0
        const auto G = result.second->g.ToTrimmedString();
1009
1010
0
        Pool_DSA_PQG.Set({P, Q, G});
1011
1012
0
        if ( P.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(P); }
1013
0
        if ( Q.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(Q); }
1014
0
        if ( G.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(G); }
1015
0
    }
1016
122
}
1017
1018
122
template<> std::optional<component::DSA_Parameters> ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op) const {
1019
122
    return module->OpDSA_GenerateParameters(op);
1020
122
}
1021
1022
/* Specialization for operation::ECDH_Derive */
1023
129
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 {
1024
129
    (void)module;
1025
129
    (void)op;
1026
129
    (void)result;
1027
129
}
1028
1029
129
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1030
129
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1031
1032
129
    return module->OpECDH_Derive(op);
1033
129
}
1034
1035
/* Specialization for operation::ECIES_Encrypt */
1036
template <>
1037
29
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 {
1038
29
    (void)operations;
1039
29
    (void)results;
1040
29
    (void)data;
1041
29
    (void)size;
1042
29
}
1043
104
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 {
1044
104
    (void)module;
1045
104
    (void)op;
1046
104
    (void)result;
1047
104
}
1048
1049
104
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1050
104
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1051
1052
104
    return module->OpECIES_Encrypt(op);
1053
104
}
1054
1055
/* Specialization for operation::ECIES_Decrypt */
1056
147
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 {
1057
147
    (void)module;
1058
147
    (void)op;
1059
147
    (void)result;
1060
147
}
1061
1062
147
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1063
147
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1064
1065
147
    return module->OpECIES_Decrypt(op);
1066
147
}
1067
1068
/* Specialization for operation::ECC_Point_Add */
1069
268
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 {
1070
268
    (void)module;
1071
1072
268
    if ( result.second != std::nullopt  ) {
1073
33
        const auto curveID = op.curveType.Get();
1074
33
        const auto x = result.second->first.ToTrimmedString();
1075
33
        const auto y = result.second->second.ToTrimmedString();
1076
1077
33
        Pool_CurveECC_Point.Set({ curveID, x, y });
1078
1079
33
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1080
33
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1081
33
    }
1082
268
}
1083
1084
268
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 {
1085
268
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1086
1087
268
    return module->OpECC_Point_Add(op);
1088
268
}
1089
1090
/* Specialization for operation::ECC_Point_Mul */
1091
2.00k
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 {
1092
2.00k
    (void)module;
1093
1094
2.00k
    if ( result.second != std::nullopt  ) {
1095
145
        const auto curveID = op.curveType.Get();
1096
145
        const auto x = result.second->first.ToTrimmedString();
1097
145
        const auto y = result.second->second.ToTrimmedString();
1098
1099
145
        Pool_CurveECC_Point.Set({ curveID, x, y });
1100
1101
145
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1102
145
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1103
145
    }
1104
2.00k
}
1105
1106
2.00k
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 {
1107
2.00k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1108
1109
2.00k
    return module->OpECC_Point_Mul(op);
1110
2.00k
}
1111
1112
/* Specialization for operation::ECC_Point_Neg */
1113
218
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Neg& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::ResultPair& result) const {
1114
218
    (void)module;
1115
1116
218
    if ( result.second != std::nullopt  ) {
1117
35
        const auto curveID = op.curveType.Get();
1118
35
        const auto x = result.second->first.ToTrimmedString();
1119
35
        const auto y = result.second->second.ToTrimmedString();
1120
1121
35
        Pool_CurveECC_Point.Set({ curveID, x, y });
1122
1123
35
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1124
35
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1125
35
    }
1126
218
}
1127
1128
218
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Neg& op) const {
1129
218
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1130
1131
218
    return module->OpECC_Point_Neg(op);
1132
218
}
1133
1134
/* Specialization for operation::ECC_Point_Dbl */
1135
218
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 {
1136
218
    (void)module;
1137
1138
218
    if ( result.second != std::nullopt  ) {
1139
25
        const auto curveID = op.curveType.Get();
1140
25
        const auto x = result.second->first.ToTrimmedString();
1141
25
        const auto y = result.second->second.ToTrimmedString();
1142
1143
25
        Pool_CurveECC_Point.Set({ curveID, x, y });
1144
1145
25
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1146
25
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1147
25
    }
1148
218
}
1149
1150
218
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 {
1151
218
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1152
1153
218
    return module->OpECC_Point_Dbl(op);
1154
218
}
1155
1156
/* Specialization for operation::ECC_Point_Cmp */
1157
265
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 {
1158
265
    (void)module;
1159
265
    (void)result;
1160
265
}
1161
1162
265
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1163
265
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1164
1165
265
    return module->OpECC_Point_Cmp(op);
1166
265
}
1167
1168
/* Specialization for operation::DH_Derive */
1169
616
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 {
1170
616
    (void)module;
1171
616
    (void)op;
1172
616
    (void)result;
1173
616
}
1174
1175
616
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1176
616
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1177
606
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1178
596
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1179
587
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1180
1181
578
    return module->OpDH_Derive(op);
1182
587
}
1183
1184
/* Specialization for operation::DH_GenerateKeyPair */
1185
175
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 {
1186
175
    (void)result;
1187
175
    (void)op;
1188
175
    (void)module;
1189
1190
175
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1191
0
        const auto priv = result.second->first.ToTrimmedString();
1192
0
        const auto pub = result.second->second.ToTrimmedString();
1193
1194
0
        Pool_DH_PrivateKey.Set(priv);
1195
0
        Pool_DH_PublicKey.Set(pub);
1196
0
    }
1197
175
}
1198
1199
175
template<> std::optional<component::DH_KeyPair> ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DH_GenerateKeyPair& op) const {
1200
175
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1201
164
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1202
1203
154
    return module->OpDH_GenerateKeyPair(op);
1204
164
}
1205
1206
/* Specialization for operation::BignumCalc */
1207
17.2k
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 {
1208
17.2k
    (void)module;
1209
17.2k
    (void)op;
1210
1211
17.2k
    if ( result.second != std::nullopt  ) {
1212
4.12k
        const auto bignum = result.second->ToTrimmedString();
1213
1214
4.12k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1215
4.10k
            Pool_Bignum.Set(bignum);
1216
4.10k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1217
644
                Pool_Bignum_Primes.Set(bignum);
1218
644
            }
1219
4.10k
        }
1220
4.12k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1221
205
            if ( bignum == "1" ) {
1222
105
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1223
105
            }
1224
205
        }
1225
4.12k
    }
1226
17.2k
}
1227
1228
17.2k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1229
17.2k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1230
1231
    /* Prevent timeouts */
1232
17.2k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1233
17.2k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1234
17.2k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1235
17.1k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1236
1237
17.1k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1238
1.19k
        return std::nullopt;
1239
1.19k
    }
1240
1241
15.9k
    switch ( op.calcOp.Get() ) {
1242
83
        case    CF_CALCOP("SetBit(A,B)"):
1243
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1244
83
            if ( op.bn1.GetSize() > 4 ) {
1245
10
                return std::nullopt;
1246
10
            }
1247
73
            break;
1248
80
        case    CF_CALCOP("Exp(A,B)"):
1249
80
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1250
20
                return std::nullopt;
1251
20
            }
1252
60
            break;
1253
60
        case    CF_CALCOP("ModLShift(A,B,C)"):
1254
20
            if ( op.bn1.GetSize() > 4 ) {
1255
10
                return std::nullopt;
1256
10
            }
1257
10
            break;
1258
57
        case    CF_CALCOP("Exp2(A)"):
1259
57
            if ( op.bn0.GetSize() > 4 ) {
1260
10
                return std::nullopt;
1261
10
            }
1262
47
            break;
1263
15.9k
    }
1264
1265
15.9k
    return module->OpBignumCalc(op);
1266
15.9k
}
1267
1268
/* Specialization for operation::BignumCalc_Fp2 */
1269
218
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 {
1270
218
    (void)module;
1271
218
    (void)op;
1272
1273
218
    if ( result.second != std::nullopt  ) {
1274
0
        const auto bignum_first = result.second->first.ToTrimmedString();
1275
0
        const auto bignum_second = result.second->second.ToTrimmedString();
1276
1277
0
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1278
0
            Pool_Bignum.Set(bignum_first);
1279
0
        }
1280
0
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1281
0
            Pool_Bignum.Set(bignum_second);
1282
0
        }
1283
0
    }
1284
218
}
1285
1286
218
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1287
218
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1288
1289
    /* Prevent timeouts */
1290
218
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1291
209
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1292
200
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1293
191
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1294
182
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1295
173
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1296
164
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1297
155
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1298
1299
146
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1300
0
        return std::nullopt;
1301
0
    }
1302
1303
146
    return module->OpBignumCalc_Fp2(op);
1304
146
}
1305
1306
/* Specialization for operation::BignumCalc_Fp12 */
1307
728
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 {
1308
728
    (void)module;
1309
728
    (void)op;
1310
1311
728
    if ( result.second != std::nullopt  ) {
1312
0
        Pool_Fp12.Set({
1313
0
                result.second->bn1.ToTrimmedString(),
1314
0
                result.second->bn2.ToTrimmedString(),
1315
0
                result.second->bn3.ToTrimmedString(),
1316
0
                result.second->bn4.ToTrimmedString(),
1317
0
                result.second->bn5.ToTrimmedString(),
1318
0
                result.second->bn6.ToTrimmedString(),
1319
0
                result.second->bn7.ToTrimmedString(),
1320
0
                result.second->bn8.ToTrimmedString(),
1321
0
                result.second->bn9.ToTrimmedString(),
1322
0
                result.second->bn10.ToTrimmedString(),
1323
0
                result.second->bn11.ToTrimmedString(),
1324
0
                result.second->bn12.ToTrimmedString()
1325
0
        });
1326
        /* TODO */
1327
#if 0
1328
        const auto bignum_first = result.second->first.ToTrimmedString();
1329
        const auto bignum_second = result.second->second.ToTrimmedString();
1330
1331
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1332
            Pool_Bignum.Set(bignum_first);
1333
        }
1334
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1335
            Pool_Bignum.Set(bignum_second);
1336
        }
1337
#endif
1338
0
    }
1339
728
}
1340
1341
728
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1342
728
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1343
1344
    /* Prevent timeouts */
1345
728
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1346
717
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1347
706
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1348
695
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1349
684
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1350
674
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1351
665
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1352
654
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1353
645
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1354
636
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1355
625
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1356
616
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1357
1358
607
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1359
596
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1360
585
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1361
574
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1362
563
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1363
552
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1364
541
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1365
531
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1366
520
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1367
511
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1368
500
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1369
489
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1370
1371
478
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1372
467
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1373
456
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1374
447
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1375
436
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1376
427
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1377
416
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1378
405
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1379
394
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1380
383
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1381
374
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1382
365
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1383
1384
356
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1385
347
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1386
338
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1387
327
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1388
316
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1389
305
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1390
296
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1391
285
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1392
274
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1393
263
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1394
254
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1395
243
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1396
1397
234
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1398
0
        return std::nullopt;
1399
0
    }
1400
1401
234
    return module->OpBignumCalc_Fp12(op);
1402
234
}
1403
1404
/* Specialization for operation::BLS_PrivateToPublic */
1405
150
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 {
1406
150
    (void)module;
1407
1408
150
    if ( result.second != std::nullopt  ) {
1409
0
        const auto curveID = op.curveType.Get();
1410
0
        const auto g1_x = result.second->first.ToTrimmedString();
1411
0
        const auto g1_y = result.second->second.ToTrimmedString();
1412
1413
0
        G1AddToPool(curveID, g1_x, g1_y);
1414
1415
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1416
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1417
0
    }
1418
150
}
1419
1420
150
template<> std::optional<component::BLS_PublicKey> ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic& op) const {
1421
150
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1422
1423
150
    const size_t size = op.priv.ToTrimmedString().size();
1424
1425
150
    if ( size == 0 || size > 4096 ) {
1426
10
        return std::nullopt;
1427
10
    }
1428
1429
140
    return module->OpBLS_PrivateToPublic(op);
1430
150
}
1431
1432
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1433
147
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 {
1434
147
    (void)module;
1435
147
    if ( result.second != std::nullopt  ) {
1436
0
        const auto curveID = op.curveType.Get();
1437
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1438
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1439
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1440
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1441
1442
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1443
1444
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1445
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1446
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1447
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1448
0
    }
1449
147
}
1450
1451
147
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic_G2& op) const {
1452
147
    const size_t size = op.priv.ToTrimmedString().size();
1453
1454
147
    if ( size == 0 || size > 4096 ) {
1455
0
        return std::nullopt;
1456
0
    }
1457
1458
147
    return module->OpBLS_PrivateToPublic_G2(op);
1459
147
}
1460
1461
/* Specialization for operation::BLS_Sign */
1462
155
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 {
1463
155
    (void)module;
1464
1465
155
    if ( result.second != std::nullopt  ) {
1466
0
        const auto curveID = op.curveType.Get();
1467
0
        const auto point_v = op.hashOrPoint ? op.point.first.first.ToTrimmedString() : "";
1468
0
        const auto point_w = op.hashOrPoint ? op.point.first.second.ToTrimmedString() : "";
1469
0
        const auto point_x = op.hashOrPoint ? op.point.second.first.ToTrimmedString() : "";
1470
0
        const auto point_y = op.hashOrPoint ? op.point.second.second.ToTrimmedString() : "";
1471
0
        const auto cleartext = op.hashOrPoint ? op.cleartext.ToHex() : "";
1472
0
        const auto dest = op.dest.ToHex();
1473
0
        const auto aug = op.aug.ToHex();
1474
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
1475
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
1476
0
        const auto sig_v = result.second->signature.first.first.ToTrimmedString();
1477
0
        const auto sig_w = result.second->signature.first.second.ToTrimmedString();
1478
0
        const auto sig_x = result.second->signature.second.first.ToTrimmedString();
1479
0
        const auto sig_y = result.second->signature.second.second.ToTrimmedString();
1480
1481
0
        G1AddToPool(curveID, pub_x, pub_y);
1482
0
        G2AddToPool(curveID, sig_v, sig_w, sig_x, sig_y);
1483
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});
1484
1485
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
1486
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
1487
0
        if ( sig_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_v); }
1488
0
        if ( sig_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_w); }
1489
0
        if ( sig_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_x); }
1490
0
        if ( sig_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_y); }
1491
0
    }
1492
155
}
1493
1494
155
template<> std::optional<component::BLS_Signature> ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::callModule(std::shared_ptr<Module> module, operation::BLS_Sign& op) const {
1495
155
    const size_t size = op.priv.ToTrimmedString().size();
1496
1497
155
    if ( size == 0 || size > 4096 ) {
1498
0
        return std::nullopt;
1499
0
    }
1500
1501
155
    return module->OpBLS_Sign(op);
1502
155
}
1503
1504
/* Specialization for operation::BLS_Verify */
1505
164
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 {
1506
164
    (void)module;
1507
164
    (void)op;
1508
164
    (void)result;
1509
164
}
1510
1511
164
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_Verify>::callModule(std::shared_ptr<Module> module, operation::BLS_Verify& op) const {
1512
#if 0
1513
    const std::vector<size_t> sizes = {
1514
        op.pub.first.ToTrimmedString().size(),
1515
        op.pub.second.ToTrimmedString().size(),
1516
        op.signature.first.ToTrimmedString().size(),
1517
        op.signature.second.ToTrimmedString().size(),
1518
    };
1519
1520
    for (const auto& size : sizes) {
1521
        if ( size == 0 || size > 4096 ) {
1522
            return std::nullopt;
1523
        }
1524
    }
1525
#endif
1526
1527
164
    return module->OpBLS_Verify(op);
1528
164
}
1529
1530
/* Specialization for operation::BLS_BatchSign */
1531
151
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 {
1532
151
    (void)module;
1533
151
    (void)op;
1534
1535
151
    if ( result.second != std::nullopt  ) {
1536
0
        std::vector< std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2> > msgpub;
1537
0
        for (const auto& mp : result.second->msgpub) {
1538
0
            msgpub.push_back(
1539
0
                    std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2>{
1540
0
                        {
1541
0
                            mp.first.first.ToTrimmedString(),
1542
0
                            mp.first.second.ToTrimmedString()
1543
0
                        },
1544
0
                        {
1545
0
                            mp.second.first.first.ToTrimmedString(),
1546
0
                            mp.second.first.second.ToTrimmedString(),
1547
0
                            mp.second.second.first.ToTrimmedString(),
1548
0
                            mp.second.second.second.ToTrimmedString()
1549
0
                        }
1550
0
                    }
1551
0
            );
1552
0
            G1AddToPool(CF_ECC_CURVE("BLS12_381"), mp.first.first.ToTrimmedString(), mp.first.second.ToTrimmedString());
1553
0
            Pool_CurveBLSG2.Set({
1554
0
                    CF_ECC_CURVE("BLS12_381"),
1555
0
                    mp.second.first.first.ToTrimmedString(),
1556
0
                    mp.second.first.second.ToTrimmedString(),
1557
0
                    mp.second.second.first.ToTrimmedString(),
1558
0
                    mp.second.second.second.ToTrimmedString()
1559
0
            });
1560
0
        }
1561
0
        Pool_BLS_BatchSignature.Set({msgpub});
1562
0
    }
1563
151
}
1564
1565
151
template<> std::optional<component::BLS_BatchSignature> ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchSign& op) const {
1566
151
    return module->OpBLS_BatchSign(op);
1567
151
}
1568
1569
/* Specialization for operation::BLS_BatchVerify */
1570
159
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 {
1571
159
    (void)module;
1572
159
    (void)op;
1573
159
    (void)result;
1574
159
}
1575
1576
159
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1577
159
    return module->OpBLS_BatchVerify(op);
1578
159
}
1579
1580
/* Specialization for operation::BLS_Aggregate_G1 */
1581
152
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 {
1582
152
    (void)module;
1583
152
    (void)op;
1584
152
    (void)result;
1585
152
}
1586
1587
152
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op) const {
1588
152
    return module->OpBLS_Aggregate_G1(op);
1589
152
}
1590
1591
/* Specialization for operation::BLS_Aggregate_G2 */
1592
121
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 {
1593
121
    (void)module;
1594
121
    (void)op;
1595
121
    (void)result;
1596
121
}
1597
1598
121
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op) const {
1599
121
    return module->OpBLS_Aggregate_G2(op);
1600
121
}
1601
1602
/* Specialization for operation::BLS_Pairing */
1603
101
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 {
1604
101
    (void)module;
1605
101
    (void)op;
1606
1607
101
    if ( result.second != std::nullopt  ) {
1608
0
        Pool_Fp12.Set({
1609
0
                result.second->bn1.ToTrimmedString(),
1610
0
                result.second->bn2.ToTrimmedString(),
1611
0
                result.second->bn3.ToTrimmedString(),
1612
0
                result.second->bn4.ToTrimmedString(),
1613
0
                result.second->bn5.ToTrimmedString(),
1614
0
                result.second->bn6.ToTrimmedString(),
1615
0
                result.second->bn7.ToTrimmedString(),
1616
0
                result.second->bn8.ToTrimmedString(),
1617
0
                result.second->bn9.ToTrimmedString(),
1618
0
                result.second->bn10.ToTrimmedString(),
1619
0
                result.second->bn11.ToTrimmedString(),
1620
0
                result.second->bn12.ToTrimmedString()
1621
0
        });
1622
0
    }
1623
101
}
1624
1625
101
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1626
101
    return module->OpBLS_Pairing(op);
1627
101
}
1628
1629
/* Specialization for operation::BLS_MillerLoop */
1630
121
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 {
1631
121
    (void)module;
1632
121
    (void)op;
1633
1634
121
    if ( result.second != std::nullopt  ) {
1635
0
        Pool_Fp12.Set({
1636
0
                result.second->bn1.ToTrimmedString(),
1637
0
                result.second->bn2.ToTrimmedString(),
1638
0
                result.second->bn3.ToTrimmedString(),
1639
0
                result.second->bn4.ToTrimmedString(),
1640
0
                result.second->bn5.ToTrimmedString(),
1641
0
                result.second->bn6.ToTrimmedString(),
1642
0
                result.second->bn7.ToTrimmedString(),
1643
0
                result.second->bn8.ToTrimmedString(),
1644
0
                result.second->bn9.ToTrimmedString(),
1645
0
                result.second->bn10.ToTrimmedString(),
1646
0
                result.second->bn11.ToTrimmedString(),
1647
0
                result.second->bn12.ToTrimmedString()
1648
0
        });
1649
0
    }
1650
121
}
1651
1652
121
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1653
121
    return module->OpBLS_MillerLoop(op);
1654
121
}
1655
1656
/* Specialization for operation::BLS_FinalExp */
1657
174
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 {
1658
174
    (void)module;
1659
174
    (void)op;
1660
1661
174
    if ( result.second != std::nullopt  ) {
1662
0
        Pool_Fp12.Set({
1663
0
                result.second->bn1.ToTrimmedString(),
1664
0
                result.second->bn2.ToTrimmedString(),
1665
0
                result.second->bn3.ToTrimmedString(),
1666
0
                result.second->bn4.ToTrimmedString(),
1667
0
                result.second->bn5.ToTrimmedString(),
1668
0
                result.second->bn6.ToTrimmedString(),
1669
0
                result.second->bn7.ToTrimmedString(),
1670
0
                result.second->bn8.ToTrimmedString(),
1671
0
                result.second->bn9.ToTrimmedString(),
1672
0
                result.second->bn10.ToTrimmedString(),
1673
0
                result.second->bn11.ToTrimmedString(),
1674
0
                result.second->bn12.ToTrimmedString()
1675
0
        });
1676
0
    }
1677
174
}
1678
1679
174
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1680
174
    return module->OpBLS_FinalExp(op);
1681
174
}
1682
1683
/* Specialization for operation::BLS_HashToG1 */
1684
134
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 {
1685
134
    (void)module;
1686
1687
134
    if ( result.second != std::nullopt  ) {
1688
0
        const auto curveID = op.curveType.Get();
1689
0
        const auto g1_x = result.second->first.ToTrimmedString();
1690
0
        const auto g1_y = result.second->second.ToTrimmedString();
1691
1692
0
        G1AddToPool(curveID, g1_x, g1_y);
1693
1694
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1695
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1696
0
    }
1697
134
}
1698
1699
134
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1700
134
    return module->OpBLS_HashToG1(op);
1701
134
}
1702
1703
/* Specialization for operation::BLS_MapToG1 */
1704
157
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 {
1705
157
    (void)module;
1706
1707
157
    if ( result.second != std::nullopt  ) {
1708
0
        const auto curveID = op.curveType.Get();
1709
0
        const auto g1_x = result.second->first.ToTrimmedString();
1710
0
        const auto g1_y = result.second->second.ToTrimmedString();
1711
1712
0
        G1AddToPool(curveID, g1_x, g1_y);
1713
1714
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1715
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1716
0
    }
1717
157
}
1718
1719
157
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1720
157
    return module->OpBLS_MapToG1(op);
1721
157
}
1722
1723
/* Specialization for operation::BLS_MapToG2 */
1724
135
template<> void ExecutorBase<component::G2, operation::BLS_MapToG2>::postprocess(std::shared_ptr<Module> module, operation::BLS_MapToG2& op, const ExecutorBase<component::G2, operation::BLS_MapToG2>::ResultPair& result) const {
1725
135
    (void)module;
1726
1727
135
    if ( result.second != std::nullopt  ) {
1728
0
        const auto curveID = op.curveType.Get();
1729
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1730
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1731
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1732
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1733
1734
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1735
1736
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1737
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1738
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1739
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1740
0
    }
1741
135
}
1742
1743
135
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1744
135
    return module->OpBLS_MapToG2(op);
1745
135
}
1746
1747
/* Specialization for operation::BLS_IsG1OnCurve */
1748
136
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 {
1749
136
    (void)module;
1750
136
    (void)op;
1751
136
    (void)result;
1752
136
}
1753
1754
136
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1755
136
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1756
136
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1757
1758
127
    return module->OpBLS_IsG1OnCurve(op);
1759
136
}
1760
1761
/* Specialization for operation::BLS_IsG2OnCurve */
1762
177
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 {
1763
177
    (void)module;
1764
177
    (void)op;
1765
177
    (void)result;
1766
177
}
1767
1768
177
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1769
177
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1770
168
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1771
159
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1772
148
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1773
1774
139
    return module->OpBLS_IsG2OnCurve(op);
1775
148
}
1776
1777
/* Specialization for operation::BLS_GenerateKeyPair */
1778
131
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 {
1779
131
    (void)module;
1780
1781
131
    if ( result.second != std::nullopt  ) {
1782
0
        const auto curveID = op.curveType.Get();
1783
0
        const auto priv = result.second->priv.ToTrimmedString();
1784
0
        const auto g1_x = result.second->pub.first.ToTrimmedString();
1785
0
        const auto g1_y = result.second->pub.second.ToTrimmedString();
1786
1787
0
        G1AddToPool(curveID, g1_x, g1_y);
1788
1789
0
        if ( priv.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(priv); }
1790
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1791
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1792
0
    }
1793
131
}
1794
1795
131
template<> std::optional<component::BLS_KeyPair> ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::BLS_GenerateKeyPair& op) const {
1796
131
    return module->OpBLS_GenerateKeyPair(op);
1797
131
}
1798
1799
/* Specialization for operation::BLS_Decompress_G1 */
1800
118
template<> void ExecutorBase<component::G1, operation::BLS_Decompress_G1>::postprocess(std::shared_ptr<Module> module, operation::BLS_Decompress_G1& op, const ExecutorBase<component::G1, operation::BLS_Decompress_G1>::ResultPair& result) const {
1801
118
    (void)module;
1802
1803
118
    if ( result.second != std::nullopt  ) {
1804
0
        const auto curveID = op.curveType.Get();
1805
0
        const auto g1_x = result.second->first.ToTrimmedString();
1806
0
        const auto g1_y = result.second->second.ToTrimmedString();
1807
1808
0
        G1AddToPool(curveID, g1_x, g1_y);
1809
1810
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1811
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1812
0
    }
1813
118
}
1814
1815
118
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Decompress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G1& op) const {
1816
118
    return module->OpBLS_Decompress_G1(op);
1817
118
}
1818
1819
/* Specialization for operation::BLS_Compress_G1 */
1820
119
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 {
1821
119
    (void)module;
1822
1823
119
    if ( result.second != std::nullopt  ) {
1824
0
        const auto compressed = result.second->ToTrimmedString();
1825
1826
0
        if ( compressed.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(compressed); }
1827
0
    }
1828
119
}
1829
1830
119
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G1& op) const {
1831
119
    return module->OpBLS_Compress_G1(op);
1832
119
}
1833
1834
/* Specialization for operation::BLS_Decompress_G2 */
1835
104
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 {
1836
104
    (void)module;
1837
1838
104
    if ( result.second != std::nullopt  ) {
1839
0
        const auto curveID = op.curveType.Get();
1840
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1841
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1842
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1843
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1844
1845
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1846
1847
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1848
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1849
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1850
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1851
0
    }
1852
104
}
1853
1854
104
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Decompress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op) const {
1855
104
    return module->OpBLS_Decompress_G2(op);
1856
104
}
1857
1858
/* Specialization for operation::BLS_Compress_G2 */
1859
138
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 {
1860
138
    (void)module;
1861
1862
138
    if ( result.second != std::nullopt  ) {
1863
0
        const auto curveID = op.curveType.Get();
1864
0
        const auto g1_x = result.second->first.ToTrimmedString();
1865
0
        const auto g1_y = result.second->second.ToTrimmedString();
1866
1867
0
        G1AddToPool(curveID, g1_x, g1_y);
1868
1869
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1870
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1871
0
    }
1872
138
}
1873
1874
138
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Compress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G2& op) const {
1875
138
    return module->OpBLS_Compress_G2(op);
1876
138
}
1877
1878
/* Specialization for operation::BLS_G1_Add */
1879
160
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 {
1880
160
    (void)module;
1881
1882
160
    if ( result.second != std::nullopt  ) {
1883
0
        const auto curveID = op.curveType.Get();
1884
0
        const auto g1_x = result.second->first.ToTrimmedString();
1885
0
        const auto g1_y = result.second->second.ToTrimmedString();
1886
1887
0
        G1AddToPool(curveID, g1_x, g1_y);
1888
1889
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1890
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1891
0
    }
1892
160
}
1893
1894
160
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Add& op) const {
1895
160
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1896
160
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1897
149
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1898
140
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1899
131
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1900
1901
122
    return module->OpBLS_G1_Add(op);
1902
131
}
1903
1904
/* Specialization for operation::BLS_G1_Mul */
1905
134
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 {
1906
134
    (void)module;
1907
1908
134
    if ( result.second != std::nullopt  ) {
1909
0
        const auto curveID = op.curveType.Get();
1910
0
        const auto g1_x = result.second->first.ToTrimmedString();
1911
0
        const auto g1_y = result.second->second.ToTrimmedString();
1912
1913
0
        G1AddToPool(curveID, g1_x, g1_y);
1914
1915
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1916
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1917
0
    }
1918
134
}
1919
1920
134
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op) const {
1921
134
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1922
134
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1923
134
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1924
134
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1925
1926
134
    return module->OpBLS_G1_Mul(op);
1927
134
}
1928
1929
/* Specialization for operation::BLS_G1_IsEq */
1930
163
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 {
1931
163
    (void)module;
1932
163
    (void)op;
1933
163
    (void)result;
1934
163
}
1935
1936
163
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
1937
163
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1938
163
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1939
154
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1940
145
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1941
136
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1942
1943
127
    return module->OpBLS_G1_IsEq(op);
1944
136
}
1945
1946
/* Specialization for operation::BLS_G1_Neg */
1947
159
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 {
1948
159
    (void)module;
1949
1950
159
    if ( result.second != std::nullopt  ) {
1951
0
        const auto curveID = op.curveType.Get();
1952
0
        const auto g1_x = result.second->first.ToTrimmedString();
1953
0
        const auto g1_y = result.second->second.ToTrimmedString();
1954
1955
0
        G1AddToPool(curveID, g1_x, g1_y);
1956
1957
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1958
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1959
0
    }
1960
159
}
1961
1962
159
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Neg& op) const {
1963
159
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1964
159
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1965
157
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1966
1967
152
    return module->OpBLS_G1_Neg(op);
1968
157
}
1969
1970
/* Specialization for operation::BLS_G2_Add */
1971
226
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 {
1972
226
    (void)module;
1973
1974
226
    if ( result.second != std::nullopt  ) {
1975
0
        const auto curveID = op.curveType.Get();
1976
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1977
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1978
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1979
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1980
1981
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1982
1983
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1984
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1985
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1986
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1987
0
    }
1988
226
}
1989
1990
226
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Add& op) const {
1991
226
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1992
226
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1993
217
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1994
206
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1995
197
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1996
188
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1997
179
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1998
170
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1999
160
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2000
2001
151
    return module->OpBLS_G2_Add(op);
2002
160
}
2003
2004
/* Specialization for operation::BLS_G2_Mul */
2005
189
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 {
2006
189
    (void)module;
2007
2008
189
    if ( result.second != std::nullopt  ) {
2009
0
        const auto curveID = op.curveType.Get();
2010
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2011
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2012
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2013
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2014
2015
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2016
2017
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2018
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2019
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2020
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2021
0
    }
2022
189
}
2023
2024
189
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Mul& op) const {
2025
189
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2026
189
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2027
187
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2028
178
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
169
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
158
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2031
2032
149
    return module->OpBLS_G2_Mul(op);
2033
158
}
2034
2035
/* Specialization for operation::BLS_G2_IsEq */
2036
223
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 {
2037
223
    (void)module;
2038
223
    (void)op;
2039
223
    (void)result;
2040
223
}
2041
2042
223
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2043
223
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2044
223
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2045
214
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2046
205
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2047
196
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2048
187
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2049
178
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2050
168
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2051
158
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2052
2053
148
    return module->OpBLS_G2_IsEq(op);
2054
158
}
2055
2056
/* Specialization for operation::BLS_G2_Neg */
2057
158
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 {
2058
158
    (void)module;
2059
2060
158
    if ( result.second != std::nullopt  ) {
2061
0
        const auto curveID = op.curveType.Get();
2062
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2063
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2064
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2065
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2066
2067
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2068
2069
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2070
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2071
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2072
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2073
0
    }
2074
158
}
2075
2076
158
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Neg& op) const {
2077
158
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2078
158
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2079
156
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2080
151
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2081
140
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2082
2083
131
    return module->OpBLS_G2_Neg(op);
2084
140
}
2085
2086
/* Specialization for operation::Misc */
2087
119
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2088
119
    (void)module;
2089
119
    (void)op;
2090
119
    (void)result;
2091
119
}
2092
2093
119
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2094
119
    return module->OpMisc(op);
2095
119
}
2096
2097
/* Specialization for operation::BLS_HashToG2 */
2098
131
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 {
2099
131
    (void)module;
2100
2101
131
    if ( result.second != std::nullopt  ) {
2102
0
        const auto curveID = op.curveType.Get();
2103
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2104
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2105
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2106
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2107
2108
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2109
2110
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2111
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2112
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2113
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2114
0
    }
2115
131
}
2116
2117
131
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2118
131
    return module->OpBLS_HashToG2(op);
2119
131
}
2120
2121
ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2122
    ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options)
2123
20
{ }
2124
19
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2125
19
    this->modulo = component::Bignum(modulo);
2126
19
}
2127
2128
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) :
2129
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2130
1
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2131
1
}
2132
2133
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) :
2134
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2135
1
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2136
1
}
2137
2138
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) :
2139
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2140
1
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2141
1
}
2142
2143
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) :
2144
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2145
1
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2146
1
}
2147
2148
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) :
2149
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2150
1
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2151
1
}
2152
2153
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) :
2154
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2155
1
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2156
1
}
2157
2158
ExecutorBignumCalc_Mod_ED25519::ExecutorBignumCalc_Mod_ED25519(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2159
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2160
1
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2161
1
}
2162
2163
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) :
2164
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2165
1
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2166
1
}
2167
2168
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) :
2169
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2170
1
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2171
1
}
2172
2173
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) :
2174
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2175
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2176
1
}
2177
2178
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) :
2179
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2180
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2181
1
}
2182
2183
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) :
2184
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2185
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2186
1
}
2187
2188
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) :
2189
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2190
1
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2191
1
}
2192
2193
ExecutorBignumCalc_Mod_2Exp64::ExecutorBignumCalc_Mod_2Exp64(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2194
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2195
1
    CF_NORET(SetModulo("18446744073709551616"));
2196
1
}
2197
2198
ExecutorBignumCalc_Mod_2Exp128::ExecutorBignumCalc_Mod_2Exp128(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2199
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2200
1
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2201
1
}
2202
2203
ExecutorBignumCalc_Mod_2Exp256::ExecutorBignumCalc_Mod_2Exp256(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2204
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2205
1
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2206
1
}
2207
2208
ExecutorBignumCalc_Mod_2Exp512::ExecutorBignumCalc_Mod_2Exp512(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2209
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2210
1
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2211
1
}
2212
2213
ExecutorBignumCalc_Mod_SECP256K1::ExecutorBignumCalc_Mod_SECP256K1(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2214
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2215
1
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2216
1
}
2217
2218
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) :
2219
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2220
1
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2221
1
}
2222
2223
ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2224
    ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options)
2225
1
{ }
2226
0
void ExecutorBignumCalc_Fp2::SetModulo(const std::string& modulo) {
2227
0
    this->modulo = component::Bignum(modulo);
2228
0
}
2229
2230
ExecutorBignumCalc_Fp12::ExecutorBignumCalc_Fp12(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2231
    ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options)
2232
1
{ }
2233
0
void ExecutorBignumCalc_Fp12::SetModulo(const std::string& modulo) {
2234
0
    this->modulo = component::Bignum(modulo);
2235
0
}
2236
2237
template <class ResultType, class OperationType>
2238
ExecutorBase<ResultType, OperationType>::ExecutorBase(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2239
    operationID(operationID),
2240
    modules(modules),
2241
    options(options)
2242
100
{
2243
100
}
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
20
{
2243
20
}
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
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
2242
1
{
2243
1
}
2244
2245
/* Specialization for operation::SR25519_Verify */
2246
131
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 {
2247
131
    (void)module;
2248
131
    (void)op;
2249
131
    (void)result;
2250
131
}
2251
2252
131
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2253
131
    return module->OpSR25519_Verify(op);
2254
131
}
2255
2256
template <class ResultType, class OperationType>
2257
100
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
100
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2257
20
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
20
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2257
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
1
}
2259
2260
/* Filter away the values in the set that are std::nullopt */
2261
template <class ResultType, class OperationType>
2262
28.1k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
28.1k
    ResultSet ret;
2264
2265
92.7k
    for (const auto& result : results) {
2266
92.7k
        if ( result.second == std::nullopt ) {
2267
67.7k
            continue;
2268
67.7k
        }
2269
2270
25.0k
        ret.push_back(result);
2271
25.0k
    }
2272
2273
28.1k
    return ret;
2274
28.1k
}
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
2262
2.28k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
2.28k
    ResultSet ret;
2264
2265
6.16k
    for (const auto& result : results) {
2266
6.16k
        if ( result.second == std::nullopt ) {
2267
3.71k
            continue;
2268
3.71k
        }
2269
2270
2.45k
        ret.push_back(result);
2271
2.45k
    }
2272
2273
2.28k
    return ret;
2274
2.28k
}
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
2262
883
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
883
    ResultSet ret;
2264
2265
3.06k
    for (const auto& result : results) {
2266
3.06k
        if ( result.second == std::nullopt ) {
2267
1.79k
            continue;
2268
1.79k
        }
2269
2270
1.26k
        ret.push_back(result);
2271
1.26k
    }
2272
2273
883
    return ret;
2274
883
}
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
2262
522
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
522
    ResultSet ret;
2264
2265
3.19k
    for (const auto& result : results) {
2266
3.19k
        if ( result.second == std::nullopt ) {
2267
1.57k
            continue;
2268
1.57k
        }
2269
2270
1.62k
        ret.push_back(result);
2271
1.62k
    }
2272
2273
522
    return ret;
2274
522
}
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
2262
775
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
775
    ResultSet ret;
2264
2265
3.47k
    for (const auto& result : results) {
2266
3.47k
        if ( result.second == std::nullopt ) {
2267
1.78k
            continue;
2268
1.78k
        }
2269
2270
1.68k
        ret.push_back(result);
2271
1.68k
    }
2272
2273
775
    return ret;
2274
775
}
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
2262
3.39k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
3.39k
    ResultSet ret;
2264
2265
15.6k
    for (const auto& result : results) {
2266
15.6k
        if ( result.second == std::nullopt ) {
2267
10.1k
            continue;
2268
10.1k
        }
2269
2270
5.42k
        ret.push_back(result);
2271
5.42k
    }
2272
2273
3.39k
    return ret;
2274
3.39k
}
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
2262
3.35k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
3.35k
    ResultSet ret;
2264
2265
12.1k
    for (const auto& result : results) {
2266
12.1k
        if ( result.second == std::nullopt ) {
2267
11.3k
            continue;
2268
11.3k
        }
2269
2270
808
        ret.push_back(result);
2271
808
    }
2272
2273
3.35k
    return ret;
2274
3.35k
}
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
2262
121
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
121
    ResultSet ret;
2264
2265
779
    for (const auto& result : results) {
2266
779
        if ( result.second == std::nullopt ) {
2267
566
            continue;
2268
566
        }
2269
2270
213
        ret.push_back(result);
2271
213
    }
2272
2273
121
    return ret;
2274
121
}
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
2262
1.94k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
1.94k
    ResultSet ret;
2264
2265
6.08k
    for (const auto& result : results) {
2266
6.08k
        if ( result.second == std::nullopt ) {
2267
3.64k
            continue;
2268
3.64k
        }
2269
2270
2.44k
        ret.push_back(result);
2271
2.44k
    }
2272
2273
1.94k
    return ret;
2274
1.94k
}
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
2262
140
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
140
    ResultSet ret;
2264
2265
662
    for (const auto& result : results) {
2266
662
        if ( result.second == std::nullopt ) {
2267
662
            continue;
2268
662
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
140
    return ret;
2274
140
}
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
2262
59
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
59
    ResultSet ret;
2264
2265
414
    for (const auto& result : results) {
2266
414
        if ( result.second == std::nullopt ) {
2267
414
            continue;
2268
414
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
59
    return ret;
2274
59
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2262
70
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
70
    ResultSet ret;
2264
2265
491
    for (const auto& result : results) {
2266
491
        if ( result.second == std::nullopt ) {
2267
491
            continue;
2268
491
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
70
    return ret;
2274
70
}
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
2262
413
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
413
    ResultSet ret;
2264
2265
1.74k
    for (const auto& result : results) {
2266
1.74k
        if ( result.second == std::nullopt ) {
2267
942
            continue;
2268
942
        }
2269
2270
806
        ret.push_back(result);
2271
806
    }
2272
2273
413
    return ret;
2274
413
}
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
2262
259
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
259
    ResultSet ret;
2264
2265
642
    for (const auto& result : results) {
2266
642
        if ( result.second == std::nullopt ) {
2267
327
            continue;
2268
327
        }
2269
2270
315
        ret.push_back(result);
2271
315
    }
2272
2273
259
    return ret;
2274
259
}
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
2262
61
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
61
    ResultSet ret;
2264
2265
406
    for (const auto& result : results) {
2266
406
        if ( result.second == std::nullopt ) {
2267
406
            continue;
2268
406
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
61
    return ret;
2274
61
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2262
48
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
48
    ResultSet ret;
2264
2265
349
    for (const auto& result : results) {
2266
349
        if ( result.second == std::nullopt ) {
2267
349
            continue;
2268
349
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
48
    return ret;
2274
48
}
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
2262
65
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
65
    ResultSet ret;
2264
2265
147
    for (const auto& result : results) {
2266
147
        if ( result.second == std::nullopt ) {
2267
114
            continue;
2268
114
        }
2269
2270
33
        ret.push_back(result);
2271
33
    }
2272
2273
65
    return ret;
2274
65
}
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
2262
311
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
311
    ResultSet ret;
2264
2265
1.53k
    for (const auto& result : results) {
2266
1.53k
        if ( result.second == std::nullopt ) {
2267
840
            continue;
2268
840
        }
2269
2270
694
        ret.push_back(result);
2271
694
    }
2272
2273
311
    return ret;
2274
311
}
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
2262
956
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
956
    ResultSet ret;
2264
2265
2.51k
    for (const auto& result : results) {
2266
2.51k
        if ( result.second == std::nullopt ) {
2267
1.99k
            continue;
2268
1.99k
        }
2269
2270
519
        ret.push_back(result);
2271
519
    }
2272
2273
956
    return ret;
2274
956
}
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
2262
210
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
210
    ResultSet ret;
2264
2265
527
    for (const auto& result : results) {
2266
527
        if ( result.second == std::nullopt ) {
2267
224
            continue;
2268
224
        }
2269
2270
303
        ret.push_back(result);
2271
303
    }
2272
2273
210
    return ret;
2274
210
}
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
2262
50
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
50
    ResultSet ret;
2264
2265
186
    for (const auto& result : results) {
2266
186
        if ( result.second == std::nullopt ) {
2267
186
            continue;
2268
186
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
50
    return ret;
2274
50
}
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
2262
568
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
568
    ResultSet ret;
2264
2265
1.62k
    for (const auto& result : results) {
2266
1.62k
        if ( result.second == std::nullopt ) {
2267
883
            continue;
2268
883
        }
2269
2270
741
        ret.push_back(result);
2271
741
    }
2272
2273
568
    return ret;
2274
568
}
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
2262
166
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
166
    ResultSet ret;
2264
2265
508
    for (const auto& result : results) {
2266
508
        if ( result.second == std::nullopt ) {
2267
440
            continue;
2268
440
        }
2269
2270
68
        ret.push_back(result);
2271
68
    }
2272
2273
166
    return ret;
2274
166
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2262
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
43
    ResultSet ret;
2264
2265
149
    for (const auto& result : results) {
2266
149
        if ( result.second == std::nullopt ) {
2267
149
            continue;
2268
149
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
43
    return ret;
2274
43
}
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
2262
49
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
49
    ResultSet ret;
2264
2265
181
    for (const auto& result : results) {
2266
181
        if ( result.second == std::nullopt ) {
2267
181
            continue;
2268
181
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
49
    return ret;
2274
49
}
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
2262
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
39
    ResultSet ret;
2264
2265
144
    for (const auto& result : results) {
2266
144
        if ( result.second == std::nullopt ) {
2267
144
            continue;
2268
144
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
39
    return ret;
2274
39
}
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
2262
290
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
290
    ResultSet ret;
2264
2265
863
    for (const auto& result : results) {
2266
863
        if ( result.second == std::nullopt ) {
2267
367
            continue;
2268
367
        }
2269
2270
496
        ret.push_back(result);
2271
496
    }
2272
2273
290
    return ret;
2274
290
}
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
2262
111
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
111
    ResultSet ret;
2264
2265
354
    for (const auto& result : results) {
2266
354
        if ( result.second == std::nullopt ) {
2267
238
            continue;
2268
238
        }
2269
2270
116
        ret.push_back(result);
2271
116
    }
2272
2273
111
    return ret;
2274
111
}
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
2262
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
30
    ResultSet ret;
2264
2265
113
    for (const auto& result : results) {
2266
113
        if ( result.second == std::nullopt ) {
2267
113
            continue;
2268
113
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
30
    return ret;
2274
30
}
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
2262
36
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
36
    ResultSet ret;
2264
2265
135
    for (const auto& result : results) {
2266
135
        if ( result.second == std::nullopt ) {
2267
135
            continue;
2268
135
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
36
    return ret;
2274
36
}
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
2262
563
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
563
    ResultSet ret;
2264
2265
1.47k
    for (const auto& result : results) {
2266
1.47k
        if ( result.second == std::nullopt ) {
2267
870
            continue;
2268
870
        }
2269
2270
601
        ret.push_back(result);
2271
601
    }
2272
2273
563
    return ret;
2274
563
}
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
2262
48
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
48
    ResultSet ret;
2264
2265
176
    for (const auto& result : results) {
2266
176
        if ( result.second == std::nullopt ) {
2267
176
            continue;
2268
176
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
48
    return ret;
2274
48
}
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
2262
36
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
36
    ResultSet ret;
2264
2265
139
    for (const auto& result : results) {
2266
139
        if ( result.second == std::nullopt ) {
2267
139
            continue;
2268
139
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
36
    return ret;
2274
36
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2262
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
37
    ResultSet ret;
2264
2265
129
    for (const auto& result : results) {
2266
129
        if ( result.second == std::nullopt ) {
2267
129
            continue;
2268
129
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
37
    return ret;
2274
37
}
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
2262
41
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
41
    ResultSet ret;
2264
2265
147
    for (const auto& result : results) {
2266
147
        if ( result.second == std::nullopt ) {
2267
147
            continue;
2268
147
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
41
    return ret;
2274
41
}
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
2262
77
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
77
    ResultSet ret;
2264
2265
268
    for (const auto& result : results) {
2266
268
        if ( result.second == std::nullopt ) {
2267
235
            continue;
2268
235
        }
2269
2270
33
        ret.push_back(result);
2271
33
    }
2272
2273
77
    return ret;
2274
77
}
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
2262
723
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
723
    ResultSet ret;
2264
2265
2.00k
    for (const auto& result : results) {
2266
2.00k
        if ( result.second == std::nullopt ) {
2267
1.86k
            continue;
2268
1.86k
        }
2269
2270
145
        ret.push_back(result);
2271
145
    }
2272
2273
723
    return ret;
2274
723
}
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
2262
64
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
64
    ResultSet ret;
2264
2265
218
    for (const auto& result : results) {
2266
218
        if ( result.second == std::nullopt ) {
2267
183
            continue;
2268
183
        }
2269
2270
35
        ret.push_back(result);
2271
35
    }
2272
2273
64
    return ret;
2274
64
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2262
65
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
65
    ResultSet ret;
2264
2265
218
    for (const auto& result : results) {
2266
218
        if ( result.second == std::nullopt ) {
2267
193
            continue;
2268
193
        }
2269
2270
25
        ret.push_back(result);
2271
25
    }
2272
2273
65
    return ret;
2274
65
}
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
2262
78
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
78
    ResultSet ret;
2264
2265
265
    for (const auto& result : results) {
2266
265
        if ( result.second == std::nullopt ) {
2267
250
            continue;
2268
250
        }
2269
2270
15
        ret.push_back(result);
2271
15
    }
2272
2273
78
    return ret;
2274
78
}
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
2262
206
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
206
    ResultSet ret;
2264
2265
616
    for (const auto& result : results) {
2266
616
        if ( result.second == std::nullopt ) {
2267
560
            continue;
2268
560
        }
2269
2270
56
        ret.push_back(result);
2271
56
    }
2272
2273
206
    return ret;
2274
206
}
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
2262
7.31k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
7.31k
    ResultSet ret;
2264
2265
17.2k
    for (const auto& result : results) {
2266
17.2k
        if ( result.second == std::nullopt ) {
2267
13.1k
            continue;
2268
13.1k
        }
2269
2270
4.12k
        ret.push_back(result);
2271
4.12k
    }
2272
2273
7.31k
    return ret;
2274
7.31k
}
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
2262
69
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
69
    ResultSet ret;
2264
2265
218
    for (const auto& result : results) {
2266
218
        if ( result.second == std::nullopt ) {
2267
218
            continue;
2268
218
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
69
    return ret;
2274
69
}
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
2262
227
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
227
    ResultSet ret;
2264
2265
728
    for (const auto& result : results) {
2266
728
        if ( result.second == std::nullopt ) {
2267
728
            continue;
2268
728
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
227
    return ret;
2274
227
}
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
2262
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
43
    ResultSet ret;
2264
2265
150
    for (const auto& result : results) {
2266
150
        if ( result.second == std::nullopt ) {
2267
150
            continue;
2268
150
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
43
    return ret;
2274
43
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2262
44
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
44
    ResultSet ret;
2264
2265
147
    for (const auto& result : results) {
2266
147
        if ( result.second == std::nullopt ) {
2267
147
            continue;
2268
147
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
44
    return ret;
2274
44
}
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
2262
46
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
46
    ResultSet ret;
2264
2265
155
    for (const auto& result : results) {
2266
155
        if ( result.second == std::nullopt ) {
2267
155
            continue;
2268
155
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
46
    return ret;
2274
46
}
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
2262
46
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
46
    ResultSet ret;
2264
2265
164
    for (const auto& result : results) {
2266
164
        if ( result.second == std::nullopt ) {
2267
164
            continue;
2268
164
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
46
    return ret;
2274
46
}
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
2262
44
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
44
    ResultSet ret;
2264
2265
151
    for (const auto& result : results) {
2266
151
        if ( result.second == std::nullopt ) {
2267
151
            continue;
2268
151
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
44
    return ret;
2274
44
}
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
2262
45
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
45
    ResultSet ret;
2264
2265
159
    for (const auto& result : results) {
2266
159
        if ( result.second == std::nullopt ) {
2267
159
            continue;
2268
159
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
45
    return ret;
2274
45
}
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
2262
44
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
44
    ResultSet ret;
2264
2265
152
    for (const auto& result : results) {
2266
152
        if ( result.second == std::nullopt ) {
2267
152
            continue;
2268
152
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
44
    return ret;
2274
44
}
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
2262
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
33
    ResultSet ret;
2264
2265
121
    for (const auto& result : results) {
2266
121
        if ( result.second == std::nullopt ) {
2267
121
            continue;
2268
121
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
33
    return ret;
2274
33
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2262
27
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
27
    ResultSet ret;
2264
2265
101
    for (const auto& result : results) {
2266
101
        if ( result.second == std::nullopt ) {
2267
101
            continue;
2268
101
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
27
    return ret;
2274
27
}
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
2262
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
34
    ResultSet ret;
2264
2265
121
    for (const auto& result : results) {
2266
121
        if ( result.second == std::nullopt ) {
2267
121
            continue;
2268
121
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
34
    return ret;
2274
34
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2262
49
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
49
    ResultSet ret;
2264
2265
174
    for (const auto& result : results) {
2266
174
        if ( result.second == std::nullopt ) {
2267
174
            continue;
2268
174
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
49
    return ret;
2274
49
}
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
2262
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
40
    ResultSet ret;
2264
2265
134
    for (const auto& result : results) {
2266
134
        if ( result.second == std::nullopt ) {
2267
134
            continue;
2268
134
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
40
    return ret;
2274
40
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2262
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
40
    ResultSet ret;
2264
2265
131
    for (const auto& result : results) {
2266
131
        if ( result.second == std::nullopt ) {
2267
131
            continue;
2268
131
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
40
    return ret;
2274
40
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2262
42
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
42
    ResultSet ret;
2264
2265
157
    for (const auto& result : results) {
2266
157
        if ( result.second == std::nullopt ) {
2267
157
            continue;
2268
157
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
42
    return ret;
2274
42
}
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
2262
38
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
38
    ResultSet ret;
2264
2265
135
    for (const auto& result : results) {
2266
135
        if ( result.second == std::nullopt ) {
2267
135
            continue;
2268
135
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
38
    return ret;
2274
38
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2262
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
39
    ResultSet ret;
2264
2265
136
    for (const auto& result : results) {
2266
136
        if ( result.second == std::nullopt ) {
2267
136
            continue;
2268
136
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
39
    return ret;
2274
39
}
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
2262
54
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
54
    ResultSet ret;
2264
2265
177
    for (const auto& result : results) {
2266
177
        if ( result.second == std::nullopt ) {
2267
177
            continue;
2268
177
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
54
    return ret;
2274
54
}
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
2262
38
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
38
    ResultSet ret;
2264
2265
131
    for (const auto& result : results) {
2266
131
        if ( result.second == std::nullopt ) {
2267
131
            continue;
2268
131
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
38
    return ret;
2274
38
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2262
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
33
    ResultSet ret;
2264
2265
118
    for (const auto& result : results) {
2266
118
        if ( result.second == std::nullopt ) {
2267
118
            continue;
2268
118
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
33
    return ret;
2274
33
}
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
2262
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
34
    ResultSet ret;
2264
2265
119
    for (const auto& result : results) {
2266
119
        if ( result.second == std::nullopt ) {
2267
119
            continue;
2268
119
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
34
    return ret;
2274
34
}
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
2262
28
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
28
    ResultSet ret;
2264
2265
104
    for (const auto& result : results) {
2266
104
        if ( result.second == std::nullopt ) {
2267
104
            continue;
2268
104
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
28
    return ret;
2274
28
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2262
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
37
    ResultSet ret;
2264
2265
138
    for (const auto& result : results) {
2266
138
        if ( result.second == std::nullopt ) {
2267
138
            continue;
2268
138
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
37
    return ret;
2274
37
}
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
2262
47
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
47
    ResultSet ret;
2264
2265
160
    for (const auto& result : results) {
2266
160
        if ( result.second == std::nullopt ) {
2267
160
            continue;
2268
160
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
47
    return ret;
2274
47
}
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
2262
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
43
    ResultSet ret;
2264
2265
134
    for (const auto& result : results) {
2266
134
        if ( result.second == std::nullopt ) {
2267
134
            continue;
2268
134
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
43
    return ret;
2274
43
}
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
2262
51
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
51
    ResultSet ret;
2264
2265
163
    for (const auto& result : results) {
2266
163
        if ( result.second == std::nullopt ) {
2267
163
            continue;
2268
163
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
51
    return ret;
2274
51
}
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
2262
48
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
48
    ResultSet ret;
2264
2265
159
    for (const auto& result : results) {
2266
159
        if ( result.second == std::nullopt ) {
2267
159
            continue;
2268
159
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
48
    return ret;
2274
48
}
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
2262
76
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
76
    ResultSet ret;
2264
2265
226
    for (const auto& result : results) {
2266
226
        if ( result.second == std::nullopt ) {
2267
226
            continue;
2268
226
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
76
    return ret;
2274
76
}
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
2262
62
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
62
    ResultSet ret;
2264
2265
189
    for (const auto& result : results) {
2266
189
        if ( result.second == std::nullopt ) {
2267
189
            continue;
2268
189
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
62
    return ret;
2274
62
}
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
2262
70
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
70
    ResultSet ret;
2264
2265
223
    for (const auto& result : results) {
2266
223
        if ( result.second == std::nullopt ) {
2267
223
            continue;
2268
223
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
70
    return ret;
2274
70
}
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
2262
50
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
50
    ResultSet ret;
2264
2265
158
    for (const auto& result : results) {
2266
158
        if ( result.second == std::nullopt ) {
2267
158
            continue;
2268
158
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
50
    return ret;
2274
50
}
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
2262
31
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
31
    ResultSet ret;
2264
2265
119
    for (const auto& result : results) {
2266
119
        if ( result.second == std::nullopt ) {
2267
119
            continue;
2268
119
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
31
    return ret;
2274
31
}
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
2262
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
39
    ResultSet ret;
2264
2265
131
    for (const auto& result : results) {
2266
131
        if ( result.second == std::nullopt ) {
2267
131
            continue;
2268
131
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
39
    return ret;
2274
39
}
2275
2276
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2277
template <>
2278
681
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 {
2279
681
    (void)operations;
2280
681
    (void)results;
2281
681
    (void)data;
2282
681
    (void)size;
2283
681
}
2284
2285
template <class ResultType, class OperationType>
2286
2.18k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
2.18k
    (void)operation;
2288
2289
2.18k
    return false;
2290
2.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2286
504
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
504
    (void)operation;
2288
2289
504
    return false;
2290
504
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
Line
Count
Source
2286
214
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
214
    (void)operation;
2288
2289
214
    return false;
2290
214
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const
Line
Count
Source
2286
26
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
26
    (void)operation;
2288
2289
26
    return false;
2290
26
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
Line
Count
Source
2286
544
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
544
    (void)operation;
2288
2289
544
    return false;
2290
544
}
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
2286
133
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
133
    (void)operation;
2288
2289
133
    return false;
2290
133
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const
Line
Count
Source
2286
49
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
49
    (void)operation;
2288
2289
49
    return false;
2290
49
}
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
2286
4
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
4
    (void)operation;
2288
2289
4
    return false;
2290
4
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
Line
Count
Source
2286
82
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
82
    (void)operation;
2288
2289
82
    return false;
2290
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::dontCompare(cryptofuzz::operation::ECC_PrivateToPublic const&) const
Line
Count
Source
2286
171
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
171
    (void)operation;
2288
2289
171
    return false;
2290
171
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2286
106
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
106
    (void)operation;
2288
2289
106
    return false;
2290
106
}
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
2286
156
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
156
    (void)operation;
2288
2289
156
    return false;
2290
156
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const
Line
Count
Source
2286
29
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
29
    (void)operation;
2288
2289
29
    return false;
2290
29
}
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
2286
91
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
91
    (void)operation;
2288
2289
91
    return false;
2290
91
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const
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
2286
10
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
10
    (void)operation;
2288
2289
10
    return false;
2290
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const
Line
Count
Source
2286
39
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
39
    (void)operation;
2288
2289
39
    return false;
2290
39
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2286
10
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
10
    (void)operation;
2288
2289
10
    return false;
2290
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
Line
Count
Source
2286
6
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
6
    (void)operation;
2288
2289
6
    return false;
2290
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2286
4
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
4
    (void)operation;
2288
2289
4
    return false;
2290
4
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DH_GenerateKeyPair const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::dontCompare(cryptofuzz::operation::DH_Derive const&) const
Line
Count
Source
2286
11
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
11
    (void)operation;
2288
2289
11
    return false;
2290
11
}
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::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
2291
2292
template <>
2293
849
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2294
849
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2295
849
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2296
2297
754
    return false;
2298
849
}
2299
2300
template <>
2301
0
bool ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::dontCompare(const operation::ECCSI_Sign& operation) const {
2302
0
    return true;
2303
0
}
2304
2305
template <>
2306
138
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2307
138
    if (
2308
138
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2309
138
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2310
82
        if ( operation.UseRandomNonce() ) {
2311
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2312
61
            return true;
2313
61
        }
2314
82
    }
2315
2316
77
    return false;
2317
138
}
2318
2319
template <>
2320
18
bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const {
2321
18
    if (
2322
18
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2323
18
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2324
18
        if ( operation.UseRandomNonce() ) {
2325
            /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */
2326
18
            return true;
2327
18
        }
2328
18
    }
2329
2330
0
    return false;
2331
18
}
2332
2333
template <>
2334
0
bool ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::dontCompare(const operation::ECRDSA_Sign& operation) const {
2335
0
    if (
2336
0
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2337
0
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2338
0
        if ( operation.UseRandomNonce() ) {
2339
            /* Don't compare ECRDSA signatures comptued from a randomly generated nonce */
2340
0
            return true;
2341
0
        }
2342
0
    }
2343
2344
0
    return false;
2345
0
}
2346
2347
/* OpenSSL DES_EDE3_WRAP randomizes the IV, result is different each time */
2348
template <>
2349
811
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2350
811
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2351
2352
811
    return false;
2353
811
}
2354
2355
template <>
2356
122
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2357
122
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2358
2359
122
    return false;
2360
122
}
2361
2362
template <>
2363
223
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2364
223
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2365
2366
223
    return false;
2367
223
}
2368
2369
template <>
2370
229
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2371
229
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2372
2373
228
    return false;
2374
229
}
2375
2376
template <class ResultType, class OperationType>
2377
28.1k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
28.1k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
28.1k
    const auto filtered = filter(results);
2384
2385
28.1k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
23.6k
        return;
2388
23.6k
    }
2389
2390
4.57k
    if ( dontCompare(operations[0].second) == true ) {
2391
175
        return;
2392
175
    }
2393
2394
20.4k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
16.0k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
16.0k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
16.0k
        const bool equal = *prev == *cur;
2399
2400
16.0k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
16.0k
    }
2417
4.40k
}
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
2377
2.28k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
2.28k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
2.28k
    const auto filtered = filter(results);
2384
2385
2.28k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
1.77k
        return;
2388
1.77k
    }
2389
2390
504
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
2.26k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
1.76k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
1.76k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
1.76k
        const bool equal = *prev == *cur;
2399
2400
1.76k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
1.76k
    }
2417
504
}
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
2377
883
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
883
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
883
    const auto filtered = filter(results);
2384
2385
883
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
654
        return;
2388
654
    }
2389
2390
229
    if ( dontCompare(operations[0].second) == true ) {
2391
1
        return;
2392
1
    }
2393
2394
1.19k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
968
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
968
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
968
        const bool equal = *prev == *cur;
2399
2400
968
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
968
    }
2417
228
}
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
2377
522
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
522
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
522
    const auto filtered = filter(results);
2384
2385
522
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
308
        return;
2388
308
    }
2389
2390
214
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
1.49k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
1.28k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
1.28k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
1.28k
        const bool equal = *prev == *cur;
2399
2400
1.28k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
1.28k
    }
2417
214
}
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
2377
775
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
775
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
775
    const auto filtered = filter(results);
2384
2385
775
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
552
        return;
2388
552
    }
2389
2390
223
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
1.50k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
1.28k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
1.28k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
1.28k
        const bool equal = *prev == *cur;
2399
2400
1.28k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
1.28k
    }
2417
223
}
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
2377
3.39k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
3.39k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
3.39k
    const auto filtered = filter(results);
2384
2385
3.39k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
2.58k
        return;
2388
2.58k
    }
2389
2390
811
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
5.18k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
4.37k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
4.37k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
4.37k
        const bool equal = *prev == *cur;
2399
2400
4.37k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
4.37k
    }
2417
811
}
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
2377
3.35k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
3.35k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
3.35k
    const auto filtered = filter(results);
2384
2385
3.35k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
3.22k
        return;
2388
3.22k
    }
2389
2390
122
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
715
    for (size_t i = 1; i < filtered.size(); i++) {
2395
593
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
593
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
593
        const bool equal = *prev == *cur;
2399
2400
593
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
593
    }
2417
122
}
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
2377
121
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
121
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
121
    const auto filtered = filter(results);
2384
2385
121
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
95
        return;
2388
95
    }
2389
2390
26
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
184
    for (size_t i = 1; i < filtered.size(); i++) {
2395
158
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
158
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
158
        const bool equal = *prev == *cur;
2399
2400
158
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
158
    }
2417
26
}
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
2377
1.94k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
1.94k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
1.94k
    const auto filtered = filter(results);
2384
2385
1.94k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
1.40k
        return;
2388
1.40k
    }
2389
2390
544
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
2.23k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
1.68k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
1.68k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
1.68k
        const bool equal = *prev == *cur;
2399
2400
1.68k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
1.68k
    }
2417
544
}
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
2377
140
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
140
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
140
    const auto filtered = filter(results);
2384
2385
140
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
140
        return;
2388
140
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
59
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
59
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
59
    const auto filtered = filter(results);
2384
2385
59
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
59
        return;
2388
59
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
70
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
70
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
70
    const auto filtered = filter(results);
2384
2385
70
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
70
        return;
2388
70
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
413
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
413
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
413
    const auto filtered = filter(results);
2384
2385
413
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
280
        return;
2388
280
    }
2389
2390
133
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
660
    for (size_t i = 1; i < filtered.size(); i++) {
2395
527
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
527
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
527
        const bool equal = *prev == *cur;
2399
2400
527
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
527
    }
2417
133
}
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
2377
259
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
259
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
259
    const auto filtered = filter(results);
2384
2385
259
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
210
        return;
2388
210
    }
2389
2390
49
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
138
    for (size_t i = 1; i < filtered.size(); i++) {
2395
89
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
89
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
89
        const bool equal = *prev == *cur;
2399
2400
89
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
89
    }
2417
49
}
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
2377
61
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
61
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
61
    const auto filtered = filter(results);
2384
2385
61
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
61
        return;
2388
61
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
48
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
48
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
48
    const auto filtered = filter(results);
2384
2385
48
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
48
        return;
2388
48
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
65
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
65
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
65
    const auto filtered = filter(results);
2384
2385
65
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
61
        return;
2388
61
    }
2389
2390
4
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
8
    for (size_t i = 1; i < filtered.size(); i++) {
2395
4
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
4
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
4
        const bool equal = *prev == *cur;
2399
2400
4
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
4
    }
2417
4
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2377
311
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
311
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
311
    const auto filtered = filter(results);
2384
2385
311
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
229
        return;
2388
229
    }
2389
2390
82
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
556
    for (size_t i = 1; i < filtered.size(); i++) {
2395
474
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
474
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
474
        const bool equal = *prev == *cur;
2399
2400
474
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
474
    }
2417
82
}
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
2377
956
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
956
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
956
    const auto filtered = filter(results);
2384
2385
956
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
785
        return;
2388
785
    }
2389
2390
171
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
429
    for (size_t i = 1; i < filtered.size(); i++) {
2395
258
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
258
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
258
        const bool equal = *prev == *cur;
2399
2400
258
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
258
    }
2417
171
}
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
2377
210
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
210
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
210
    const auto filtered = filter(results);
2384
2385
210
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
104
        return;
2388
104
    }
2389
2390
106
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
257
    for (size_t i = 1; i < filtered.size(); i++) {
2395
151
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
151
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
151
        const bool equal = *prev == *cur;
2399
2400
151
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
151
    }
2417
106
}
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
2377
50
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
50
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
50
    const auto filtered = filter(results);
2384
2385
50
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
50
        return;
2388
50
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
568
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
568
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
568
    const auto filtered = filter(results);
2384
2385
568
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
430
        return;
2388
430
    }
2389
2390
138
    if ( dontCompare(operations[0].second) == true ) {
2391
61
        return;
2392
61
    }
2393
2394
268
    for (size_t i = 1; i < filtered.size(); i++) {
2395
191
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
191
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
191
        const bool equal = *prev == *cur;
2399
2400
191
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
191
    }
2417
77
}
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
2377
166
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
166
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
166
    const auto filtered = filter(results);
2384
2385
166
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
148
        return;
2388
148
    }
2389
2390
18
    if ( dontCompare(operations[0].second) == true ) {
2391
18
        return;
2392
18
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
43
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
43
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
43
    const auto filtered = filter(results);
2384
2385
43
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
43
        return;
2388
43
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
49
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
49
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
49
    const auto filtered = filter(results);
2384
2385
49
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
49
        return;
2388
49
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
39
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
39
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
39
    const auto filtered = filter(results);
2384
2385
39
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
39
        return;
2388
39
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
290
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
290
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
290
    const auto filtered = filter(results);
2384
2385
290
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
134
        return;
2388
134
    }
2389
2390
156
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
440
    for (size_t i = 1; i < filtered.size(); i++) {
2395
284
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
284
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
284
        const bool equal = *prev == *cur;
2399
2400
284
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
284
    }
2417
156
}
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
2377
111
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
111
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
111
    const auto filtered = filter(results);
2384
2385
111
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
82
        return;
2388
82
    }
2389
2390
29
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
88
    for (size_t i = 1; i < filtered.size(); i++) {
2395
59
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
59
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
59
        const bool equal = *prev == *cur;
2399
2400
59
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
59
    }
2417
29
}
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
2377
30
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
30
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
30
    const auto filtered = filter(results);
2384
2385
30
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
30
        return;
2388
30
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
36
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
36
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
36
    const auto filtered = filter(results);
2384
2385
36
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
36
        return;
2388
36
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
563
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
563
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
563
    const auto filtered = filter(results);
2384
2385
563
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
472
        return;
2388
472
    }
2389
2390
91
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
278
    for (size_t i = 1; i < filtered.size(); i++) {
2395
187
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
187
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
187
        const bool equal = *prev == *cur;
2399
2400
187
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
187
    }
2417
91
}
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
2377
48
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
48
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
48
    const auto filtered = filter(results);
2384
2385
48
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
48
        return;
2388
48
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
0
}
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
2377
36
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
36
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
36
    const auto filtered = filter(results);
2384
2385
36
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
36
        return;
2388
36
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
37
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
37
    const auto filtered = filter(results);
2384
2385
37
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
37
        return;
2388
37
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
41
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
41
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
41
    const auto filtered = filter(results);
2384
2385
41
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
41
        return;
2388
41
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
77
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
77
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
77
    const auto filtered = filter(results);
2384
2385
77
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
67
        return;
2388
67
    }
2389
2390
10
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
31
    for (size_t i = 1; i < filtered.size(); i++) {
2395
21
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
21
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
21
        const bool equal = *prev == *cur;
2399
2400
21
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
21
    }
2417
10
}
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
2377
723
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
723
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
723
    const auto filtered = filter(results);
2384
2385
723
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
684
        return;
2388
684
    }
2389
2390
39
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
127
    for (size_t i = 1; i < filtered.size(); i++) {
2395
88
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
88
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
88
        const bool equal = *prev == *cur;
2399
2400
88
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
88
    }
2417
39
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Neg>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Neg> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2377
64
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
64
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
64
    const auto filtered = filter(results);
2384
2385
64
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
54
        return;
2388
54
    }
2389
2390
10
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
30
    for (size_t i = 1; i < filtered.size(); i++) {
2395
20
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
20
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
20
        const bool equal = *prev == *cur;
2399
2400
20
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
20
    }
2417
10
}
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
2377
65
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
65
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
65
    const auto filtered = filter(results);
2384
2385
65
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
59
        return;
2388
59
    }
2389
2390
6
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
19
    for (size_t i = 1; i < filtered.size(); i++) {
2395
13
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
13
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
13
        const bool equal = *prev == *cur;
2399
2400
13
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
13
    }
2417
6
}
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
2377
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 {
2378
78
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
78
    const auto filtered = filter(results);
2384
2385
78
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
74
        return;
2388
74
    }
2389
2390
4
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
14
    for (size_t i = 1; i < filtered.size(); i++) {
2395
10
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
10
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
10
        const bool equal = *prev == *cur;
2399
2400
10
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
10
    }
2417
4
}
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
2377
206
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
206
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
206
    const auto filtered = filter(results);
2384
2385
206
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
195
        return;
2388
195
    }
2389
2390
11
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
36
    for (size_t i = 1; i < filtered.size(); i++) {
2395
25
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
25
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
25
        const bool equal = *prev == *cur;
2399
2400
25
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
25
    }
2417
11
}
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
2377
7.31k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
7.31k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
7.31k
    const auto filtered = filter(results);
2384
2385
7.31k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
6.46k
        return;
2388
6.46k
    }
2389
2390
849
    if ( dontCompare(operations[0].second) == true ) {
2391
95
        return;
2392
95
    }
2393
2394
2.32k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
1.56k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
1.56k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
1.56k
        const bool equal = *prev == *cur;
2399
2400
1.56k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
1.56k
    }
2417
754
}
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
2377
69
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
69
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
69
    const auto filtered = filter(results);
2384
2385
69
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
69
        return;
2388
69
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
227
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
227
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
227
    const auto filtered = filter(results);
2384
2385
227
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
227
        return;
2388
227
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
43
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
43
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
43
    const auto filtered = filter(results);
2384
2385
43
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
43
        return;
2388
43
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
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 {
2378
44
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
44
    const auto filtered = filter(results);
2384
2385
44
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
44
        return;
2388
44
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
46
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
46
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
46
    const auto filtered = filter(results);
2384
2385
46
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
46
        return;
2388
46
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
46
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
46
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
46
    const auto filtered = filter(results);
2384
2385
46
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
46
        return;
2388
46
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
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 {
2378
44
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
44
    const auto filtered = filter(results);
2384
2385
44
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
44
        return;
2388
44
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
45
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
45
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
45
    const auto filtered = filter(results);
2384
2385
45
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
45
        return;
2388
45
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
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 {
2378
44
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
44
    const auto filtered = filter(results);
2384
2385
44
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
44
        return;
2388
44
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
33
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
33
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
33
    const auto filtered = filter(results);
2384
2385
33
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
33
        return;
2388
33
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
27
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
27
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
27
    const auto filtered = filter(results);
2384
2385
27
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
27
        return;
2388
27
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
34
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
34
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
34
    const auto filtered = filter(results);
2384
2385
34
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
34
        return;
2388
34
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
49
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
49
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
49
    const auto filtered = filter(results);
2384
2385
49
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
49
        return;
2388
49
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
40
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
40
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
40
    const auto filtered = filter(results);
2384
2385
40
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
40
        return;
2388
40
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
40
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
40
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
40
    const auto filtered = filter(results);
2384
2385
40
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
40
        return;
2388
40
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
42
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
42
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
42
    const auto filtered = filter(results);
2384
2385
42
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
42
        return;
2388
42
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
38
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
38
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
38
    const auto filtered = filter(results);
2384
2385
38
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
38
        return;
2388
38
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
39
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
39
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
39
    const auto filtered = filter(results);
2384
2385
39
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
39
        return;
2388
39
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
54
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
54
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
54
    const auto filtered = filter(results);
2384
2385
54
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
54
        return;
2388
54
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
38
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
38
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
38
    const auto filtered = filter(results);
2384
2385
38
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
38
        return;
2388
38
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
33
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
33
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
33
    const auto filtered = filter(results);
2384
2385
33
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
33
        return;
2388
33
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
34
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
34
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
34
    const auto filtered = filter(results);
2384
2385
34
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
34
        return;
2388
34
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
28
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
28
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
28
    const auto filtered = filter(results);
2384
2385
28
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
28
        return;
2388
28
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
37
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
37
    const auto filtered = filter(results);
2384
2385
37
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
37
        return;
2388
37
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
47
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
47
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
47
    const auto filtered = filter(results);
2384
2385
47
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
47
        return;
2388
47
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
43
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
43
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
43
    const auto filtered = filter(results);
2384
2385
43
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
43
        return;
2388
43
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
51
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
51
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
51
    const auto filtered = filter(results);
2384
2385
51
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
51
        return;
2388
51
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
48
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
48
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
48
    const auto filtered = filter(results);
2384
2385
48
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
48
        return;
2388
48
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
76
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
76
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
76
    const auto filtered = filter(results);
2384
2385
76
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
76
        return;
2388
76
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
62
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
62
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
62
    const auto filtered = filter(results);
2384
2385
62
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
62
        return;
2388
62
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
70
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
70
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
70
    const auto filtered = filter(results);
2384
2385
70
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
70
        return;
2388
70
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
50
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
50
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
50
    const auto filtered = filter(results);
2384
2385
50
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
50
        return;
2388
50
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
31
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
31
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
31
    const auto filtered = filter(results);
2384
2385
31
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
31
        return;
2388
31
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
39
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
39
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
39
    const auto filtered = filter(results);
2384
2385
39
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
39
        return;
2388
39
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
0
}
2418
2419
template <class ResultType, class OperationType>
2420
0
void ExecutorBase<ResultType, OperationType>::abort(std::vector<std::string> moduleNames, const std::string operation, const std::string algorithm, const std::string reason) const {
2421
0
    std::sort(moduleNames.begin(), moduleNames.end());
2422
2423
0
    printf("CPU:\n");
2424
0
    system("cat /proc/cpuinfo | grep '^model name' | head -n1");
2425
0
    system("cat /proc/cpuinfo | grep '^flags' | head -n1");
2426
2427
0
    printf("Assertion failure: ");
2428
0
    for (const auto& moduleName : moduleNames) {
2429
0
        printf("%s-", moduleName.c_str());
2430
0
    }
2431
0
    printf("%s-%s-%s\n", operation.c_str(), algorithm.c_str(), reason.c_str());
2432
0
    fflush(stdout);
2433
2434
0
    ::abort();
2435
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_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::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
2436
2437
template <class ResultType, class OperationType>
2438
246k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
246k
    (void)parentDs;
2440
246k
    return std::move(op);
2441
246k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2438
5.72k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.72k
    (void)parentDs;
2440
5.72k
    return std::move(op);
2441
5.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2438
4.47k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.47k
    (void)parentDs;
2440
4.47k
    return std::move(op);
2441
4.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2438
5.63k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.63k
    (void)parentDs;
2440
5.63k
    return std::move(op);
2441
5.63k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2438
5.44k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.44k
    (void)parentDs;
2440
5.44k
    return std::move(op);
2441
5.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2438
17.7k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
17.7k
    (void)parentDs;
2440
17.7k
    return std::move(op);
2441
17.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2438
12.5k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
12.5k
    (void)parentDs;
2440
12.5k
    return std::move(op);
2441
12.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2438
2.84k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.84k
    (void)parentDs;
2440
2.84k
    return std::move(op);
2441
2.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2438
7.02k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
7.02k
    (void)parentDs;
2440
7.02k
    return std::move(op);
2441
7.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2438
2.94k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.94k
    (void)parentDs;
2440
2.94k
    return std::move(op);
2441
2.94k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2438
2.58k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.58k
    (void)parentDs;
2440
2.58k
    return std::move(op);
2441
2.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2438
2.69k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.69k
    (void)parentDs;
2440
2.69k
    return std::move(op);
2441
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2438
3.43k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.43k
    (void)parentDs;
2440
3.43k
    return std::move(op);
2441
3.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2438
2.36k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.36k
    (void)parentDs;
2440
2.36k
    return std::move(op);
2441
2.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2438
2.66k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.66k
    (void)parentDs;
2440
2.66k
    return std::move(op);
2441
2.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2438
2.92k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.92k
    (void)parentDs;
2440
2.92k
    return std::move(op);
2441
2.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2438
2.08k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.08k
    (void)parentDs;
2440
2.08k
    return std::move(op);
2441
2.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SP_800_108) const
Line
Count
Source
2438
3.50k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.50k
    (void)parentDs;
2440
3.50k
    return std::move(op);
2441
3.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2438
3.24k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.24k
    (void)parentDs;
2440
3.24k
    return std::move(op);
2441
3.24k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2438
2.14k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.14k
    (void)parentDs;
2440
2.14k
    return std::move(op);
2441
2.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2438
2.85k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.85k
    (void)parentDs;
2440
2.85k
    return std::move(op);
2441
2.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const
Line
Count
Source
2438
2.71k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.71k
    (void)parentDs;
2440
2.71k
    return std::move(op);
2441
2.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const
Line
Count
Source
2438
3.75k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.75k
    (void)parentDs;
2440
3.75k
    return std::move(op);
2441
3.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2438
2.89k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.89k
    (void)parentDs;
2440
2.89k
    return std::move(op);
2441
2.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const
Line
Count
Source
2438
2.67k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.67k
    (void)parentDs;
2440
2.67k
    return std::move(op);
2441
2.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2438
2.91k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.91k
    (void)parentDs;
2440
2.91k
    return std::move(op);
2441
2.91k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2438
2.85k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.85k
    (void)parentDs;
2440
2.85k
    return std::move(op);
2441
2.85k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2438
2.27k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.27k
    (void)parentDs;
2440
2.27k
    return std::move(op);
2441
2.27k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2438
2.17k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.17k
    (void)parentDs;
2440
2.17k
    return std::move(op);
2441
2.17k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2438
2.11k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.11k
    (void)parentDs;
2440
2.11k
    return std::move(op);
2441
2.11k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2438
2.22k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.22k
    (void)parentDs;
2440
2.22k
    return std::move(op);
2441
2.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2438
3.17k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.17k
    (void)parentDs;
2440
3.17k
    return std::move(op);
2441
3.17k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2438
2.47k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.47k
    (void)parentDs;
2440
2.47k
    return std::move(op);
2441
2.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2438
2.34k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.34k
    (void)parentDs;
2440
2.34k
    return std::move(op);
2441
2.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2438
1.52k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.52k
    (void)parentDs;
2440
1.52k
    return std::move(op);
2441
1.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2438
2.36k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.36k
    (void)parentDs;
2440
2.36k
    return std::move(op);
2441
2.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const
Line
Count
Source
2438
2.89k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.89k
    (void)parentDs;
2440
2.89k
    return std::move(op);
2441
2.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2438
2.24k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.24k
    (void)parentDs;
2440
2.24k
    return std::move(op);
2441
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2438
3.19k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.19k
    (void)parentDs;
2440
3.19k
    return std::move(op);
2441
3.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2438
2.87k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.87k
    (void)parentDs;
2440
2.87k
    return std::move(op);
2441
2.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2438
2.07k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.07k
    (void)parentDs;
2440
2.07k
    return std::move(op);
2441
2.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const
Line
Count
Source
2438
3.83k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.83k
    (void)parentDs;
2440
3.83k
    return std::move(op);
2441
3.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2438
1.83k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.83k
    (void)parentDs;
2440
1.83k
    return std::move(op);
2441
1.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2438
1.51k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.51k
    (void)parentDs;
2440
1.51k
    return std::move(op);
2441
1.51k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2438
2.50k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.50k
    (void)parentDs;
2440
2.50k
    return std::move(op);
2441
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2438
2.54k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.54k
    (void)parentDs;
2440
2.54k
    return std::move(op);
2441
2.54k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2438
2.84k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.84k
    (void)parentDs;
2440
2.84k
    return std::move(op);
2441
2.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2438
10.1k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
10.1k
    (void)parentDs;
2440
10.1k
    return std::move(op);
2441
10.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2438
2.19k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.19k
    (void)parentDs;
2440
2.19k
    return std::move(op);
2441
2.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2438
2.64k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.64k
    (void)parentDs;
2440
2.64k
    return std::move(op);
2441
2.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2438
1.53k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.53k
    (void)parentDs;
2440
1.53k
    return std::move(op);
2441
1.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2438
1.59k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.59k
    (void)parentDs;
2440
1.59k
    return std::move(op);
2441
1.59k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2438
2.38k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.38k
    (void)parentDs;
2440
2.38k
    return std::move(op);
2441
2.38k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2438
2.32k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.32k
    (void)parentDs;
2440
2.32k
    return std::move(op);
2441
2.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2438
2.12k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.12k
    (void)parentDs;
2440
2.12k
    return std::move(op);
2441
2.12k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2438
2.05k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.05k
    (void)parentDs;
2440
2.05k
    return std::move(op);
2441
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2438
1.91k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.91k
    (void)parentDs;
2440
1.91k
    return std::move(op);
2441
1.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2438
2.11k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.11k
    (void)parentDs;
2440
2.11k
    return std::move(op);
2441
2.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2438
2.10k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.10k
    (void)parentDs;
2440
2.10k
    return std::move(op);
2441
2.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2438
2.34k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.34k
    (void)parentDs;
2440
2.34k
    return std::move(op);
2441
2.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2438
2.03k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.03k
    (void)parentDs;
2440
2.03k
    return std::move(op);
2441
2.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2438
2.25k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.25k
    (void)parentDs;
2440
2.25k
    return std::move(op);
2441
2.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2438
2.90k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.90k
    (void)parentDs;
2440
2.90k
    return std::move(op);
2441
2.90k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2438
2.49k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.49k
    (void)parentDs;
2440
2.49k
    return std::move(op);
2441
2.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2438
2.33k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.33k
    (void)parentDs;
2440
2.33k
    return std::move(op);
2441
2.33k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2438
1.65k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.65k
    (void)parentDs;
2440
1.65k
    return std::move(op);
2441
1.65k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2438
2.32k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.32k
    (void)parentDs;
2440
2.32k
    return std::move(op);
2441
2.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const
Line
Count
Source
2438
2.42k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.42k
    (void)parentDs;
2440
2.42k
    return std::move(op);
2441
2.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
Line
Count
Source
2438
1.75k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.75k
    (void)parentDs;
2440
1.75k
    return std::move(op);
2441
1.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2438
1.82k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.82k
    (void)parentDs;
2440
1.82k
    return std::move(op);
2441
1.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const
Line
Count
Source
2438
1.89k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.89k
    (void)parentDs;
2440
1.89k
    return std::move(op);
2441
1.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2438
2.24k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.24k
    (void)parentDs;
2440
2.24k
    return std::move(op);
2441
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2438
2.09k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.09k
    (void)parentDs;
2440
2.09k
    return std::move(op);
2441
2.09k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2438
1.89k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.89k
    (void)parentDs;
2440
1.89k
    return std::move(op);
2441
1.89k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2438
2.24k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.24k
    (void)parentDs;
2440
2.24k
    return std::move(op);
2441
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2438
2.17k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.17k
    (void)parentDs;
2440
2.17k
    return std::move(op);
2441
2.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2438
2.29k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.29k
    (void)parentDs;
2440
2.29k
    return std::move(op);
2441
2.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2438
2.52k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.52k
    (void)parentDs;
2440
2.52k
    return std::move(op);
2441
2.52k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2438
2.85k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.85k
    (void)parentDs;
2440
2.85k
    return std::move(op);
2441
2.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2438
2.31k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.31k
    (void)parentDs;
2440
2.31k
    return std::move(op);
2441
2.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2438
1.77k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.77k
    (void)parentDs;
2440
1.77k
    return std::move(op);
2441
1.77k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2438
2.67k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.67k
    (void)parentDs;
2440
2.67k
    return std::move(op);
2441
2.67k
}
2442
2443
400
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2444
400
    (void)parentDs;
2445
400
    op.modulo = modulo;
2446
400
    return op;
2447
400
}
2448
2449
255
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2450
255
    (void)parentDs;
2451
255
    op.modulo = modulo;
2452
255
    return op;
2453
255
}
2454
2455
271
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2456
271
    (void)parentDs;
2457
271
    op.modulo = modulo;
2458
271
    return op;
2459
271
}
2460
2461
524
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2462
524
    (void)parentDs;
2463
524
    op.modulo = modulo;
2464
524
    return op;
2465
524
}
2466
2467
300
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2468
300
    (void)parentDs;
2469
300
    op.modulo = modulo;
2470
300
    return op;
2471
300
}
2472
2473
302
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2474
302
    (void)parentDs;
2475
302
    op.modulo = modulo;
2476
302
    return op;
2477
302
}
2478
2479
231
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2480
231
    (void)parentDs;
2481
231
    op.modulo = modulo;
2482
231
    return op;
2483
231
}
2484
2485
414
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2486
414
    (void)parentDs;
2487
414
    op.modulo = modulo;
2488
414
    return op;
2489
414
}
2490
2491
239
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2492
239
    (void)parentDs;
2493
239
    op.modulo = modulo;
2494
239
    return op;
2495
239
}
2496
2497
359
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2498
359
    (void)parentDs;
2499
359
    op.modulo = modulo;
2500
359
    return op;
2501
359
}
2502
2503
210
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2504
210
    (void)parentDs;
2505
210
    op.modulo = modulo;
2506
210
    return op;
2507
210
}
2508
2509
273
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2510
273
    (void)parentDs;
2511
273
    op.modulo = modulo;
2512
273
    return op;
2513
273
}
2514
2515
247
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2516
247
    (void)parentDs;
2517
247
    op.modulo = modulo;
2518
247
    return op;
2519
247
}
2520
2521
613
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2522
613
    (void)parentDs;
2523
613
    op.modulo = modulo;
2524
613
    return op;
2525
613
}
2526
2527
895
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2528
895
    (void)parentDs;
2529
895
    op.modulo = modulo;
2530
895
    return op;
2531
895
}
2532
2533
247
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2534
247
    (void)parentDs;
2535
247
    op.modulo = modulo;
2536
247
    return op;
2537
247
}
2538
2539
242
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2540
242
    (void)parentDs;
2541
242
    op.modulo = modulo;
2542
242
    return op;
2543
242
}
2544
2545
440
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2546
440
    (void)parentDs;
2547
440
    op.modulo = modulo;
2548
440
    return op;
2549
440
}
2550
2551
240
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2552
240
    (void)parentDs;
2553
240
    op.modulo = modulo;
2554
240
    return op;
2555
240
}
2556
2557
template <class ResultType, class OperationType>
2558
255k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
255k
    Datasource ds(data, size);
2560
255k
    if ( parentDs != nullptr ) {
2561
255k
        auto modifier = parentDs->GetData(0);
2562
255k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
255k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
255k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.74k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.74k
    Datasource ds(data, size);
2560
5.74k
    if ( parentDs != nullptr ) {
2561
5.74k
        auto modifier = parentDs->GetData(0);
2562
5.74k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.74k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.49k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.49k
    Datasource ds(data, size);
2560
4.49k
    if ( parentDs != nullptr ) {
2561
4.49k
        auto modifier = parentDs->GetData(0);
2562
4.49k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.49k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.66k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.66k
    Datasource ds(data, size);
2560
5.66k
    if ( parentDs != nullptr ) {
2561
5.66k
        auto modifier = parentDs->GetData(0);
2562
5.66k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.66k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.46k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.46k
    Datasource ds(data, size);
2560
5.46k
    if ( parentDs != nullptr ) {
2561
5.46k
        auto modifier = parentDs->GetData(0);
2562
5.46k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.46k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.46k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
17.7k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
17.7k
    Datasource ds(data, size);
2560
17.7k
    if ( parentDs != nullptr ) {
2561
17.7k
        auto modifier = parentDs->GetData(0);
2562
17.7k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
17.7k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
17.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
12.5k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
12.5k
    Datasource ds(data, size);
2560
12.5k
    if ( parentDs != nullptr ) {
2561
12.5k
        auto modifier = parentDs->GetData(0);
2562
12.5k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
12.5k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
12.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.86k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.86k
    Datasource ds(data, size);
2560
2.86k
    if ( parentDs != nullptr ) {
2561
2.86k
        auto modifier = parentDs->GetData(0);
2562
2.86k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.86k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
7.04k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
7.04k
    Datasource ds(data, size);
2560
7.04k
    if ( parentDs != nullptr ) {
2561
7.04k
        auto modifier = parentDs->GetData(0);
2562
7.04k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
7.04k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
7.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.96k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.96k
    Datasource ds(data, size);
2560
2.96k
    if ( parentDs != nullptr ) {
2561
2.96k
        auto modifier = parentDs->GetData(0);
2562
2.96k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.96k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.60k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.60k
    Datasource ds(data, size);
2560
2.60k
    if ( parentDs != nullptr ) {
2561
2.60k
        auto modifier = parentDs->GetData(0);
2562
2.60k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.60k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.71k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.71k
    Datasource ds(data, size);
2560
2.71k
    if ( parentDs != nullptr ) {
2561
2.71k
        auto modifier = parentDs->GetData(0);
2562
2.71k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.71k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.45k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.45k
    Datasource ds(data, size);
2560
3.45k
    if ( parentDs != nullptr ) {
2561
3.45k
        auto modifier = parentDs->GetData(0);
2562
3.45k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.45k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.38k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.38k
    Datasource ds(data, size);
2560
2.38k
    if ( parentDs != nullptr ) {
2561
2.38k
        auto modifier = parentDs->GetData(0);
2562
2.38k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.38k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.69k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.69k
    Datasource ds(data, size);
2560
2.69k
    if ( parentDs != nullptr ) {
2561
2.69k
        auto modifier = parentDs->GetData(0);
2562
2.69k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.69k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.94k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.94k
    Datasource ds(data, size);
2560
2.94k
    if ( parentDs != nullptr ) {
2561
2.94k
        auto modifier = parentDs->GetData(0);
2562
2.94k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.94k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.94k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.10k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.10k
    Datasource ds(data, size);
2560
2.10k
    if ( parentDs != nullptr ) {
2561
2.10k
        auto modifier = parentDs->GetData(0);
2562
2.10k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.10k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.53k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.53k
    Datasource ds(data, size);
2560
3.53k
    if ( parentDs != nullptr ) {
2561
3.53k
        auto modifier = parentDs->GetData(0);
2562
3.53k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.53k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.26k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.26k
    Datasource ds(data, size);
2560
3.26k
    if ( parentDs != nullptr ) {
2561
3.26k
        auto modifier = parentDs->GetData(0);
2562
3.26k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.26k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.26k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.16k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.16k
    Datasource ds(data, size);
2560
2.16k
    if ( parentDs != nullptr ) {
2561
2.16k
        auto modifier = parentDs->GetData(0);
2562
2.16k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.16k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.87k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.87k
    Datasource ds(data, size);
2560
2.87k
    if ( parentDs != nullptr ) {
2561
2.87k
        auto modifier = parentDs->GetData(0);
2562
2.87k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.87k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.73k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.73k
    Datasource ds(data, size);
2560
2.73k
    if ( parentDs != nullptr ) {
2561
2.73k
        auto modifier = parentDs->GetData(0);
2562
2.73k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.73k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.77k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.77k
    Datasource ds(data, size);
2560
3.77k
    if ( parentDs != nullptr ) {
2561
3.77k
        auto modifier = parentDs->GetData(0);
2562
3.77k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.77k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.91k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.91k
    Datasource ds(data, size);
2560
2.91k
    if ( parentDs != nullptr ) {
2561
2.91k
        auto modifier = parentDs->GetData(0);
2562
2.91k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.91k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.68k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.68k
    Datasource ds(data, size);
2560
2.68k
    if ( parentDs != nullptr ) {
2561
2.68k
        auto modifier = parentDs->GetData(0);
2562
2.68k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.68k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.93k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.93k
    Datasource ds(data, size);
2560
2.93k
    if ( parentDs != nullptr ) {
2561
2.93k
        auto modifier = parentDs->GetData(0);
2562
2.93k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.93k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.93k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.87k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.87k
    Datasource ds(data, size);
2560
2.87k
    if ( parentDs != nullptr ) {
2561
2.87k
        auto modifier = parentDs->GetData(0);
2562
2.87k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.87k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.87k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.30k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.30k
    Datasource ds(data, size);
2560
2.30k
    if ( parentDs != nullptr ) {
2561
2.30k
        auto modifier = parentDs->GetData(0);
2562
2.30k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.30k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.30k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.20k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.20k
    Datasource ds(data, size);
2560
2.20k
    if ( parentDs != nullptr ) {
2561
2.20k
        auto modifier = parentDs->GetData(0);
2562
2.20k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.20k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.20k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.13k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.13k
    Datasource ds(data, size);
2560
2.13k
    if ( parentDs != nullptr ) {
2561
2.13k
        auto modifier = parentDs->GetData(0);
2562
2.13k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.13k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.13k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.24k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.24k
    Datasource ds(data, size);
2560
2.24k
    if ( parentDs != nullptr ) {
2561
2.24k
        auto modifier = parentDs->GetData(0);
2562
2.24k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.24k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.20k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.20k
    Datasource ds(data, size);
2560
3.20k
    if ( parentDs != nullptr ) {
2561
3.20k
        auto modifier = parentDs->GetData(0);
2562
3.20k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.20k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.20k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.50k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.50k
    Datasource ds(data, size);
2560
2.50k
    if ( parentDs != nullptr ) {
2561
2.50k
        auto modifier = parentDs->GetData(0);
2562
2.50k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.50k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.37k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.37k
    Datasource ds(data, size);
2560
2.37k
    if ( parentDs != nullptr ) {
2561
2.37k
        auto modifier = parentDs->GetData(0);
2562
2.37k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.37k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.53k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.53k
    Datasource ds(data, size);
2560
1.53k
    if ( parentDs != nullptr ) {
2561
1.53k
        auto modifier = parentDs->GetData(0);
2562
1.53k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.53k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.39k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.39k
    Datasource ds(data, size);
2560
2.39k
    if ( parentDs != nullptr ) {
2561
2.39k
        auto modifier = parentDs->GetData(0);
2562
2.39k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.39k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.92k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.92k
    Datasource ds(data, size);
2560
2.92k
    if ( parentDs != nullptr ) {
2561
2.92k
        auto modifier = parentDs->GetData(0);
2562
2.92k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.92k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.27k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.27k
    Datasource ds(data, size);
2560
2.27k
    if ( parentDs != nullptr ) {
2561
2.27k
        auto modifier = parentDs->GetData(0);
2562
2.27k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.27k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.27k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.22k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.22k
    Datasource ds(data, size);
2560
3.22k
    if ( parentDs != nullptr ) {
2561
3.22k
        auto modifier = parentDs->GetData(0);
2562
3.22k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.22k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.90k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.90k
    Datasource ds(data, size);
2560
2.90k
    if ( parentDs != nullptr ) {
2561
2.90k
        auto modifier = parentDs->GetData(0);
2562
2.90k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.90k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.90k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.09k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.09k
    Datasource ds(data, size);
2560
2.09k
    if ( parentDs != nullptr ) {
2561
2.09k
        auto modifier = parentDs->GetData(0);
2562
2.09k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.09k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.09k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.86k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.86k
    Datasource ds(data, size);
2560
3.86k
    if ( parentDs != nullptr ) {
2561
3.86k
        auto modifier = parentDs->GetData(0);
2562
3.86k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.86k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.85k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.85k
    Datasource ds(data, size);
2560
1.85k
    if ( parentDs != nullptr ) {
2561
1.85k
        auto modifier = parentDs->GetData(0);
2562
1.85k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.85k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.53k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.53k
    Datasource ds(data, size);
2560
1.53k
    if ( parentDs != nullptr ) {
2561
1.53k
        auto modifier = parentDs->GetData(0);
2562
1.53k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.53k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.53k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.53k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.53k
    Datasource ds(data, size);
2560
2.53k
    if ( parentDs != nullptr ) {
2561
2.53k
        auto modifier = parentDs->GetData(0);
2562
2.53k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.53k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.56k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.56k
    Datasource ds(data, size);
2560
2.56k
    if ( parentDs != nullptr ) {
2561
2.56k
        auto modifier = parentDs->GetData(0);
2562
2.56k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.56k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.86k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.86k
    Datasource ds(data, size);
2560
2.86k
    if ( parentDs != nullptr ) {
2561
2.86k
        auto modifier = parentDs->GetData(0);
2562
2.86k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.86k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
16.9k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
16.9k
    Datasource ds(data, size);
2560
16.9k
    if ( parentDs != nullptr ) {
2561
16.9k
        auto modifier = parentDs->GetData(0);
2562
16.9k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
16.9k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
16.9k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.21k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.21k
    Datasource ds(data, size);
2560
2.21k
    if ( parentDs != nullptr ) {
2561
2.21k
        auto modifier = parentDs->GetData(0);
2562
2.21k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.21k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.68k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.68k
    Datasource ds(data, size);
2560
2.68k
    if ( parentDs != nullptr ) {
2561
2.68k
        auto modifier = parentDs->GetData(0);
2562
2.68k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.68k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.55k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.55k
    Datasource ds(data, size);
2560
1.55k
    if ( parentDs != nullptr ) {
2561
1.55k
        auto modifier = parentDs->GetData(0);
2562
1.55k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.55k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.60k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.60k
    Datasource ds(data, size);
2560
1.60k
    if ( parentDs != nullptr ) {
2561
1.60k
        auto modifier = parentDs->GetData(0);
2562
1.60k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.60k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.40k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.40k
    Datasource ds(data, size);
2560
2.40k
    if ( parentDs != nullptr ) {
2561
2.40k
        auto modifier = parentDs->GetData(0);
2562
2.40k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.40k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.40k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.35k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.35k
    Datasource ds(data, size);
2560
2.35k
    if ( parentDs != nullptr ) {
2561
2.35k
        auto modifier = parentDs->GetData(0);
2562
2.35k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.35k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.35k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.19k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.19k
    Datasource ds(data, size);
2560
2.19k
    if ( parentDs != nullptr ) {
2561
2.19k
        auto modifier = parentDs->GetData(0);
2562
2.19k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.19k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.19k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.11k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.11k
    Datasource ds(data, size);
2560
2.11k
    if ( parentDs != nullptr ) {
2561
2.11k
        auto modifier = parentDs->GetData(0);
2562
2.11k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.11k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.98k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.98k
    Datasource ds(data, size);
2560
1.98k
    if ( parentDs != nullptr ) {
2561
1.98k
        auto modifier = parentDs->GetData(0);
2562
1.98k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.98k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.17k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.17k
    Datasource ds(data, size);
2560
2.17k
    if ( parentDs != nullptr ) {
2561
2.17k
        auto modifier = parentDs->GetData(0);
2562
2.17k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.17k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.12k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.12k
    Datasource ds(data, size);
2560
2.12k
    if ( parentDs != nullptr ) {
2561
2.12k
        auto modifier = parentDs->GetData(0);
2562
2.12k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.12k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.36k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.36k
    Datasource ds(data, size);
2560
2.36k
    if ( parentDs != nullptr ) {
2561
2.36k
        auto modifier = parentDs->GetData(0);
2562
2.36k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.36k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.05k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.05k
    Datasource ds(data, size);
2560
2.05k
    if ( parentDs != nullptr ) {
2561
2.05k
        auto modifier = parentDs->GetData(0);
2562
2.05k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.05k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.27k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.27k
    Datasource ds(data, size);
2560
2.27k
    if ( parentDs != nullptr ) {
2561
2.27k
        auto modifier = parentDs->GetData(0);
2562
2.27k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.27k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.27k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.93k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.93k
    Datasource ds(data, size);
2560
2.93k
    if ( parentDs != nullptr ) {
2561
2.93k
        auto modifier = parentDs->GetData(0);
2562
2.93k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.93k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.51k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.51k
    Datasource ds(data, size);
2560
2.51k
    if ( parentDs != nullptr ) {
2561
2.51k
        auto modifier = parentDs->GetData(0);
2562
2.51k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.51k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.35k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.35k
    Datasource ds(data, size);
2560
2.35k
    if ( parentDs != nullptr ) {
2561
2.35k
        auto modifier = parentDs->GetData(0);
2562
2.35k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.35k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.35k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.67k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.67k
    Datasource ds(data, size);
2560
1.67k
    if ( parentDs != nullptr ) {
2561
1.67k
        auto modifier = parentDs->GetData(0);
2562
1.67k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.67k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.67k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.33k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.33k
    Datasource ds(data, size);
2560
2.33k
    if ( parentDs != nullptr ) {
2561
2.33k
        auto modifier = parentDs->GetData(0);
2562
2.33k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.33k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.33k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.45k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.45k
    Datasource ds(data, size);
2560
2.45k
    if ( parentDs != nullptr ) {
2561
2.45k
        auto modifier = parentDs->GetData(0);
2562
2.45k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.45k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.77k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.77k
    Datasource ds(data, size);
2560
1.77k
    if ( parentDs != nullptr ) {
2561
1.77k
        auto modifier = parentDs->GetData(0);
2562
1.77k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.77k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.84k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.84k
    Datasource ds(data, size);
2560
1.84k
    if ( parentDs != nullptr ) {
2561
1.84k
        auto modifier = parentDs->GetData(0);
2562
1.84k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.84k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.92k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.92k
    Datasource ds(data, size);
2560
1.92k
    if ( parentDs != nullptr ) {
2561
1.92k
        auto modifier = parentDs->GetData(0);
2562
1.92k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.92k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.26k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.26k
    Datasource ds(data, size);
2560
2.26k
    if ( parentDs != nullptr ) {
2561
2.26k
        auto modifier = parentDs->GetData(0);
2562
2.26k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.26k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.10k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.10k
    Datasource ds(data, size);
2560
2.10k
    if ( parentDs != nullptr ) {
2561
2.10k
        auto modifier = parentDs->GetData(0);
2562
2.10k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.10k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.91k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.91k
    Datasource ds(data, size);
2560
1.91k
    if ( parentDs != nullptr ) {
2561
1.91k
        auto modifier = parentDs->GetData(0);
2562
1.91k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.91k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.91k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.26k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.26k
    Datasource ds(data, size);
2560
2.26k
    if ( parentDs != nullptr ) {
2561
2.26k
        auto modifier = parentDs->GetData(0);
2562
2.26k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.26k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.19k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.19k
    Datasource ds(data, size);
2560
2.19k
    if ( parentDs != nullptr ) {
2561
2.19k
        auto modifier = parentDs->GetData(0);
2562
2.19k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.19k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.31k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.31k
    Datasource ds(data, size);
2560
2.31k
    if ( parentDs != nullptr ) {
2561
2.31k
        auto modifier = parentDs->GetData(0);
2562
2.31k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.31k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.56k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.56k
    Datasource ds(data, size);
2560
2.56k
    if ( parentDs != nullptr ) {
2561
2.56k
        auto modifier = parentDs->GetData(0);
2562
2.56k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.56k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.56k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.87k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.87k
    Datasource ds(data, size);
2560
2.87k
    if ( parentDs != nullptr ) {
2561
2.87k
        auto modifier = parentDs->GetData(0);
2562
2.87k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.87k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.33k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.33k
    Datasource ds(data, size);
2560
2.33k
    if ( parentDs != nullptr ) {
2561
2.33k
        auto modifier = parentDs->GetData(0);
2562
2.33k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.33k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.33k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.79k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.79k
    Datasource ds(data, size);
2560
1.79k
    if ( parentDs != nullptr ) {
2561
1.79k
        auto modifier = parentDs->GetData(0);
2562
1.79k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.79k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.79k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.69k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.69k
    Datasource ds(data, size);
2560
2.69k
    if ( parentDs != nullptr ) {
2561
2.69k
        auto modifier = parentDs->GetData(0);
2562
2.69k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.69k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.69k
}
2567
2568
template <class ResultType, class OperationType>
2569
252k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
252k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
252k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
252k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
252k
    if ( modules.find(moduleID) == modules.end() ) {
2583
178k
        return nullptr;
2584
178k
    }
2585
2586
74.5k
    return modules.at(moduleID);
2587
252k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.72k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.72k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.72k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.72k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.72k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.67k
        return nullptr;
2584
1.67k
    }
2585
2586
4.05k
    return modules.at(moduleID);
2587
5.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.47k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.47k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.47k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.47k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.47k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.14k
        return nullptr;
2584
2.14k
    }
2585
2586
2.33k
    return modules.at(moduleID);
2587
4.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.63k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.63k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.63k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.63k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.63k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.68k
        return nullptr;
2584
2.68k
    }
2585
2586
2.95k
    return modules.at(moduleID);
2587
5.63k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.44k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.44k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.44k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.44k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.44k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.54k
        return nullptr;
2584
2.54k
    }
2585
2586
2.89k
    return modules.at(moduleID);
2587
5.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
17.7k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
17.7k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
17.7k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
17.7k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
17.7k
    if ( modules.find(moduleID) == modules.end() ) {
2583
5.28k
        return nullptr;
2584
5.28k
    }
2585
2586
12.4k
    return modules.at(moduleID);
2587
17.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
12.5k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
12.5k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
12.5k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
12.5k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
12.5k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.49k
        return nullptr;
2584
3.49k
    }
2585
2586
9.05k
    return modules.at(moduleID);
2587
12.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.84k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.84k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.84k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.84k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.84k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.01k
        return nullptr;
2584
2.01k
    }
2585
2586
830
    return modules.at(moduleID);
2587
2.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
7.02k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
7.02k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
7.02k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
7.02k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
7.02k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.60k
        return nullptr;
2584
2.60k
    }
2585
2586
4.41k
    return modules.at(moduleID);
2587
7.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.94k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.94k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.94k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.94k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.94k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.24k
        return nullptr;
2584
2.24k
    }
2585
2586
693
    return modules.at(moduleID);
2587
2.94k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.58k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.58k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.58k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.58k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.58k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.97k
        return nullptr;
2584
1.97k
    }
2585
2586
603
    return modules.at(moduleID);
2587
2.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.69k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.69k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.69k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.69k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.69k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.04k
        return nullptr;
2584
2.04k
    }
2585
2586
643
    return modules.at(moduleID);
2587
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.43k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.43k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.43k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.43k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.43k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.92k
        return nullptr;
2584
1.92k
    }
2585
2586
1.50k
    return modules.at(moduleID);
2587
3.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.36k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.36k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.36k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.36k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.36k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.90k
        return nullptr;
2584
1.90k
    }
2585
2586
453
    return modules.at(moduleID);
2587
2.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.66k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.66k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.66k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.66k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.66k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.01k
        return nullptr;
2584
2.01k
    }
2585
2586
654
    return modules.at(moduleID);
2587
2.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.92k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.92k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.92k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.92k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.92k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.41k
        return nullptr;
2584
2.41k
    }
2585
2586
502
    return modules.at(moduleID);
2587
2.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.08k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.08k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.08k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.08k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.08k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.96k
        return nullptr;
2584
1.96k
    }
2585
2586
122
    return modules.at(moduleID);
2587
2.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.50k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.50k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.50k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.50k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.50k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.05k
        return nullptr;
2584
2.05k
    }
2585
2586
1.45k
    return modules.at(moduleID);
2587
3.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.24k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.24k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.24k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.24k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.24k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.62k
        return nullptr;
2584
1.62k
    }
2585
2586
1.62k
    return modules.at(moduleID);
2587
3.24k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.14k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.14k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.14k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.14k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.14k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.75k
        return nullptr;
2584
1.75k
    }
2585
2586
387
    return modules.at(moduleID);
2587
2.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.85k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.85k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.85k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.85k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.85k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.98k
        return nullptr;
2584
1.98k
    }
2585
2586
868
    return modules.at(moduleID);
2587
2.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.71k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.71k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.71k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.71k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.71k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.49k
        return nullptr;
2584
2.49k
    }
2585
2586
220
    return modules.at(moduleID);
2587
2.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.75k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.75k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.75k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.75k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.75k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.63k
        return nullptr;
2584
2.63k
    }
2585
2586
1.11k
    return modules.at(moduleID);
2587
3.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.89k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.89k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.89k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.89k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.89k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.48k
        return nullptr;
2584
2.48k
    }
2585
2586
411
    return modules.at(moduleID);
2587
2.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.67k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.67k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.67k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.67k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.67k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.48k
        return nullptr;
2584
2.48k
    }
2585
2586
188
    return modules.at(moduleID);
2587
2.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.91k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.91k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.91k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.91k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.91k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.70k
        return nullptr;
2584
2.70k
    }
2585
2586
210
    return modules.at(moduleID);
2587
2.91k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.85k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.85k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.85k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.85k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.85k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.68k
        return nullptr;
2584
2.68k
    }
2585
2586
175
    return modules.at(moduleID);
2587
2.85k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.27k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.27k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.27k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.27k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.27k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.64k
        return nullptr;
2584
1.64k
    }
2585
2586
639
    return modules.at(moduleID);
2587
2.27k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.17k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.17k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.17k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.17k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.17k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.87k
        return nullptr;
2584
1.87k
    }
2585
2586
302
    return modules.at(moduleID);
2587
2.17k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.11k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.11k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.11k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.11k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.11k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.96k
        return nullptr;
2584
1.96k
    }
2585
2586
143
    return modules.at(moduleID);
2587
2.11k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.22k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.22k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.22k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.22k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.22k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.06k
        return nullptr;
2584
2.06k
    }
2585
2586
163
    return modules.at(moduleID);
2587
2.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.17k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.17k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.17k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.17k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.17k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.19k
        return nullptr;
2584
2.19k
    }
2585
2586
983
    return modules.at(moduleID);
2587
3.17k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.47k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.47k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.47k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.47k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.47k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.28k
        return nullptr;
2584
2.28k
    }
2585
2586
189
    return modules.at(moduleID);
2587
2.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.34k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.34k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.34k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.34k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.34k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.17k
        return nullptr;
2584
2.17k
    }
2585
2586
173
    return modules.at(moduleID);
2587
2.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.52k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.52k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.52k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.52k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.52k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.36k
        return nullptr;
2584
1.36k
    }
2585
2586
157
    return modules.at(moduleID);
2587
1.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.36k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.36k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.36k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.36k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.36k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.17k
        return nullptr;
2584
2.17k
    }
2585
2586
191
    return modules.at(moduleID);
2587
2.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.89k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.89k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.89k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.89k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.89k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.70k
        return nullptr;
2584
2.70k
    }
2585
2586
196
    return modules.at(moduleID);
2587
2.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.24k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.24k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.24k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.24k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.24k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.07k
        return nullptr;
2584
2.07k
    }
2585
2586
164
    return modules.at(moduleID);
2587
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.19k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.19k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.19k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.19k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.19k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.03k
        return nullptr;
2584
3.03k
    }
2585
2586
163
    return modules.at(moduleID);
2587
3.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.87k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.87k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.87k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.87k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.87k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.65k
        return nullptr;
2584
2.65k
    }
2585
2586
220
    return modules.at(moduleID);
2587
2.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.07k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.07k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.07k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.07k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.07k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.80k
        return nullptr;
2584
1.80k
    }
2585
2586
273
    return modules.at(moduleID);
2587
2.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.83k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.83k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.83k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.83k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.83k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.44k
        return nullptr;
2584
2.44k
    }
2585
2586
1.38k
    return modules.at(moduleID);
2587
3.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.83k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.83k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.83k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.83k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.83k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.61k
        return nullptr;
2584
1.61k
    }
2585
2586
221
    return modules.at(moduleID);
2587
1.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.51k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.51k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.51k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.51k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.51k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.29k
        return nullptr;
2584
1.29k
    }
2585
2586
218
    return modules.at(moduleID);
2587
1.51k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.50k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.50k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.50k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.50k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.50k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.25k
        return nullptr;
2584
2.25k
    }
2585
2586
257
    return modules.at(moduleID);
2587
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.54k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.54k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.54k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.54k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.54k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.35k
        return nullptr;
2584
2.35k
    }
2585
2586
191
    return modules.at(moduleID);
2587
2.54k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.84k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.84k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.84k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.84k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.84k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.36k
        return nullptr;
2584
2.36k
    }
2585
2586
482
    return modules.at(moduleID);
2587
2.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
16.8k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
16.8k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
16.8k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
16.8k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
16.8k
    if ( modules.find(moduleID) == modules.end() ) {
2583
6.72k
        return nullptr;
2584
6.72k
    }
2585
2586
10.1k
    return modules.at(moduleID);
2587
16.8k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.19k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.19k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.19k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.19k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.19k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.97k
        return nullptr;
2584
1.97k
    }
2585
2586
219
    return modules.at(moduleID);
2587
2.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.64k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.64k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.64k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.64k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.64k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.06k
        return nullptr;
2584
2.06k
    }
2585
2586
576
    return modules.at(moduleID);
2587
2.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.53k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.53k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.53k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.53k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.53k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.37k
        return nullptr;
2584
1.37k
    }
2585
2586
163
    return modules.at(moduleID);
2587
1.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.59k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.59k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.59k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.59k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.59k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.39k
        return nullptr;
2584
1.39k
    }
2585
2586
199
    return modules.at(moduleID);
2587
1.59k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.38k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.38k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.38k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.38k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.38k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.19k
        return nullptr;
2584
2.19k
    }
2585
2586
197
    return modules.at(moduleID);
2587
2.38k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.32k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.32k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.32k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.32k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.32k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.13k
        return nullptr;
2584
2.13k
    }
2585
2586
184
    return modules.at(moduleID);
2587
2.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.12k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.12k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.12k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.12k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.12k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.91k
        return nullptr;
2584
1.91k
    }
2585
2586
215
    return modules.at(moduleID);
2587
2.12k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.05k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.05k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.05k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.05k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.05k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.82k
        return nullptr;
2584
1.82k
    }
2585
2586
231
    return modules.at(moduleID);
2587
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.91k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.91k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.91k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.91k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.91k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.73k
        return nullptr;
2584
1.73k
    }
2585
2586
183
    return modules.at(moduleID);
2587
1.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.11k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.11k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.11k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.11k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.11k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.95k
        return nullptr;
2584
1.95k
    }
2585
2586
158
    return modules.at(moduleID);
2587
2.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.10k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.10k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.10k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.10k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.10k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.97k
        return nullptr;
2584
1.97k
    }
2585
2586
135
    return modules.at(moduleID);
2587
2.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.34k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.34k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.34k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.34k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.34k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.15k
        return nullptr;
2584
2.15k
    }
2585
2586
194
    return modules.at(moduleID);
2587
2.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.03k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.03k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.03k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.03k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.03k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.83k
        return nullptr;
2584
1.83k
    }
2585
2586
199
    return modules.at(moduleID);
2587
2.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.25k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.25k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.25k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.25k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.25k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.08k
        return nullptr;
2584
2.08k
    }
2585
2586
175
    return modules.at(moduleID);
2587
2.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.90k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.90k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.90k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.90k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.90k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.73k
        return nullptr;
2584
2.73k
    }
2585
2586
177
    return modules.at(moduleID);
2587
2.90k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.49k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.49k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.49k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.49k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.49k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.31k
        return nullptr;
2584
2.31k
    }
2585
2586
183
    return modules.at(moduleID);
2587
2.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.33k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.33k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.33k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.33k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.33k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.14k
        return nullptr;
2584
2.14k
    }
2585
2586
196
    return modules.at(moduleID);
2587
2.33k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.65k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.65k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.65k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.65k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.65k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.46k
        return nullptr;
2584
1.46k
    }
2585
2586
192
    return modules.at(moduleID);
2587
1.65k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.32k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.32k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.32k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.32k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.32k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.09k
        return nullptr;
2584
2.09k
    }
2585
2586
231
    return modules.at(moduleID);
2587
2.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.42k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.42k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.42k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.42k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.42k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.24k
        return nullptr;
2584
2.24k
    }
2585
2586
179
    return modules.at(moduleID);
2587
2.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.75k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.75k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.75k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.75k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.75k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.60k
        return nullptr;
2584
1.60k
    }
2585
2586
150
    return modules.at(moduleID);
2587
1.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.82k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.82k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.82k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.82k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.82k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.66k
        return nullptr;
2584
1.66k
    }
2585
2586
160
    return modules.at(moduleID);
2587
1.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.89k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.89k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.89k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.89k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.89k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.75k
        return nullptr;
2584
1.75k
    }
2585
2586
144
    return modules.at(moduleID);
2587
1.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.24k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.24k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.24k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.24k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.24k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.07k
        return nullptr;
2584
2.07k
    }
2585
2586
171
    return modules.at(moduleID);
2587
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.09k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.09k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.09k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.09k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.09k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.90k
        return nullptr;
2584
1.90k
    }
2585
2586
190
    return modules.at(moduleID);
2587
2.09k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.89k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.89k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.89k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.89k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.89k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.71k
        return nullptr;
2584
1.71k
    }
2585
2586
180
    return modules.at(moduleID);
2587
1.89k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.24k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.24k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.24k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.24k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.24k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.03k
        return nullptr;
2584
2.03k
    }
2585
2586
211
    return modules.at(moduleID);
2587
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.17k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.17k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.17k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.17k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.17k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.98k
        return nullptr;
2584
1.98k
    }
2585
2586
189
    return modules.at(moduleID);
2587
2.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.29k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.29k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.29k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.29k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.29k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.04k
        return nullptr;
2584
2.04k
    }
2585
2586
251
    return modules.at(moduleID);
2587
2.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.52k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.52k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.52k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.52k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.52k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.32k
        return nullptr;
2584
2.32k
    }
2585
2586
205
    return modules.at(moduleID);
2587
2.52k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.85k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.85k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.85k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.85k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.85k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.61k
        return nullptr;
2584
2.61k
    }
2585
2586
235
    return modules.at(moduleID);
2587
2.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.31k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.31k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.31k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.31k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.31k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.09k
        return nullptr;
2584
2.09k
    }
2585
2586
212
    return modules.at(moduleID);
2587
2.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.77k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.77k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.77k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.77k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.77k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.61k
        return nullptr;
2584
1.61k
    }
2585
2586
161
    return modules.at(moduleID);
2587
1.77k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.67k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.67k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.67k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.67k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.67k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.46k
        return nullptr;
2584
2.46k
    }
2585
2586
212
    return modules.at(moduleID);
2587
2.67k
}
2588
2589
template <class ResultType, class OperationType>
2590
37.5k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
37.5k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
37.5k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
255k
    do {
2596
255k
        auto op = getOp(&parentDs, data, size);
2597
255k
        auto module = getModule(parentDs);
2598
255k
        if ( module == nullptr ) {
2599
178k
            continue;
2600
178k
        }
2601
2602
76.6k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
76.6k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
838
            break;
2607
838
        }
2608
254k
    } while ( parentDs.Get<bool>() == true );
2609
2610
37.5k
    if ( operations.empty() == true ) {
2611
1.08k
        return;
2612
1.08k
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
36.4k
#if 1
2616
36.4k
    {
2617
36.4k
        std::set<uint64_t> moduleIDs;
2618
58.1k
        for (const auto& m : modules ) {
2619
58.1k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
58.1k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
58.1k
            moduleIDs.insert(moduleID);
2627
58.1k
        }
2628
2629
36.4k
        std::set<uint64_t> operationModuleIDs;
2630
67.1k
        for (const auto& op : operations) {
2631
67.1k
            operationModuleIDs.insert(op.first->ID);
2632
67.1k
        }
2633
2634
36.4k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
36.4k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
36.4k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
36.4k
        for (const auto& id : addModuleIDs) {
2639
27.8k
            operations.push_back({ modules.at(id), operations[0].second});
2640
27.8k
        }
2641
36.4k
    }
2642
36.4k
#endif
2643
2644
36.4k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
36.4k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
131k
    for (size_t i = 0; i < operations.size(); i++) {
2652
95.0k
        auto& operation = operations[i];
2653
2654
95.0k
        auto& module = operation.first;
2655
95.0k
        auto& op = operation.second;
2656
2657
95.0k
        if ( i > 0 ) {
2658
65.9k
            auto& prevModule = operations[i-1].first;
2659
65.9k
            auto& prevOp = operations[i].second;
2660
2661
65.9k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
35.5k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
35.5k
                if ( curModifier.size() == 0 ) {
2664
12.3M
                    for (size_t j = 0; j < 512; j++) {
2665
12.3M
                        curModifier.push_back(1);
2666
12.3M
                    }
2667
24.1k
                } else {
2668
232k
                    for (auto& c : curModifier) {
2669
232k
                        c++;
2670
232k
                    }
2671
11.4k
                }
2672
35.5k
            }
2673
65.9k
        }
2674
2675
95.0k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
95.0k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
95.0k
        const auto& result = results.back();
2682
2683
95.0k
        if ( result.second != std::nullopt ) {
2684
25.3k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
25.3k
        }
2691
2692
95.0k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
95.0k
        if ( options.disableTests == false ) {
2701
95.0k
            tests::test(op, result.second);
2702
95.0k
        }
2703
2704
95.0k
        postprocess(module, op, result);
2705
95.0k
    }
2706
2707
36.4k
    if ( options.noCompare == false ) {
2708
29.0k
        compare(operations, results, data, size);
2709
29.0k
    }
2710
36.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
2.44k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
2.44k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
2.44k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.74k
    do {
2596
5.74k
        auto op = getOp(&parentDs, data, size);
2597
5.74k
        auto module = getModule(parentDs);
2598
5.74k
        if ( module == nullptr ) {
2599
1.67k
            continue;
2600
1.67k
        }
2601
2602
4.07k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
4.07k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
2
            break;
2607
2
        }
2608
5.74k
    } while ( parentDs.Get<bool>() == true );
2609
2610
2.44k
    if ( operations.empty() == true ) {
2611
15
        return;
2612
15
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
2.42k
#if 1
2616
2.42k
    {
2617
2.42k
        std::set<uint64_t> moduleIDs;
2618
4.56k
        for (const auto& m : modules ) {
2619
4.56k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
4.56k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
4.56k
            moduleIDs.insert(moduleID);
2627
4.56k
        }
2628
2629
2.42k
        std::set<uint64_t> operationModuleIDs;
2630
3.91k
        for (const auto& op : operations) {
2631
3.91k
            operationModuleIDs.insert(op.first->ID);
2632
3.91k
        }
2633
2634
2.42k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
2.42k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
2.42k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
2.42k
        for (const auto& id : addModuleIDs) {
2639
2.25k
            operations.push_back({ modules.at(id), operations[0].second});
2640
2.25k
        }
2641
2.42k
    }
2642
2.42k
#endif
2643
2644
2.42k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
2.42k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
8.59k
    for (size_t i = 0; i < operations.size(); i++) {
2652
6.16k
        auto& operation = operations[i];
2653
2654
6.16k
        auto& module = operation.first;
2655
6.16k
        auto& op = operation.second;
2656
2657
6.16k
        if ( i > 0 ) {
2658
3.88k
            auto& prevModule = operations[i-1].first;
2659
3.88k
            auto& prevOp = operations[i].second;
2660
2661
3.88k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
1.56k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
1.56k
                if ( curModifier.size() == 0 ) {
2664
575k
                    for (size_t j = 0; j < 512; j++) {
2665
574k
                        curModifier.push_back(1);
2666
574k
                    }
2667
1.12k
                } else {
2668
6.80k
                    for (auto& c : curModifier) {
2669
6.80k
                        c++;
2670
6.80k
                    }
2671
445
                }
2672
1.56k
            }
2673
3.88k
        }
2674
2675
6.16k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
6.16k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
6.16k
        const auto& result = results.back();
2682
2683
6.16k
        if ( result.second != std::nullopt ) {
2684
2.45k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
2.45k
        }
2691
2692
6.16k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
6.16k
        if ( options.disableTests == false ) {
2701
6.16k
            tests::test(op, result.second);
2702
6.16k
        }
2703
2704
6.16k
        postprocess(module, op, result);
2705
6.16k
    }
2706
2707
2.42k
    if ( options.noCompare == false ) {
2708
2.28k
        compare(operations, results, data, size);
2709
2.28k
    }
2710
2.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
948
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
948
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
948
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.49k
    do {
2596
4.49k
        auto op = getOp(&parentDs, data, size);
2597
4.49k
        auto module = getModule(parentDs);
2598
4.49k
        if ( module == nullptr ) {
2599
2.14k
            continue;
2600
2.14k
        }
2601
2602
2.35k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
2.35k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
3
            break;
2607
3
        }
2608
4.49k
    } while ( parentDs.Get<bool>() == true );
2609
2610
948
    if ( operations.empty() == true ) {
2611
2
        return;
2612
2
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
946
#if 1
2616
946
    {
2617
946
        std::set<uint64_t> moduleIDs;
2618
1.76k
        for (const auto& m : modules ) {
2619
1.76k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.76k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.76k
            moduleIDs.insert(moduleID);
2627
1.76k
        }
2628
2629
946
        std::set<uint64_t> operationModuleIDs;
2630
2.21k
        for (const auto& op : operations) {
2631
2.21k
            operationModuleIDs.insert(op.first->ID);
2632
2.21k
        }
2633
2634
946
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
946
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
946
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
946
        for (const auto& id : addModuleIDs) {
2639
854
            operations.push_back({ modules.at(id), operations[0].second});
2640
854
        }
2641
946
    }
2642
946
#endif
2643
2644
946
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
946
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
4.01k
    for (size_t i = 0; i < operations.size(); i++) {
2652
3.06k
        auto& operation = operations[i];
2653
2654
3.06k
        auto& module = operation.first;
2655
3.06k
        auto& op = operation.second;
2656
2657
3.06k
        if ( i > 0 ) {
2658
2.18k
            auto& prevModule = operations[i-1].first;
2659
2.18k
            auto& prevOp = operations[i].second;
2660
2661
2.18k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
1.23k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
1.23k
                if ( curModifier.size() == 0 ) {
2664
463k
                    for (size_t j = 0; j < 512; j++) {
2665
462k
                        curModifier.push_back(1);
2666
462k
                    }
2667
903
                } else {
2668
620
                    for (auto& c : curModifier) {
2669
620
                        c++;
2670
620
                    }
2671
334
                }
2672
1.23k
            }
2673
2.18k
        }
2674
2675
3.06k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
3.06k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
3.06k
        const auto& result = results.back();
2682
2683
3.06k
        if ( result.second != std::nullopt ) {
2684
1.26k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
1.26k
        }
2691
2692
3.06k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
3.06k
        if ( options.disableTests == false ) {
2701
3.06k
            tests::test(op, result.second);
2702
3.06k
        }
2703
2704
3.06k
        postprocess(module, op, result);
2705
3.06k
    }
2706
2707
946
    if ( options.noCompare == false ) {
2708
883
        compare(operations, results, data, size);
2709
883
    }
2710
946
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
626
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
626
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
626
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.66k
    do {
2596
5.66k
        auto op = getOp(&parentDs, data, size);
2597
5.66k
        auto module = getModule(parentDs);
2598
5.66k
        if ( module == nullptr ) {
2599
2.68k
            continue;
2600
2.68k
        }
2601
2602
2.98k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
2.98k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
5.65k
    } while ( parentDs.Get<bool>() == true );
2609
2610
626
    if ( operations.empty() == true ) {
2611
14
        return;
2612
14
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
612
#if 1
2616
612
    {
2617
612
        std::set<uint64_t> moduleIDs;
2618
1.04k
        for (const auto& m : modules ) {
2619
1.04k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.04k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.04k
            moduleIDs.insert(moduleID);
2627
1.04k
        }
2628
2629
612
        std::set<uint64_t> operationModuleIDs;
2630
2.71k
        for (const auto& op : operations) {
2631
2.71k
            operationModuleIDs.insert(op.first->ID);
2632
2.71k
        }
2633
2634
612
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
612
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
612
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
612
        for (const auto& id : addModuleIDs) {
2639
481
            operations.push_back({ modules.at(id), operations[0].second});
2640
481
        }
2641
612
    }
2642
612
#endif
2643
2644
612
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
612
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
3.80k
    for (size_t i = 0; i < operations.size(); i++) {
2652
3.19k
        auto& operation = operations[i];
2653
2654
3.19k
        auto& module = operation.first;
2655
3.19k
        auto& op = operation.second;
2656
2657
3.19k
        if ( i > 0 ) {
2658
2.67k
            auto& prevModule = operations[i-1].first;
2659
2.67k
            auto& prevOp = operations[i].second;
2660
2661
2.67k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
2.11k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
2.11k
                if ( curModifier.size() == 0 ) {
2664
897k
                    for (size_t j = 0; j < 512; j++) {
2665
895k
                        curModifier.push_back(1);
2666
895k
                    }
2667
1.74k
                } else {
2668
1.37k
                    for (auto& c : curModifier) {
2669
1.37k
                        c++;
2670
1.37k
                    }
2671
368
                }
2672
2.11k
            }
2673
2.67k
        }
2674
2675
3.19k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
3.19k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
3.19k
        const auto& result = results.back();
2682
2683
3.19k
        if ( result.second != std::nullopt ) {
2684
1.62k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
1.62k
        }
2691
2692
3.19k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
3.19k
        if ( options.disableTests == false ) {
2701
3.19k
            tests::test(op, result.second);
2702
3.19k
        }
2703
2704
3.19k
        postprocess(module, op, result);
2705
3.19k
    }
2706
2707
612
    if ( options.noCompare == false ) {
2708
522
        compare(operations, results, data, size);
2709
522
    }
2710
612
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
848
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
848
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
848
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.46k
    do {
2596
5.46k
        auto op = getOp(&parentDs, data, size);
2597
5.46k
        auto module = getModule(parentDs);
2598
5.46k
        if ( module == nullptr ) {
2599
2.54k
            continue;
2600
2.54k
        }
2601
2602
2.91k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
2.91k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
5
            break;
2607
5
        }
2608
5.45k
    } while ( parentDs.Get<bool>() == true );
2609
2610
848
    if ( operations.empty() == true ) {
2611
4
        return;
2612
4
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
844
#if 1
2616
844
    {
2617
844
        std::set<uint64_t> moduleIDs;
2618
1.55k
        for (const auto& m : modules ) {
2619
1.55k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.55k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.55k
            moduleIDs.insert(moduleID);
2627
1.55k
        }
2628
2629
844
        std::set<uint64_t> operationModuleIDs;
2630
2.72k
        for (const auto& op : operations) {
2631
2.72k
            operationModuleIDs.insert(op.first->ID);
2632
2.72k
        }
2633
2634
844
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
844
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
844
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
844
        for (const auto& id : addModuleIDs) {
2639
750
            operations.push_back({ modules.at(id), operations[0].second});
2640
750
        }
2641
844
    }
2642
844
#endif
2643
2644
844
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
844
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
4.31k
    for (size_t i = 0; i < operations.size(); i++) {
2652
3.47k
        auto& operation = operations[i];
2653
2654
3.47k
        auto& module = operation.first;
2655
3.47k
        auto& op = operation.second;
2656
2657
3.47k
        if ( i > 0 ) {
2658
2.69k
            auto& prevModule = operations[i-1].first;
2659
2.69k
            auto& prevOp = operations[i].second;
2660
2661
2.69k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
1.86k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
1.86k
                if ( curModifier.size() == 0 ) {
2664
672k
                    for (size_t j = 0; j < 512; j++) {
2665
671k
                        curModifier.push_back(1);
2666
671k
                    }
2667
1.31k
                } else {
2668
1.06k
                    for (auto& c : curModifier) {
2669
1.06k
                        c++;
2670
1.06k
                    }
2671
555
                }
2672
1.86k
            }
2673
2.69k
        }
2674
2675
3.47k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
3.47k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
3.47k
        const auto& result = results.back();
2682
2683
3.47k
        if ( result.second != std::nullopt ) {
2684
1.68k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
1.68k
        }
2691
2692
3.47k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
3.47k
        if ( options.disableTests == false ) {
2701
3.47k
            tests::test(op, result.second);
2702
3.47k
        }
2703
2704
3.47k
        postprocess(module, op, result);
2705
3.47k
    }
2706
2707
844
    if ( options.noCompare == false ) {
2708
775
        compare(operations, results, data, size);
2709
775
    }
2710
844
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
3.48k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
3.48k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
3.48k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
17.7k
    do {
2596
17.7k
        auto op = getOp(&parentDs, data, size);
2597
17.7k
        auto module = getModule(parentDs);
2598
17.7k
        if ( module == nullptr ) {
2599
5.28k
            continue;
2600
5.28k
        }
2601
2602
12.5k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
12.5k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
10
            break;
2607
10
        }
2608
17.7k
    } while ( parentDs.Get<bool>() == true );
2609
2610
3.48k
    if ( operations.empty() == true ) {
2611
6
        return;
2612
6
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
3.47k
#if 1
2616
3.47k
    {
2617
3.47k
        std::set<uint64_t> moduleIDs;
2618
6.79k
        for (const auto& m : modules ) {
2619
6.79k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
6.79k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
6.79k
            moduleIDs.insert(moduleID);
2627
6.79k
        }
2628
2629
3.47k
        std::set<uint64_t> operationModuleIDs;
2630
12.2k
        for (const auto& op : operations) {
2631
12.2k
            operationModuleIDs.insert(op.first->ID);
2632
12.2k
        }
2633
2634
3.47k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
3.47k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
3.47k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
3.47k
        for (const auto& id : addModuleIDs) {
2639
3.32k
            operations.push_back({ modules.at(id), operations[0].second});
2640
3.32k
        }
2641
3.47k
    }
2642
3.47k
#endif
2643
2644
3.47k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
3.47k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
19.0k
    for (size_t i = 0; i < operations.size(); i++) {
2652
15.6k
        auto& operation = operations[i];
2653
2654
15.6k
        auto& module = operation.first;
2655
15.6k
        auto& op = operation.second;
2656
2657
15.6k
        if ( i > 0 ) {
2658
12.2k
            auto& prevModule = operations[i-1].first;
2659
12.2k
            auto& prevOp = operations[i].second;
2660
2661
12.2k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
8.67k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
8.67k
                if ( curModifier.size() == 0 ) {
2664
3.11M
                    for (size_t j = 0; j < 512; j++) {
2665
3.10M
                        curModifier.push_back(1);
2666
3.10M
                    }
2667
6.06k
                } else {
2668
68.5k
                    for (auto& c : curModifier) {
2669
68.5k
                        c++;
2670
68.5k
                    }
2671
2.61k
                }
2672
8.67k
            }
2673
12.2k
        }
2674
2675
15.6k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
15.6k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
15.6k
        const auto& result = results.back();
2682
2683
15.6k
        if ( result.second != std::nullopt ) {
2684
5.42k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
5.42k
        }
2691
2692
15.6k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
15.6k
        if ( options.disableTests == false ) {
2701
15.6k
            tests::test(op, result.second);
2702
15.6k
        }
2703
2704
15.6k
        postprocess(module, op, result);
2705
15.6k
    }
2706
2707
3.47k
    if ( options.noCompare == false ) {
2708
3.39k
        compare(operations, results, data, size);
2709
3.39k
    }
2710
3.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
3.44k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
3.44k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
3.44k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
12.5k
    do {
2596
12.5k
        auto op = getOp(&parentDs, data, size);
2597
12.5k
        auto module = getModule(parentDs);
2598
12.5k
        if ( module == nullptr ) {
2599
3.49k
            continue;
2600
3.49k
        }
2601
2602
9.08k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
9.08k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
12.5k
    } while ( parentDs.Get<bool>() == true );
2609
2610
3.44k
    if ( operations.empty() == true ) {
2611
6
        return;
2612
6
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
3.43k
#if 1
2616
3.43k
    {
2617
3.43k
        std::set<uint64_t> moduleIDs;
2618
6.70k
        for (const auto& m : modules ) {
2619
6.70k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
6.70k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
6.70k
            moduleIDs.insert(moduleID);
2627
6.70k
        }
2628
2629
3.43k
        std::set<uint64_t> operationModuleIDs;
2630
8.86k
        for (const auto& op : operations) {
2631
8.86k
            operationModuleIDs.insert(op.first->ID);
2632
8.86k
        }
2633
2634
3.43k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
3.43k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
3.43k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
3.43k
        for (const auto& id : addModuleIDs) {
2639
3.30k
            operations.push_back({ modules.at(id), operations[0].second});
2640
3.30k
        }
2641
3.43k
    }
2642
3.43k
#endif
2643
2644
3.43k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
3.43k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
15.6k
    for (size_t i = 0; i < operations.size(); i++) {
2652
12.1k
        auto& operation = operations[i];
2653
2654
12.1k
        auto& module = operation.first;
2655
12.1k
        auto& op = operation.second;
2656
2657
12.1k
        if ( i > 0 ) {
2658
8.81k
            auto& prevModule = operations[i-1].first;
2659
8.81k
            auto& prevOp = operations[i].second;
2660
2661
8.81k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
5.37k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
5.37k
                if ( curModifier.size() == 0 ) {
2664
1.92M
                    for (size_t j = 0; j < 512; j++) {
2665
1.92M
                        curModifier.push_back(1);
2666
1.92M
                    }
2667
3.75k
                } else {
2668
35.8k
                    for (auto& c : curModifier) {
2669
35.8k
                        c++;
2670
35.8k
                    }
2671
1.62k
                }
2672
5.37k
            }
2673
8.81k
        }
2674
2675
12.1k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
12.1k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
12.1k
        const auto& result = results.back();
2682
2683
12.1k
        if ( result.second != std::nullopt ) {
2684
808
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
808
        }
2691
2692
12.1k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
12.1k
        if ( options.disableTests == false ) {
2701
12.1k
            tests::test(op, result.second);
2702
12.1k
        }
2703
2704
12.1k
        postprocess(module, op, result);
2705
12.1k
    }
2706
2707
3.43k
    if ( options.noCompare == false ) {
2708
3.35k
        compare(operations, results, data, size);
2709
3.35k
    }
2710
3.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
228
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
228
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
228
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.86k
    do {
2596
2.86k
        auto op = getOp(&parentDs, data, size);
2597
2.86k
        auto module = getModule(parentDs);
2598
2.86k
        if ( module == nullptr ) {
2599
2.01k
            continue;
2600
2.01k
        }
2601
2602
856
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
856
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
1
            break;
2607
1
        }
2608
2.86k
    } while ( parentDs.Get<bool>() == true );
2609
2610
228
    if ( operations.empty() == true ) {
2611
23
        return;
2612
23
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
205
#if 1
2616
205
    {
2617
205
        std::set<uint64_t> moduleIDs;
2618
242
        for (const auto& m : modules ) {
2619
242
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
242
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
242
            moduleIDs.insert(moduleID);
2627
242
        }
2628
2629
205
        std::set<uint64_t> operationModuleIDs;
2630
677
        for (const auto& op : operations) {
2631
677
            operationModuleIDs.insert(op.first->ID);
2632
677
        }
2633
2634
205
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
205
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
205
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
205
        for (const auto& id : addModuleIDs) {
2639
102
            operations.push_back({ modules.at(id), operations[0].second});
2640
102
        }
2641
205
    }
2642
205
#endif
2643
2644
205
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
205
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
984
    for (size_t i = 0; i < operations.size(); i++) {
2652
779
        auto& operation = operations[i];
2653
2654
779
        auto& module = operation.first;
2655
779
        auto& op = operation.second;
2656
2657
779
        if ( i > 0 ) {
2658
658
            auto& prevModule = operations[i-1].first;
2659
658
            auto& prevOp = operations[i].second;
2660
2661
658
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
506
                auto& curModifier = op.modifier.GetVectorPtr();
2663
506
                if ( curModifier.size() == 0 ) {
2664
222k
                    for (size_t j = 0; j < 512; j++) {
2665
221k
                        curModifier.push_back(1);
2666
221k
                    }
2667
433
                } else {
2668
292
                    for (auto& c : curModifier) {
2669
292
                        c++;
2670
292
                    }
2671
73
                }
2672
506
            }
2673
658
        }
2674
2675
779
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
779
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
779
        const auto& result = results.back();
2682
2683
779
        if ( result.second != std::nullopt ) {
2684
213
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
213
        }
2691
2692
779
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
779
        if ( options.disableTests == false ) {
2701
779
            tests::test(op, result.second);
2702
779
        }
2703
2704
779
        postprocess(module, op, result);
2705
779
    }
2706
2707
205
    if ( options.noCompare == false ) {
2708
121
        compare(operations, results, data, size);
2709
121
    }
2710
205
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
2.10k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
2.10k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
2.10k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
7.04k
    do {
2596
7.04k
        auto op = getOp(&parentDs, data, size);
2597
7.04k
        auto module = getModule(parentDs);
2598
7.04k
        if ( module == nullptr ) {
2599
2.60k
            continue;
2600
2.60k
        }
2601
2602
4.44k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
4.44k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
2
            break;
2607
2
        }
2608
7.04k
    } while ( parentDs.Get<bool>() == true );
2609
2610
2.10k
    if ( operations.empty() == true ) {
2611
39
        return;
2612
39
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
2.07k
#if 1
2616
2.07k
    {
2617
2.07k
        std::set<uint64_t> moduleIDs;
2618
3.89k
        for (const auto& m : modules ) {
2619
3.89k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
3.89k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
3.89k
            moduleIDs.insert(moduleID);
2627
3.89k
        }
2628
2629
2.07k
        std::set<uint64_t> operationModuleIDs;
2630
4.16k
        for (const auto& op : operations) {
2631
4.16k
            operationModuleIDs.insert(op.first->ID);
2632
4.16k
        }
2633
2634
2.07k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
2.07k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
2.07k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
2.07k
        for (const auto& id : addModuleIDs) {
2639
1.91k
            operations.push_back({ modules.at(id), operations[0].second});
2640
1.91k
        }
2641
2.07k
    }
2642
2.07k
#endif
2643
2644
2.07k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
2.07k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
8.15k
    for (size_t i = 0; i < operations.size(); i++) {
2652
6.08k
        auto& operation = operations[i];
2653
2654
6.08k
        auto& module = operation.first;
2655
6.08k
        auto& op = operation.second;
2656
2657
6.08k
        if ( i > 0 ) {
2658
4.13k
            auto& prevModule = operations[i-1].first;
2659
4.13k
            auto& prevOp = operations[i].second;
2660
2661
4.13k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
2.14k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
2.14k
                if ( curModifier.size() == 0 ) {
2664
799k
                    for (size_t j = 0; j < 512; j++) {
2665
798k
                        curModifier.push_back(1);
2666
798k
                    }
2667
1.55k
                } else {
2668
1.24k
                    for (auto& c : curModifier) {
2669
1.24k
                        c++;
2670
1.24k
                    }
2671
581
                }
2672
2.14k
            }
2673
4.13k
        }
2674
2675
6.08k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
6.08k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
6.08k
        const auto& result = results.back();
2682
2683
6.08k
        if ( result.second != std::nullopt ) {
2684
2.44k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
2.44k
        }
2691
2692
6.08k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
6.08k
        if ( options.disableTests == false ) {
2701
6.08k
            tests::test(op, result.second);
2702
6.08k
        }
2703
2704
6.08k
        postprocess(module, op, result);
2705
6.08k
    }
2706
2707
2.07k
    if ( options.noCompare == false ) {
2708
1.94k
        compare(operations, results, data, size);
2709
1.94k
    }
2710
2.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
236
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
236
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
236
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.96k
    do {
2596
2.96k
        auto op = getOp(&parentDs, data, size);
2597
2.96k
        auto module = getModule(parentDs);
2598
2.96k
        if ( module == nullptr ) {
2599
2.24k
            continue;
2600
2.24k
        }
2601
2602
717
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
717
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
2
            break;
2607
2
        }
2608
2.96k
    } while ( parentDs.Get<bool>() == true );
2609
2610
236
    if ( operations.empty() == true ) {
2611
18
        return;
2612
18
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
218
#if 1
2616
218
    {
2617
218
        std::set<uint64_t> moduleIDs;
2618
280
        for (const auto& m : modules ) {
2619
280
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
280
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
280
            moduleIDs.insert(moduleID);
2627
280
        }
2628
2629
218
        std::set<uint64_t> operationModuleIDs;
2630
548
        for (const auto& op : operations) {
2631
548
            operationModuleIDs.insert(op.first->ID);
2632
548
        }
2633
2634
218
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
218
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
218
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
218
        for (const auto& id : addModuleIDs) {
2639
114
            operations.push_back({ modules.at(id), operations[0].second});
2640
114
        }
2641
218
    }
2642
218
#endif
2643
2644
218
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
218
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
880
    for (size_t i = 0; i < operations.size(); i++) {
2652
662
        auto& operation = operations[i];
2653
2654
662
        auto& module = operation.first;
2655
662
        auto& op = operation.second;
2656
2657
662
        if ( i > 0 ) {
2658
522
            auto& prevModule = operations[i-1].first;
2659
522
            auto& prevOp = operations[i].second;
2660
2661
522
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
328
                auto& curModifier = op.modifier.GetVectorPtr();
2663
328
                if ( curModifier.size() == 0 ) {
2664
90.2k
                    for (size_t j = 0; j < 512; j++) {
2665
90.1k
                        curModifier.push_back(1);
2666
90.1k
                    }
2667
176
                } else {
2668
424
                    for (auto& c : curModifier) {
2669
424
                        c++;
2670
424
                    }
2671
152
                }
2672
328
            }
2673
522
        }
2674
2675
662
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
662
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
662
        const auto& result = results.back();
2682
2683
662
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
662
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
662
        if ( options.disableTests == false ) {
2701
662
            tests::test(op, result.second);
2702
662
        }
2703
2704
662
        postprocess(module, op, result);
2705
662
    }
2706
2707
218
    if ( options.noCompare == false ) {
2708
140
        compare(operations, results, data, size);
2709
140
    }
2710
218
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
136
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
136
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
136
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.60k
    do {
2596
2.60k
        auto op = getOp(&parentDs, data, size);
2597
2.60k
        auto module = getModule(parentDs);
2598
2.60k
        if ( module == nullptr ) {
2599
1.97k
            continue;
2600
1.97k
        }
2601
2602
625
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
625
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
2
            break;
2607
2
        }
2608
2.60k
    } while ( parentDs.Get<bool>() == true );
2609
2610
136
    if ( operations.empty() == true ) {
2611
6
        return;
2612
6
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
130
#if 1
2616
130
    {
2617
130
        std::set<uint64_t> moduleIDs;
2618
130
        for (const auto& m : modules ) {
2619
118
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
118
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
118
            moduleIDs.insert(moduleID);
2627
118
        }
2628
2629
130
        std::set<uint64_t> operationModuleIDs;
2630
376
        for (const auto& op : operations) {
2631
376
            operationModuleIDs.insert(op.first->ID);
2632
376
        }
2633
2634
130
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
130
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
130
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
130
        for (const auto& id : addModuleIDs) {
2639
38
            operations.push_back({ modules.at(id), operations[0].second});
2640
38
        }
2641
130
    }
2642
130
#endif
2643
2644
130
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
130
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
544
    for (size_t i = 0; i < operations.size(); i++) {
2652
414
        auto& operation = operations[i];
2653
2654
414
        auto& module = operation.first;
2655
414
        auto& op = operation.second;
2656
2657
414
        if ( i > 0 ) {
2658
355
            auto& prevModule = operations[i-1].first;
2659
355
            auto& prevOp = operations[i].second;
2660
2661
355
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
261
                auto& curModifier = op.modifier.GetVectorPtr();
2663
261
                if ( curModifier.size() == 0 ) {
2664
71.3k
                    for (size_t j = 0; j < 512; j++) {
2665
71.1k
                        curModifier.push_back(1);
2666
71.1k
                    }
2667
139
                } else {
2668
474
                    for (auto& c : curModifier) {
2669
474
                        c++;
2670
474
                    }
2671
122
                }
2672
261
            }
2673
355
        }
2674
2675
414
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
414
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
414
        const auto& result = results.back();
2682
2683
414
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
414
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
414
        if ( options.disableTests == false ) {
2701
414
            tests::test(op, result.second);
2702
414
        }
2703
2704
414
        postprocess(module, op, result);
2705
414
    }
2706
2707
130
    if ( options.noCompare == false ) {
2708
59
        compare(operations, results, data, size);
2709
59
    }
2710
130
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
144
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
144
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
144
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.71k
    do {
2596
2.71k
        auto op = getOp(&parentDs, data, size);
2597
2.71k
        auto module = getModule(parentDs);
2598
2.71k
        if ( module == nullptr ) {
2599
2.04k
            continue;
2600
2.04k
        }
2601
2602
664
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
664
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
2
            break;
2607
2
        }
2608
2.71k
    } while ( parentDs.Get<bool>() == true );
2609
2610
144
    if ( operations.empty() == true ) {
2611
6
        return;
2612
6
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
138
#if 1
2616
138
    {
2617
138
        std::set<uint64_t> moduleIDs;
2618
140
        for (const auto& m : modules ) {
2619
140
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
140
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
140
            moduleIDs.insert(moduleID);
2627
140
        }
2628
2629
138
        std::set<uint64_t> operationModuleIDs;
2630
443
        for (const auto& op : operations) {
2631
443
            operationModuleIDs.insert(op.first->ID);
2632
443
        }
2633
2634
138
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
138
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
138
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
138
        for (const auto& id : addModuleIDs) {
2639
48
            operations.push_back({ modules.at(id), operations[0].second});
2640
48
        }
2641
138
    }
2642
138
#endif
2643
2644
138
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
138
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
629
    for (size_t i = 0; i < operations.size(); i++) {
2652
491
        auto& operation = operations[i];
2653
2654
491
        auto& module = operation.first;
2655
491
        auto& op = operation.second;
2656
2657
491
        if ( i > 0 ) {
2658
421
            auto& prevModule = operations[i-1].first;
2659
421
            auto& prevOp = operations[i].second;
2660
2661
421
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
304
                auto& curModifier = op.modifier.GetVectorPtr();
2663
304
                if ( curModifier.size() == 0 ) {
2664
76.9k
                    for (size_t j = 0; j < 512; j++) {
2665
76.8k
                        curModifier.push_back(1);
2666
76.8k
                    }
2667
154
                } else {
2668
428
                    for (auto& c : curModifier) {
2669
428
                        c++;
2670
428
                    }
2671
154
                }
2672
304
            }
2673
421
        }
2674
2675
491
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
491
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
491
        const auto& result = results.back();
2682
2683
491
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
491
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
491
        if ( options.disableTests == false ) {
2701
491
            tests::test(op, result.second);
2702
491
        }
2703
2704
491
        postprocess(module, op, result);
2705
491
    }
2706
2707
138
    if ( options.noCompare == false ) {
2708
70
        compare(operations, results, data, size);
2709
70
    }
2710
138
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
485
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
485
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
485
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.45k
    do {
2596
3.45k
        auto op = getOp(&parentDs, data, size);
2597
3.45k
        auto module = getModule(parentDs);
2598
3.45k
        if ( module == nullptr ) {
2599
1.92k
            continue;
2600
1.92k
        }
2601
2602
1.52k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.52k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
4
            break;
2607
4
        }
2608
3.44k
    } while ( parentDs.Get<bool>() == true );
2609
2610
485
    if ( operations.empty() == true ) {
2611
9
        return;
2612
9
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
476
#if 1
2616
476
    {
2617
476
        std::set<uint64_t> moduleIDs;
2618
826
        for (const auto& m : modules ) {
2619
826
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
826
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
826
            moduleIDs.insert(moduleID);
2627
826
        }
2628
2629
476
        std::set<uint64_t> operationModuleIDs;
2630
1.35k
        for (const auto& op : operations) {
2631
1.35k
            operationModuleIDs.insert(op.first->ID);
2632
1.35k
        }
2633
2634
476
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
476
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
476
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
476
        for (const auto& id : addModuleIDs) {
2639
391
            operations.push_back({ modules.at(id), operations[0].second});
2640
391
        }
2641
476
    }
2642
476
#endif
2643
2644
476
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
476
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
2.22k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.74k
        auto& operation = operations[i];
2653
2654
1.74k
        auto& module = operation.first;
2655
1.74k
        auto& op = operation.second;
2656
2657
1.74k
        if ( i > 0 ) {
2658
1.33k
            auto& prevModule = operations[i-1].first;
2659
1.33k
            auto& prevOp = operations[i].second;
2660
2661
1.33k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
865
                auto& curModifier = op.modifier.GetVectorPtr();
2663
865
                if ( curModifier.size() == 0 ) {
2664
330k
                    for (size_t j = 0; j < 512; j++) {
2665
329k
                        curModifier.push_back(1);
2666
329k
                    }
2667
644
                } else {
2668
455
                    for (auto& c : curModifier) {
2669
455
                        c++;
2670
455
                    }
2671
221
                }
2672
865
            }
2673
1.33k
        }
2674
2675
1.74k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.74k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.74k
        const auto& result = results.back();
2682
2683
1.74k
        if ( result.second != std::nullopt ) {
2684
806
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
806
        }
2691
2692
1.74k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
1.74k
        if ( options.disableTests == false ) {
2701
1.74k
            tests::test(op, result.second);
2702
1.74k
        }
2703
2704
1.74k
        postprocess(module, op, result);
2705
1.74k
    }
2706
2707
476
    if ( options.noCompare == false ) {
2708
413
        compare(operations, results, data, size);
2709
413
    }
2710
476
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
338
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
338
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
338
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.38k
    do {
2596
2.38k
        auto op = getOp(&parentDs, data, size);
2597
2.38k
        auto module = getModule(parentDs);
2598
2.38k
        if ( module == nullptr ) {
2599
1.90k
            continue;
2600
1.90k
        }
2601
2602
474
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
474
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
53
            break;
2607
53
        }
2608
2.33k
    } while ( parentDs.Get<bool>() == true );
2609
2610
338
    if ( operations.empty() == true ) {
2611
8
        return;
2612
8
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
330
#if 1
2616
330
    {
2617
330
        std::set<uint64_t> moduleIDs;
2618
518
        for (const auto& m : modules ) {
2619
518
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
518
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
518
            moduleIDs.insert(moduleID);
2627
518
        }
2628
2629
330
        std::set<uint64_t> operationModuleIDs;
2630
388
        for (const auto& op : operations) {
2631
388
            operationModuleIDs.insert(op.first->ID);
2632
388
        }
2633
2634
330
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
330
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
330
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
330
        for (const auto& id : addModuleIDs) {
2639
254
            operations.push_back({ modules.at(id), operations[0].second});
2640
254
        }
2641
330
    }
2642
330
#endif
2643
2644
330
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
330
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
972
    for (size_t i = 0; i < operations.size(); i++) {
2652
642
        auto& operation = operations[i];
2653
2654
642
        auto& module = operation.first;
2655
642
        auto& op = operation.second;
2656
2657
642
        if ( i > 0 ) {
2658
383
            auto& prevModule = operations[i-1].first;
2659
383
            auto& prevOp = operations[i].second;
2660
2661
383
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
123
                auto& curModifier = op.modifier.GetVectorPtr();
2663
123
                if ( curModifier.size() == 0 ) {
2664
49.2k
                    for (size_t j = 0; j < 512; j++) {
2665
49.1k
                        curModifier.push_back(1);
2666
49.1k
                    }
2667
96
                } else {
2668
344
                    for (auto& c : curModifier) {
2669
344
                        c++;
2670
344
                    }
2671
27
                }
2672
123
            }
2673
383
        }
2674
2675
642
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
642
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
642
        const auto& result = results.back();
2682
2683
642
        if ( result.second != std::nullopt ) {
2684
315
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
315
        }
2691
2692
642
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
642
        if ( options.disableTests == false ) {
2701
642
            tests::test(op, result.second);
2702
642
        }
2703
2704
642
        postprocess(module, op, result);
2705
642
    }
2706
2707
330
    if ( options.noCompare == false ) {
2708
259
        compare(operations, results, data, size);
2709
259
    }
2710
330
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
174
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
174
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
174
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.69k
    do {
2596
2.69k
        auto op = getOp(&parentDs, data, size);
2597
2.69k
        auto module = getModule(parentDs);
2598
2.69k
        if ( module == nullptr ) {
2599
2.01k
            continue;
2600
2.01k
        }
2601
2602
685
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
685
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
2
            break;
2607
2
        }
2608
2.69k
    } while ( parentDs.Get<bool>() == true );
2609
2610
174
    if ( operations.empty() == true ) {
2611
15
        return;
2612
15
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
159
#if 1
2616
159
    {
2617
159
        std::set<uint64_t> moduleIDs;
2618
159
        for (const auto& m : modules ) {
2619
122
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
122
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
122
            moduleIDs.insert(moduleID);
2627
122
        }
2628
2629
159
        std::set<uint64_t> operationModuleIDs;
2630
368
        for (const auto& op : operations) {
2631
368
            operationModuleIDs.insert(op.first->ID);
2632
368
        }
2633
2634
159
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
159
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
159
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
159
        for (const auto& id : addModuleIDs) {
2639
38
            operations.push_back({ modules.at(id), operations[0].second});
2640
38
        }
2641
159
    }
2642
159
#endif
2643
2644
159
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
159
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
565
    for (size_t i = 0; i < operations.size(); i++) {
2652
406
        auto& operation = operations[i];
2653
2654
406
        auto& module = operation.first;
2655
406
        auto& op = operation.second;
2656
2657
406
        if ( i > 0 ) {
2658
345
            auto& prevModule = operations[i-1].first;
2659
345
            auto& prevOp = operations[i].second;
2660
2661
345
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
254
                auto& curModifier = op.modifier.GetVectorPtr();
2663
254
                if ( curModifier.size() == 0 ) {
2664
93.8k
                    for (size_t j = 0; j < 512; j++) {
2665
93.6k
                        curModifier.push_back(1);
2666
93.6k
                    }
2667
183
                } else {
2668
368
                    for (auto& c : curModifier) {
2669
368
                        c++;
2670
368
                    }
2671
71
                }
2672
254
            }
2673
345
        }
2674
2675
406
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
406
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
406
        const auto& result = results.back();
2682
2683
406
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
406
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
406
        if ( options.disableTests == false ) {
2701
406
            tests::test(op, result.second);
2702
406
        }
2703
2704
406
        postprocess(module, op, result);
2705
406
    }
2706
2707
159
    if ( options.noCompare == false ) {
2708
61
        compare(operations, results, data, size);
2709
61
    }
2710
159
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
143
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
143
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
143
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.94k
    do {
2596
2.94k
        auto op = getOp(&parentDs, data, size);
2597
2.94k
        auto module = getModule(parentDs);
2598
2.94k
        if ( module == nullptr ) {
2599
2.41k
            continue;
2600
2.41k
        }
2601
2602
530
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
530
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
2
            break;
2607
2
        }
2608
2.94k
    } while ( parentDs.Get<bool>() == true );
2609
2610
143
    if ( operations.empty() == true ) {
2611
10
        return;
2612
10
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
133
#if 1
2616
133
    {
2617
133
        std::set<uint64_t> moduleIDs;
2618
133
        for (const auto& m : modules ) {
2619
96
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
96
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
96
            moduleIDs.insert(moduleID);
2627
96
        }
2628
2629
133
        std::set<uint64_t> operationModuleIDs;
2630
327
        for (const auto& op : operations) {
2631
327
            operationModuleIDs.insert(op.first->ID);
2632
327
        }
2633
2634
133
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
133
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
133
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
133
        for (const auto& id : addModuleIDs) {
2639
22
            operations.push_back({ modules.at(id), operations[0].second});
2640
22
        }
2641
133
    }
2642
133
#endif
2643
2644
133
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
133
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
482
    for (size_t i = 0; i < operations.size(); i++) {
2652
349
        auto& operation = operations[i];
2653
2654
349
        auto& module = operation.first;
2655
349
        auto& op = operation.second;
2656
2657
349
        if ( i > 0 ) {
2658
301
            auto& prevModule = operations[i-1].first;
2659
301
            auto& prevOp = operations[i].second;
2660
2661
301
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
178
                auto& curModifier = op.modifier.GetVectorPtr();
2663
178
                if ( curModifier.size() == 0 ) {
2664
54.8k
                    for (size_t j = 0; j < 512; j++) {
2665
54.7k
                        curModifier.push_back(1);
2666
54.7k
                    }
2667
107
                } else {
2668
314
                    for (auto& c : curModifier) {
2669
314
                        c++;
2670
314
                    }
2671
71
                }
2672
178
            }
2673
301
        }
2674
2675
349
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
349
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
349
        const auto& result = results.back();
2682
2683
349
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
349
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
349
        if ( options.disableTests == false ) {
2701
349
            tests::test(op, result.second);
2702
349
        }
2703
2704
349
        postprocess(module, op, result);
2705
349
    }
2706
2707
133
    if ( options.noCompare == false ) {
2708
48
        compare(operations, results, data, size);
2709
48
    }
2710
133
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
149
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
149
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
149
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.10k
    do {
2596
2.10k
        auto op = getOp(&parentDs, data, size);
2597
2.10k
        auto module = getModule(parentDs);
2598
2.10k
        if ( module == nullptr ) {
2599
1.96k
            continue;
2600
1.96k
        }
2601
2602
141
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
141
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
19
            break;
2607
19
        }
2608
2.08k
    } while ( parentDs.Get<bool>() == true );
2609
2610
149
    if ( operations.empty() == true ) {
2611
14
        return;
2612
14
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
135
#if 1
2616
135
    {
2617
135
        std::set<uint64_t> moduleIDs;
2618
135
        for (const auto& m : modules ) {
2619
130
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
130
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
130
            moduleIDs.insert(moduleID);
2627
130
        }
2628
2629
135
        std::set<uint64_t> operationModuleIDs;
2630
135
        for (const auto& op : operations) {
2631
84
            operationModuleIDs.insert(op.first->ID);
2632
84
        }
2633
2634
135
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
135
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
135
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
135
        for (const auto& id : addModuleIDs) {
2639
63
            operations.push_back({ modules.at(id), operations[0].second});
2640
63
        }
2641
135
    }
2642
135
#endif
2643
2644
135
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
135
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
282
    for (size_t i = 0; i < operations.size(); i++) {
2652
147
        auto& operation = operations[i];
2653
2654
147
        auto& module = operation.first;
2655
147
        auto& op = operation.second;
2656
2657
147
        if ( i > 0 ) {
2658
82
            auto& prevModule = operations[i-1].first;
2659
82
            auto& prevOp = operations[i].second;
2660
2661
82
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
17
                auto& curModifier = op.modifier.GetVectorPtr();
2663
17
                if ( curModifier.size() == 0 ) {
2664
3.59k
                    for (size_t j = 0; j < 512; j++) {
2665
3.58k
                        curModifier.push_back(1);
2666
3.58k
                    }
2667
10
                } else {
2668
332
                    for (auto& c : curModifier) {
2669
332
                        c++;
2670
332
                    }
2671
10
                }
2672
17
            }
2673
82
        }
2674
2675
147
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
147
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
147
        const auto& result = results.back();
2682
2683
147
        if ( result.second != std::nullopt ) {
2684
33
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
33
        }
2691
2692
147
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
147
        if ( options.disableTests == false ) {
2701
147
            tests::test(op, result.second);
2702
147
        }
2703
2704
147
        postprocess(module, op, result);
2705
147
    }
2706
2707
135
    if ( options.noCompare == false ) {
2708
65
        compare(operations, results, data, size);
2709
65
    }
2710
135
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
400
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
400
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
400
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.53k
    do {
2596
3.53k
        auto op = getOp(&parentDs, data, size);
2597
3.53k
        auto module = getModule(parentDs);
2598
3.53k
        if ( module == nullptr ) {
2599
2.05k
            continue;
2600
2.05k
        }
2601
2602
1.48k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.48k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
2
            break;
2607
2
        }
2608
3.52k
    } while ( parentDs.Get<bool>() == true );
2609
2610
400
    if ( operations.empty() == true ) {
2611
9
        return;
2612
9
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
391
#if 1
2616
391
    {
2617
391
        std::set<uint64_t> moduleIDs;
2618
622
        for (const auto& m : modules ) {
2619
622
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
622
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
622
            moduleIDs.insert(moduleID);
2627
622
        }
2628
2629
391
        std::set<uint64_t> operationModuleIDs;
2630
1.24k
        for (const auto& op : operations) {
2631
1.24k
            operationModuleIDs.insert(op.first->ID);
2632
1.24k
        }
2633
2634
391
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
391
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
391
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
391
        for (const auto& id : addModuleIDs) {
2639
294
            operations.push_back({ modules.at(id), operations[0].second});
2640
294
        }
2641
391
    }
2642
391
#endif
2643
2644
391
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
391
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.92k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.53k
        auto& operation = operations[i];
2653
2654
1.53k
        auto& module = operation.first;
2655
1.53k
        auto& op = operation.second;
2656
2657
1.53k
        if ( i > 0 ) {
2658
1.22k
            auto& prevModule = operations[i-1].first;
2659
1.22k
            auto& prevOp = operations[i].second;
2660
2661
1.22k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
893
                auto& curModifier = op.modifier.GetVectorPtr();
2663
893
                if ( curModifier.size() == 0 ) {
2664
366k
                    for (size_t j = 0; j < 512; j++) {
2665
366k
                        curModifier.push_back(1);
2666
366k
                    }
2667
715
                } else {
2668
560
                    for (auto& c : curModifier) {
2669
560
                        c++;
2670
560
                    }
2671
178
                }
2672
893
            }
2673
1.22k
        }
2674
2675
1.53k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.53k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.53k
        const auto& result = results.back();
2682
2683
1.53k
        if ( result.second != std::nullopt ) {
2684
694
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
694
        }
2691
2692
1.53k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
1.53k
        if ( options.disableTests == false ) {
2701
1.53k
            tests::test(op, result.second);
2702
1.53k
        }
2703
2704
1.53k
        postprocess(module, op, result);
2705
1.53k
    }
2706
2707
391
    if ( options.noCompare == false ) {
2708
311
        compare(operations, results, data, size);
2709
311
    }
2710
391
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
1.08k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
1.08k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
1.08k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.26k
    do {
2596
3.26k
        auto op = getOp(&parentDs, data, size);
2597
3.26k
        auto module = getModule(parentDs);
2598
3.26k
        if ( module == nullptr ) {
2599
1.62k
            continue;
2600
1.62k
        }
2601
2602
1.64k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.64k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
47
            break;
2607
47
        }
2608
3.21k
    } while ( parentDs.Get<bool>() == true );
2609
2610
1.08k
    if ( operations.empty() == true ) {
2611
24
        return;
2612
24
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
1.06k
#if 1
2616
1.06k
    {
2617
1.06k
        std::set<uint64_t> moduleIDs;
2618
1.91k
        for (const auto& m : modules ) {
2619
1.91k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.91k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.91k
            moduleIDs.insert(moduleID);
2627
1.91k
        }
2628
2629
1.06k
        std::set<uint64_t> operationModuleIDs;
2630
1.57k
        for (const auto& op : operations) {
2631
1.57k
            operationModuleIDs.insert(op.first->ID);
2632
1.57k
        }
2633
2634
1.06k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
1.06k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
1.06k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
1.06k
        for (const auto& id : addModuleIDs) {
2639
939
            operations.push_back({ modules.at(id), operations[0].second});
2640
939
        }
2641
1.06k
    }
2642
1.06k
#endif
2643
2644
1.06k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
1.06k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
3.57k
    for (size_t i = 0; i < operations.size(); i++) {
2652
2.51k
        auto& operation = operations[i];
2653
2654
2.51k
        auto& module = operation.first;
2655
2.51k
        auto& op = operation.second;
2656
2657
2.51k
        if ( i > 0 ) {
2658
1.55k
            auto& prevModule = operations[i-1].first;
2659
1.55k
            auto& prevOp = operations[i].second;
2660
2661
1.55k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
577
                auto& curModifier = op.modifier.GetVectorPtr();
2663
577
                if ( curModifier.size() == 0 ) {
2664
245k
                    for (size_t j = 0; j < 512; j++) {
2665
245k
                        curModifier.push_back(1);
2666
245k
                    }
2667
479
                } else {
2668
1.86k
                    for (auto& c : curModifier) {
2669
1.86k
                        c++;
2670
1.86k
                    }
2671
98
                }
2672
577
            }
2673
1.55k
        }
2674
2675
2.51k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
2.51k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
2.51k
        const auto& result = results.back();
2682
2683
2.51k
        if ( result.second != std::nullopt ) {
2684
519
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
519
        }
2691
2692
2.51k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
2.51k
        if ( options.disableTests == false ) {
2701
2.51k
            tests::test(op, result.second);
2702
2.51k
        }
2703
2704
2.51k
        postprocess(module, op, result);
2705
2.51k
    }
2706
2707
1.06k
    if ( options.noCompare == false ) {
2708
956
        compare(operations, results, data, size);
2709
956
    }
2710
1.06k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
315
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
315
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
315
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.16k
    do {
2596
2.16k
        auto op = getOp(&parentDs, data, size);
2597
2.16k
        auto module = getModule(parentDs);
2598
2.16k
        if ( module == nullptr ) {
2599
1.75k
            continue;
2600
1.75k
        }
2601
2602
405
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
405
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
2.15k
    } while ( parentDs.Get<bool>() == true );
2609
2610
315
    if ( operations.empty() == true ) {
2611
16
        return;
2612
16
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
299
#if 1
2616
299
    {
2617
299
        std::set<uint64_t> moduleIDs;
2618
420
        for (const auto& m : modules ) {
2619
420
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
420
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
420
            moduleIDs.insert(moduleID);
2627
420
        }
2628
2629
299
        std::set<uint64_t> operationModuleIDs;
2630
328
        for (const auto& op : operations) {
2631
328
            operationModuleIDs.insert(op.first->ID);
2632
328
        }
2633
2634
299
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
299
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
299
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
299
        for (const auto& id : addModuleIDs) {
2639
199
            operations.push_back({ modules.at(id), operations[0].second});
2640
199
        }
2641
299
    }
2642
299
#endif
2643
2644
299
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
299
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
826
    for (size_t i = 0; i < operations.size(); i++) {
2652
527
        auto& operation = operations[i];
2653
2654
527
        auto& module = operation.first;
2655
527
        auto& op = operation.second;
2656
2657
527
        if ( i > 0 ) {
2658
317
            auto& prevModule = operations[i-1].first;
2659
317
            auto& prevOp = operations[i].second;
2660
2661
317
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
101
                auto& curModifier = op.modifier.GetVectorPtr();
2663
101
                if ( curModifier.size() == 0 ) {
2664
33.8k
                    for (size_t j = 0; j < 512; j++) {
2665
33.7k
                        curModifier.push_back(1);
2666
33.7k
                    }
2667
66
                } else {
2668
281
                    for (auto& c : curModifier) {
2669
281
                        c++;
2670
281
                    }
2671
35
                }
2672
101
            }
2673
317
        }
2674
2675
527
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
527
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
527
        const auto& result = results.back();
2682
2683
527
        if ( result.second != std::nullopt ) {
2684
303
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
303
        }
2691
2692
527
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
527
        if ( options.disableTests == false ) {
2701
527
            tests::test(op, result.second);
2702
527
        }
2703
2704
527
        postprocess(module, op, result);
2705
527
    }
2706
2707
299
    if ( options.noCompare == false ) {
2708
210
        compare(operations, results, data, size);
2709
210
    }
2710
299
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
838
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
838
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
838
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.87k
    do {
2596
2.87k
        auto op = getOp(&parentDs, data, size);
2597
2.87k
        auto module = getModule(parentDs);
2598
2.87k
        if ( module == nullptr ) {
2599
1.98k
            continue;
2600
1.98k
        }
2601
2602
886
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
886
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
9
            break;
2607
9
        }
2608
2.86k
    } while ( parentDs.Get<bool>() == true );
2609
2610
838
    if ( operations.empty() == true ) {
2611
14
        return;
2612
14
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
824
#if 1
2616
824
    {
2617
824
        std::set<uint64_t> moduleIDs;
2618
1.36k
        for (const auto& m : modules ) {
2619
1.36k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.36k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.36k
            moduleIDs.insert(moduleID);
2627
1.36k
        }
2628
2629
824
        std::set<uint64_t> operationModuleIDs;
2630
824
        for (const auto& op : operations) {
2631
818
            operationModuleIDs.insert(op.first->ID);
2632
818
        }
2633
2634
824
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
824
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
824
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
824
        for (const auto& id : addModuleIDs) {
2639
670
            operations.push_back({ modules.at(id), operations[0].second});
2640
670
        }
2641
824
    }
2642
824
#endif
2643
2644
824
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
824
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
2.31k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.48k
        auto& operation = operations[i];
2653
2654
1.48k
        auto& module = operation.first;
2655
1.48k
        auto& op = operation.second;
2656
2657
1.48k
        if ( i > 0 ) {
2658
807
            auto& prevModule = operations[i-1].first;
2659
807
            auto& prevOp = operations[i].second;
2660
2661
807
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
118
                auto& curModifier = op.modifier.GetVectorPtr();
2663
118
                if ( curModifier.size() == 0 ) {
2664
43.0k
                    for (size_t j = 0; j < 512; j++) {
2665
43.0k
                        curModifier.push_back(1);
2666
43.0k
                    }
2667
84
                } else {
2668
490
                    for (auto& c : curModifier) {
2669
490
                        c++;
2670
490
                    }
2671
34
                }
2672
118
            }
2673
807
        }
2674
2675
1.48k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.48k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.48k
        const auto& result = results.back();
2682
2683
1.48k
        if ( result.second != std::nullopt ) {
2684
272
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
272
        }
2691
2692
1.48k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
1.48k
        if ( options.disableTests == false ) {
2701
1.48k
            tests::test(op, result.second);
2702
1.48k
        }
2703
2704
1.48k
        postprocess(module, op, result);
2705
1.48k
    }
2706
2707
824
    if ( options.noCompare == false ) {
2708
681
        compare(operations, results, data, size);
2709
681
    }
2710
824
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
113
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
113
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
113
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.73k
    do {
2596
2.73k
        auto op = getOp(&parentDs, data, size);
2597
2.73k
        auto module = getModule(parentDs);
2598
2.73k
        if ( module == nullptr ) {
2599
2.49k
            continue;
2600
2.49k
        }
2601
2602
239
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
239
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
9
            break;
2607
9
        }
2608
2.72k
    } while ( parentDs.Get<bool>() == true );
2609
2610
113
    if ( operations.empty() == true ) {
2611
5
        return;
2612
5
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
108
#if 1
2616
108
    {
2617
108
        std::set<uint64_t> moduleIDs;
2618
108
        for (const auto& m : modules ) {
2619
100
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
100
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
100
            moduleIDs.insert(moduleID);
2627
100
        }
2628
2629
108
        std::set<uint64_t> operationModuleIDs;
2630
147
        for (const auto& op : operations) {
2631
147
            operationModuleIDs.insert(op.first->ID);
2632
147
        }
2633
2634
108
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
108
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
108
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
108
        for (const auto& id : addModuleIDs) {
2639
39
            operations.push_back({ modules.at(id), operations[0].second});
2640
39
        }
2641
108
    }
2642
108
#endif
2643
2644
108
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
108
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
294
    for (size_t i = 0; i < operations.size(); i++) {
2652
186
        auto& operation = operations[i];
2653
2654
186
        auto& module = operation.first;
2655
186
        auto& op = operation.second;
2656
2657
186
        if ( i > 0 ) {
2658
136
            auto& prevModule = operations[i-1].first;
2659
136
            auto& prevOp = operations[i].second;
2660
2661
136
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
79
                auto& curModifier = op.modifier.GetVectorPtr();
2663
79
                if ( curModifier.size() == 0 ) {
2664
18.9k
                    for (size_t j = 0; j < 512; j++) {
2665
18.9k
                        curModifier.push_back(1);
2666
18.9k
                    }
2667
42
                } else {
2668
310
                    for (auto& c : curModifier) {
2669
310
                        c++;
2670
310
                    }
2671
42
                }
2672
79
            }
2673
136
        }
2674
2675
186
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
186
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
186
        const auto& result = results.back();
2682
2683
186
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
186
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
186
        if ( options.disableTests == false ) {
2701
186
            tests::test(op, result.second);
2702
186
        }
2703
2704
186
        postprocess(module, op, result);
2705
186
    }
2706
2707
108
    if ( options.noCompare == false ) {
2708
50
        compare(operations, results, data, size);
2709
50
    }
2710
108
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
642
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
642
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
642
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.77k
    do {
2596
3.77k
        auto op = getOp(&parentDs, data, size);
2597
3.77k
        auto module = getModule(parentDs);
2598
3.77k
        if ( module == nullptr ) {
2599
2.63k
            continue;
2600
2.63k
        }
2601
2602
1.14k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.14k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
38
            break;
2607
38
        }
2608
3.74k
    } while ( parentDs.Get<bool>() == true );
2609
2610
642
    if ( operations.empty() == true ) {
2611
6
        return;
2612
6
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
636
#if 1
2616
636
    {
2617
636
        std::set<uint64_t> moduleIDs;
2618
1.13k
        for (const auto& m : modules ) {
2619
1.13k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.13k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.13k
            moduleIDs.insert(moduleID);
2627
1.13k
        }
2628
2629
636
        std::set<uint64_t> operationModuleIDs;
2630
1.07k
        for (const auto& op : operations) {
2631
1.07k
            operationModuleIDs.insert(op.first->ID);
2632
1.07k
        }
2633
2634
636
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
636
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
636
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
636
        for (const auto& id : addModuleIDs) {
2639
553
            operations.push_back({ modules.at(id), operations[0].second});
2640
553
        }
2641
636
    }
2642
636
#endif
2643
2644
636
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
636
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
2.26k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.62k
        auto& operation = operations[i];
2653
2654
1.62k
        auto& module = operation.first;
2655
1.62k
        auto& op = operation.second;
2656
2657
1.62k
        if ( i > 0 ) {
2658
1.05k
            auto& prevModule = operations[i-1].first;
2659
1.05k
            auto& prevOp = operations[i].second;
2660
2661
1.05k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
480
                auto& curModifier = op.modifier.GetVectorPtr();
2663
480
                if ( curModifier.size() == 0 ) {
2664
138k
                    for (size_t j = 0; j < 512; j++) {
2665
138k
                        curModifier.push_back(1);
2666
138k
                    }
2667
270
                } else {
2668
11.6k
                    for (auto& c : curModifier) {
2669
11.6k
                        c++;
2670
11.6k
                    }
2671
210
                }
2672
480
            }
2673
1.05k
        }
2674
2675
1.62k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.62k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.62k
        const auto& result = results.back();
2682
2683
1.62k
        if ( result.second != std::nullopt ) {
2684
741
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
741
        }
2691
2692
1.62k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
1.62k
        if ( options.disableTests == false ) {
2701
1.62k
            tests::test(op, result.second);
2702
1.62k
        }
2703
2704
1.62k
        postprocess(module, op, result);
2705
1.62k
    }
2706
2707
636
    if ( options.noCompare == false ) {
2708
568
        compare(operations, results, data, size);
2709
568
    }
2710
636
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
231
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
231
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
231
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.91k
    do {
2596
2.91k
        auto op = getOp(&parentDs, data, size);
2597
2.91k
        auto module = getModule(parentDs);
2598
2.91k
        if ( module == nullptr ) {
2599
2.48k
            continue;
2600
2.48k
        }
2601
2602
429
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
429
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
2.90k
    } while ( parentDs.Get<bool>() == true );
2609
2610
231
    if ( operations.empty() == true ) {
2611
7
        return;
2612
7
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
224
#if 1
2616
224
    {
2617
224
        std::set<uint64_t> moduleIDs;
2618
332
        for (const auto& m : modules ) {
2619
332
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
332
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
332
            moduleIDs.insert(moduleID);
2627
332
        }
2628
2629
224
        std::set<uint64_t> operationModuleIDs;
2630
353
        for (const auto& op : operations) {
2631
353
            operationModuleIDs.insert(op.first->ID);
2632
353
        }
2633
2634
224
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
224
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
224
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
224
        for (const auto& id : addModuleIDs) {
2639
155
            operations.push_back({ modules.at(id), operations[0].second});
2640
155
        }
2641
224
    }
2642
224
#endif
2643
2644
224
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
224
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
732
    for (size_t i = 0; i < operations.size(); i++) {
2652
508
        auto& operation = operations[i];
2653
2654
508
        auto& module = operation.first;
2655
508
        auto& op = operation.second;
2656
2657
508
        if ( i > 0 ) {
2658
342
            auto& prevModule = operations[i-1].first;
2659
342
            auto& prevOp = operations[i].second;
2660
2661
342
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
170
                auto& curModifier = op.modifier.GetVectorPtr();
2663
170
                if ( curModifier.size() == 0 ) {
2664
28.2k
                    for (size_t j = 0; j < 512; j++) {
2665
28.1k
                        curModifier.push_back(1);
2666
28.1k
                    }
2667
115
                } else {
2668
9.25k
                    for (auto& c : curModifier) {
2669
9.25k
                        c++;
2670
9.25k
                    }
2671
115
                }
2672
170
            }
2673
342
        }
2674
2675
508
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
508
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
508
        const auto& result = results.back();
2682
2683
508
        if ( result.second != std::nullopt ) {
2684
68
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
68
        }
2691
2692
508
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
508
        if ( options.disableTests == false ) {
2701
508
            tests::test(op, result.second);
2702
508
        }
2703
2704
508
        postprocess(module, op, result);
2705
508
    }
2706
2707
224
    if ( options.noCompare == false ) {
2708
166
        compare(operations, results, data, size);
2709
166
    }
2710
224
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
119
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
119
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
119
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.68k
    do {
2596
2.68k
        auto op = getOp(&parentDs, data, size);
2597
2.68k
        auto module = getModule(parentDs);
2598
2.68k
        if ( module == nullptr ) {
2599
2.48k
            continue;
2600
2.48k
        }
2601
2602
206
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
206
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
5
            break;
2607
5
        }
2608
2.68k
    } while ( parentDs.Get<bool>() == true );
2609
2610
119
    if ( operations.empty() == true ) {
2611
9
        return;
2612
9
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
110
#if 1
2616
110
    {
2617
110
        std::set<uint64_t> moduleIDs;
2618
110
        for (const auto& m : modules ) {
2619
86
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
86
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
86
            moduleIDs.insert(moduleID);
2627
86
        }
2628
2629
110
        std::set<uint64_t> operationModuleIDs;
2630
117
        for (const auto& op : operations) {
2631
117
            operationModuleIDs.insert(op.first->ID);
2632
117
        }
2633
2634
110
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
110
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
110
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
110
        for (const auto& id : addModuleIDs) {
2639
32
            operations.push_back({ modules.at(id), operations[0].second});
2640
32
        }
2641
110
    }
2642
110
#endif
2643
2644
110
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
110
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
259
    for (size_t i = 0; i < operations.size(); i++) {
2652
149
        auto& operation = operations[i];
2653
2654
149
        auto& module = operation.first;
2655
149
        auto& op = operation.second;
2656
2657
149
        if ( i > 0 ) {
2658
106
            auto& prevModule = operations[i-1].first;
2659
106
            auto& prevOp = operations[i].second;
2660
2661
106
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
57
                auto& curModifier = op.modifier.GetVectorPtr();
2663
57
                if ( curModifier.size() == 0 ) {
2664
13.8k
                    for (size_t j = 0; j < 512; j++) {
2665
13.8k
                        curModifier.push_back(1);
2666
13.8k
                    }
2667
30
                } else {
2668
254
                    for (auto& c : curModifier) {
2669
254
                        c++;
2670
254
                    }
2671
30
                }
2672
57
            }
2673
106
        }
2674
2675
149
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
149
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
149
        const auto& result = results.back();
2682
2683
149
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
149
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
149
        if ( options.disableTests == false ) {
2701
149
            tests::test(op, result.second);
2702
149
        }
2703
2704
149
        postprocess(module, op, result);
2705
149
    }
2706
2707
110
    if ( options.noCompare == false ) {
2708
43
        compare(operations, results, data, size);
2709
43
    }
2710
110
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
110
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
110
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
110
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.93k
    do {
2596
2.93k
        auto op = getOp(&parentDs, data, size);
2597
2.93k
        auto module = getModule(parentDs);
2598
2.93k
        if ( module == nullptr ) {
2599
2.70k
            continue;
2600
2.70k
        }
2601
2602
232
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
232
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
10
            break;
2607
10
        }
2608
2.92k
    } while ( parentDs.Get<bool>() == true );
2609
2610
110
    if ( operations.empty() == true ) {
2611
5
        return;
2612
5
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
105
#if 1
2616
105
    {
2617
105
        std::set<uint64_t> moduleIDs;
2618
105
        for (const auto& m : modules ) {
2619
98
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
98
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
98
            moduleIDs.insert(moduleID);
2627
98
        }
2628
2629
105
        std::set<uint64_t> operationModuleIDs;
2630
148
        for (const auto& op : operations) {
2631
148
            operationModuleIDs.insert(op.first->ID);
2632
148
        }
2633
2634
105
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
105
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
105
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
105
        for (const auto& id : addModuleIDs) {
2639
33
            operations.push_back({ modules.at(id), operations[0].second});
2640
33
        }
2641
105
    }
2642
105
#endif
2643
2644
105
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
105
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
286
    for (size_t i = 0; i < operations.size(); i++) {
2652
181
        auto& operation = operations[i];
2653
2654
181
        auto& module = operation.first;
2655
181
        auto& op = operation.second;
2656
2657
181
        if ( i > 0 ) {
2658
132
            auto& prevModule = operations[i-1].first;
2659
132
            auto& prevOp = operations[i].second;
2660
2661
132
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
75
                auto& curModifier = op.modifier.GetVectorPtr();
2663
75
                if ( curModifier.size() == 0 ) {
2664
16.9k
                    for (size_t j = 0; j < 512; j++) {
2665
16.8k
                        curModifier.push_back(1);
2666
16.8k
                    }
2667
42
                } else {
2668
560
                    for (auto& c : curModifier) {
2669
560
                        c++;
2670
560
                    }
2671
42
                }
2672
75
            }
2673
132
        }
2674
2675
181
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
181
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
181
        const auto& result = results.back();
2682
2683
181
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
181
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
181
        if ( options.disableTests == false ) {
2701
181
            tests::test(op, result.second);
2702
181
        }
2703
2704
181
        postprocess(module, op, result);
2705
181
    }
2706
2707
105
    if ( options.noCompare == false ) {
2708
49
        compare(operations, results, data, size);
2709
49
    }
2710
105
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
109
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
109
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
109
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.87k
    do {
2596
2.87k
        auto op = getOp(&parentDs, data, size);
2597
2.87k
        auto module = getModule(parentDs);
2598
2.87k
        if ( module == nullptr ) {
2599
2.68k
            continue;
2600
2.68k
        }
2601
2602
195
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
195
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.86k
    } while ( parentDs.Get<bool>() == true );
2609
2610
109
    if ( operations.empty() == true ) {
2611
10
        return;
2612
10
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
99
#if 1
2616
99
    {
2617
99
        std::set<uint64_t> moduleIDs;
2618
99
        for (const auto& m : modules ) {
2619
78
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
78
            moduleIDs.insert(moduleID);
2627
78
        }
2628
2629
99
        std::set<uint64_t> operationModuleIDs;
2630
116
        for (const auto& op : operations) {
2631
116
            operationModuleIDs.insert(op.first->ID);
2632
116
        }
2633
2634
99
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
99
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
99
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
99
        for (const auto& id : addModuleIDs) {
2639
28
            operations.push_back({ modules.at(id), operations[0].second});
2640
28
        }
2641
99
    }
2642
99
#endif
2643
2644
99
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
99
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
243
    for (size_t i = 0; i < operations.size(); i++) {
2652
144
        auto& operation = operations[i];
2653
2654
144
        auto& module = operation.first;
2655
144
        auto& op = operation.second;
2656
2657
144
        if ( i > 0 ) {
2658
105
            auto& prevModule = operations[i-1].first;
2659
105
            auto& prevOp = operations[i].second;
2660
2661
105
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
58
                auto& curModifier = op.modifier.GetVectorPtr();
2663
58
                if ( curModifier.size() == 0 ) {
2664
11.2k
                    for (size_t j = 0; j < 512; j++) {
2665
11.2k
                        curModifier.push_back(1);
2666
11.2k
                    }
2667
36
                } else {
2668
268
                    for (auto& c : curModifier) {
2669
268
                        c++;
2670
268
                    }
2671
36
                }
2672
58
            }
2673
105
        }
2674
2675
144
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
144
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
144
        const auto& result = results.back();
2682
2683
144
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
144
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
144
        if ( options.disableTests == false ) {
2701
144
            tests::test(op, result.second);
2702
144
        }
2703
2704
144
        postprocess(module, op, result);
2705
144
    }
2706
2707
99
    if ( options.noCompare == false ) {
2708
39
        compare(operations, results, data, size);
2709
39
    }
2710
99
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
392
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
392
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
392
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.30k
    do {
2596
2.30k
        auto op = getOp(&parentDs, data, size);
2597
2.30k
        auto module = getModule(parentDs);
2598
2.30k
        if ( module == nullptr ) {
2599
1.64k
            continue;
2600
1.64k
        }
2601
2602
665
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
665
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
15
            break;
2607
15
        }
2608
2.29k
    } while ( parentDs.Get<bool>() == true );
2609
2610
392
    if ( operations.empty() == true ) {
2611
29
        return;
2612
29
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
363
#if 1
2616
363
    {
2617
363
        std::set<uint64_t> moduleIDs;
2618
580
        for (const auto& m : modules ) {
2619
580
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
580
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
580
            moduleIDs.insert(moduleID);
2627
580
        }
2628
2629
363
        std::set<uint64_t> operationModuleIDs;
2630
590
        for (const auto& op : operations) {
2631
590
            operationModuleIDs.insert(op.first->ID);
2632
590
        }
2633
2634
363
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
363
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
363
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
363
        for (const auto& id : addModuleIDs) {
2639
273
            operations.push_back({ modules.at(id), operations[0].second});
2640
273
        }
2641
363
    }
2642
363
#endif
2643
2644
363
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
363
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.22k
    for (size_t i = 0; i < operations.size(); i++) {
2652
863
        auto& operation = operations[i];
2653
2654
863
        auto& module = operation.first;
2655
863
        auto& op = operation.second;
2656
2657
863
        if ( i > 0 ) {
2658
573
            auto& prevModule = operations[i-1].first;
2659
573
            auto& prevOp = operations[i].second;
2660
2661
573
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
268
                auto& curModifier = op.modifier.GetVectorPtr();
2663
268
                if ( curModifier.size() == 0 ) {
2664
96.9k
                    for (size_t j = 0; j < 512; j++) {
2665
96.7k
                        curModifier.push_back(1);
2666
96.7k
                    }
2667
189
                } else {
2668
422
                    for (auto& c : curModifier) {
2669
422
                        c++;
2670
422
                    }
2671
79
                }
2672
268
            }
2673
573
        }
2674
2675
863
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
863
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
863
        const auto& result = results.back();
2682
2683
863
        if ( result.second != std::nullopt ) {
2684
496
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
496
        }
2691
2692
863
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
863
        if ( options.disableTests == false ) {
2701
863
            tests::test(op, result.second);
2702
863
        }
2703
2704
863
        postprocess(module, op, result);
2705
863
    }
2706
2707
363
    if ( options.noCompare == false ) {
2708
290
        compare(operations, results, data, size);
2709
290
    }
2710
363
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
176
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
176
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
176
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.20k
    do {
2596
2.20k
        auto op = getOp(&parentDs, data, size);
2597
2.20k
        auto module = getModule(parentDs);
2598
2.20k
        if ( module == nullptr ) {
2599
1.87k
            continue;
2600
1.87k
        }
2601
2602
325
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
325
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.19k
    } while ( parentDs.Get<bool>() == true );
2609
2610
176
    if ( operations.empty() == true ) {
2611
5
        return;
2612
5
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
171
#if 1
2616
171
    {
2617
171
        std::set<uint64_t> moduleIDs;
2618
222
        for (const auto& m : modules ) {
2619
222
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
222
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
222
            moduleIDs.insert(moduleID);
2627
222
        }
2628
2629
171
        std::set<uint64_t> operationModuleIDs;
2630
257
        for (const auto& op : operations) {
2631
257
            operationModuleIDs.insert(op.first->ID);
2632
257
        }
2633
2634
171
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
171
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
171
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
171
        for (const auto& id : addModuleIDs) {
2639
97
            operations.push_back({ modules.at(id), operations[0].second});
2640
97
        }
2641
171
    }
2642
171
#endif
2643
2644
171
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
171
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
525
    for (size_t i = 0; i < operations.size(); i++) {
2652
354
        auto& operation = operations[i];
2653
2654
354
        auto& module = operation.first;
2655
354
        auto& op = operation.second;
2656
2657
354
        if ( i > 0 ) {
2658
243
            auto& prevModule = operations[i-1].first;
2659
243
            auto& prevOp = operations[i].second;
2660
2661
243
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
126
                auto& curModifier = op.modifier.GetVectorPtr();
2663
126
                if ( curModifier.size() == 0 ) {
2664
30.7k
                    for (size_t j = 0; j < 512; j++) {
2665
30.7k
                        curModifier.push_back(1);
2666
30.7k
                    }
2667
66
                } else {
2668
330
                    for (auto& c : curModifier) {
2669
330
                        c++;
2670
330
                    }
2671
66
                }
2672
126
            }
2673
243
        }
2674
2675
354
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
354
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
354
        const auto& result = results.back();
2682
2683
354
        if ( result.second != std::nullopt ) {
2684
116
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
116
        }
2691
2692
354
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
354
        if ( options.disableTests == false ) {
2701
354
            tests::test(op, result.second);
2702
354
        }
2703
2704
354
        postprocess(module, op, result);
2705
354
    }
2706
2707
171
    if ( options.noCompare == false ) {
2708
111
        compare(operations, results, data, size);
2709
111
    }
2710
171
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
94
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
94
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
94
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.13k
    do {
2596
2.13k
        auto op = getOp(&parentDs, data, size);
2597
2.13k
        auto module = getModule(parentDs);
2598
2.13k
        if ( module == nullptr ) {
2599
1.96k
            continue;
2600
1.96k
        }
2601
2602
162
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
162
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.12k
    } while ( parentDs.Get<bool>() == true );
2609
2610
94
    if ( operations.empty() == true ) {
2611
10
        return;
2612
10
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
84
#if 1
2616
84
    {
2617
84
        std::set<uint64_t> moduleIDs;
2618
84
        for (const auto& m : modules ) {
2619
60
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
60
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
60
            moduleIDs.insert(moduleID);
2627
60
        }
2628
2629
84
        std::set<uint64_t> operationModuleIDs;
2630
94
        for (const auto& op : operations) {
2631
94
            operationModuleIDs.insert(op.first->ID);
2632
94
        }
2633
2634
84
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
84
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
84
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
84
        for (const auto& id : addModuleIDs) {
2639
19
            operations.push_back({ modules.at(id), operations[0].second});
2640
19
        }
2641
84
    }
2642
84
#endif
2643
2644
84
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
84
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
197
    for (size_t i = 0; i < operations.size(); i++) {
2652
113
        auto& operation = operations[i];
2653
2654
113
        auto& module = operation.first;
2655
113
        auto& op = operation.second;
2656
2657
113
        if ( i > 0 ) {
2658
83
            auto& prevModule = operations[i-1].first;
2659
83
            auto& prevOp = operations[i].second;
2660
2661
83
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
44
                auto& curModifier = op.modifier.GetVectorPtr();
2663
44
                if ( curModifier.size() == 0 ) {
2664
9.23k
                    for (size_t j = 0; j < 512; j++) {
2665
9.21k
                        curModifier.push_back(1);
2666
9.21k
                    }
2667
26
                } else {
2668
361
                    for (auto& c : curModifier) {
2669
361
                        c++;
2670
361
                    }
2671
26
                }
2672
44
            }
2673
83
        }
2674
2675
113
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
113
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
113
        const auto& result = results.back();
2682
2683
113
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
113
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
113
        if ( options.disableTests == false ) {
2701
113
            tests::test(op, result.second);
2702
113
        }
2703
2704
113
        postprocess(module, op, result);
2705
113
    }
2706
2707
84
    if ( options.noCompare == false ) {
2708
30
        compare(operations, results, data, size);
2709
30
    }
2710
84
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
96
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
96
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
96
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.24k
    do {
2596
2.24k
        auto op = getOp(&parentDs, data, size);
2597
2.24k
        auto module = getModule(parentDs);
2598
2.24k
        if ( module == nullptr ) {
2599
2.06k
            continue;
2600
2.06k
        }
2601
2602
178
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
178
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.23k
    } while ( parentDs.Get<bool>() == true );
2609
2610
96
    if ( operations.empty() == true ) {
2611
7
        return;
2612
7
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
89
#if 1
2616
89
    {
2617
89
        std::set<uint64_t> moduleIDs;
2618
89
        for (const auto& m : modules ) {
2619
72
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
72
            moduleIDs.insert(moduleID);
2627
72
        }
2628
2629
89
        std::set<uint64_t> operationModuleIDs;
2630
110
        for (const auto& op : operations) {
2631
110
            operationModuleIDs.insert(op.first->ID);
2632
110
        }
2633
2634
89
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
89
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
89
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
89
        for (const auto& id : addModuleIDs) {
2639
25
            operations.push_back({ modules.at(id), operations[0].second});
2640
25
        }
2641
89
    }
2642
89
#endif
2643
2644
89
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
89
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
224
    for (size_t i = 0; i < operations.size(); i++) {
2652
135
        auto& operation = operations[i];
2653
2654
135
        auto& module = operation.first;
2655
135
        auto& op = operation.second;
2656
2657
135
        if ( i > 0 ) {
2658
99
            auto& prevModule = operations[i-1].first;
2659
99
            auto& prevOp = operations[i].second;
2660
2661
99
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
57
                auto& curModifier = op.modifier.GetVectorPtr();
2663
57
                if ( curModifier.size() == 0 ) {
2664
14.8k
                    for (size_t j = 0; j < 512; j++) {
2665
14.8k
                        curModifier.push_back(1);
2666
14.8k
                    }
2667
29
                } else {
2668
393
                    for (auto& c : curModifier) {
2669
393
                        c++;
2670
393
                    }
2671
28
                }
2672
57
            }
2673
99
        }
2674
2675
135
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
135
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
135
        const auto& result = results.back();
2682
2683
135
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
135
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
135
        if ( options.disableTests == false ) {
2701
135
            tests::test(op, result.second);
2702
135
        }
2703
2704
135
        postprocess(module, op, result);
2705
135
    }
2706
2707
89
    if ( options.noCompare == false ) {
2708
36
        compare(operations, results, data, size);
2709
36
    }
2710
89
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
636
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
636
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
636
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.20k
    do {
2596
3.20k
        auto op = getOp(&parentDs, data, size);
2597
3.20k
        auto module = getModule(parentDs);
2598
3.20k
        if ( module == nullptr ) {
2599
2.19k
            continue;
2600
2.19k
        }
2601
2602
1.01k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.01k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
25
            break;
2607
25
        }
2608
3.17k
    } while ( parentDs.Get<bool>() == true );
2609
2610
636
    if ( operations.empty() == true ) {
2611
11
        return;
2612
11
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
625
#if 1
2616
625
    {
2617
625
        std::set<uint64_t> moduleIDs;
2618
1.12k
        for (const auto& m : modules ) {
2619
1.12k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.12k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.12k
            moduleIDs.insert(moduleID);
2627
1.12k
        }
2628
2629
625
        std::set<uint64_t> operationModuleIDs;
2630
921
        for (const auto& op : operations) {
2631
921
            operationModuleIDs.insert(op.first->ID);
2632
921
        }
2633
2634
625
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
625
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
625
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
625
        for (const auto& id : addModuleIDs) {
2639
550
            operations.push_back({ modules.at(id), operations[0].second});
2640
550
        }
2641
625
    }
2642
625
#endif
2643
2644
625
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
625
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
2.09k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.47k
        auto& operation = operations[i];
2653
2654
1.47k
        auto& module = operation.first;
2655
1.47k
        auto& op = operation.second;
2656
2657
1.47k
        if ( i > 0 ) {
2658
908
            auto& prevModule = operations[i-1].first;
2659
908
            auto& prevOp = operations[i].second;
2660
2661
908
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
338
                auto& curModifier = op.modifier.GetVectorPtr();
2663
338
                if ( curModifier.size() == 0 ) {
2664
119k
                    for (size_t j = 0; j < 512; j++) {
2665
119k
                        curModifier.push_back(1);
2666
119k
                    }
2667
233
                } else {
2668
422
                    for (auto& c : curModifier) {
2669
422
                        c++;
2670
422
                    }
2671
105
                }
2672
338
            }
2673
908
        }
2674
2675
1.47k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.47k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.47k
        const auto& result = results.back();
2682
2683
1.47k
        if ( result.second != std::nullopt ) {
2684
601
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
601
        }
2691
2692
1.47k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
1.47k
        if ( options.disableTests == false ) {
2701
1.47k
            tests::test(op, result.second);
2702
1.47k
        }
2703
2704
1.47k
        postprocess(module, op, result);
2705
1.47k
    }
2706
2707
625
    if ( options.noCompare == false ) {
2708
563
        compare(operations, results, data, size);
2709
563
    }
2710
625
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
117
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
117
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
117
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.50k
    do {
2596
2.50k
        auto op = getOp(&parentDs, data, size);
2597
2.50k
        auto module = getModule(parentDs);
2598
2.50k
        if ( module == nullptr ) {
2599
2.28k
            continue;
2600
2.28k
        }
2601
2602
216
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
216
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
9
            break;
2607
9
        }
2608
2.49k
    } while ( parentDs.Get<bool>() == true );
2609
2610
117
    if ( operations.empty() == true ) {
2611
17
        return;
2612
17
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
100
#if 1
2616
100
    {
2617
100
        std::set<uint64_t> moduleIDs;
2618
100
        for (const auto& m : modules ) {
2619
96
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
96
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
96
            moduleIDs.insert(moduleID);
2627
96
        }
2628
2629
100
        std::set<uint64_t> operationModuleIDs;
2630
141
        for (const auto& op : operations) {
2631
141
            operationModuleIDs.insert(op.first->ID);
2632
141
        }
2633
2634
100
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
100
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
100
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
100
        for (const auto& id : addModuleIDs) {
2639
35
            operations.push_back({ modules.at(id), operations[0].second});
2640
35
        }
2641
100
    }
2642
100
#endif
2643
2644
100
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
100
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
276
    for (size_t i = 0; i < operations.size(); i++) {
2652
176
        auto& operation = operations[i];
2653
2654
176
        auto& module = operation.first;
2655
176
        auto& op = operation.second;
2656
2657
176
        if ( i > 0 ) {
2658
128
            auto& prevModule = operations[i-1].first;
2659
128
            auto& prevOp = operations[i].second;
2660
2661
128
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
74
                auto& curModifier = op.modifier.GetVectorPtr();
2663
74
                if ( curModifier.size() == 0 ) {
2664
16.9k
                    for (size_t j = 0; j < 512; j++) {
2665
16.8k
                        curModifier.push_back(1);
2666
16.8k
                    }
2667
41
                } else {
2668
768
                    for (auto& c : curModifier) {
2669
768
                        c++;
2670
768
                    }
2671
41
                }
2672
74
            }
2673
128
        }
2674
2675
176
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
176
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
176
        const auto& result = results.back();
2682
2683
176
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
176
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
176
        if ( options.disableTests == false ) {
2701
176
            tests::test(op, result.second);
2702
176
        }
2703
2704
176
        postprocess(module, op, result);
2705
176
    }
2706
2707
100
    if ( options.noCompare == false ) {
2708
48
        compare(operations, results, data, size);
2709
48
    }
2710
100
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
141
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
141
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
141
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.37k
    do {
2596
2.37k
        auto op = getOp(&parentDs, data, size);
2597
2.37k
        auto module = getModule(parentDs);
2598
2.37k
        if ( module == nullptr ) {
2599
2.17k
            continue;
2600
2.17k
        }
2601
2602
200
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
200
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.36k
    } while ( parentDs.Get<bool>() == true );
2609
2610
141
    if ( operations.empty() == true ) {
2611
16
        return;
2612
16
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
125
#if 1
2616
125
    {
2617
125
        std::set<uint64_t> moduleIDs;
2618
125
        for (const auto& m : modules ) {
2619
106
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
106
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
106
            moduleIDs.insert(moduleID);
2627
106
        }
2628
2629
125
        std::set<uint64_t> operationModuleIDs;
2630
129
        for (const auto& op : operations) {
2631
129
            operationModuleIDs.insert(op.first->ID);
2632
129
        }
2633
2634
125
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
125
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
125
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
125
        for (const auto& id : addModuleIDs) {
2639
45
            operations.push_back({ modules.at(id), operations[0].second});
2640
45
        }
2641
125
    }
2642
125
#endif
2643
2644
125
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
125
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
299
    for (size_t i = 0; i < operations.size(); i++) {
2652
174
        auto& operation = operations[i];
2653
2654
174
        auto& module = operation.first;
2655
174
        auto& op = operation.second;
2656
2657
174
        if ( i > 0 ) {
2658
121
            auto& prevModule = operations[i-1].first;
2659
121
            auto& prevOp = operations[i].second;
2660
2661
121
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
62
                auto& curModifier = op.modifier.GetVectorPtr();
2663
62
                if ( curModifier.size() == 0 ) {
2664
17.4k
                    for (size_t j = 0; j < 512; j++) {
2665
17.4k
                        curModifier.push_back(1);
2666
17.4k
                    }
2667
34
                } else {
2668
621
                    for (auto& c : curModifier) {
2669
621
                        c++;
2670
621
                    }
2671
28
                }
2672
62
            }
2673
121
        }
2674
2675
174
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
174
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
174
        const auto& result = results.back();
2682
2683
174
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
174
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
174
        if ( options.disableTests == false ) {
2701
174
            tests::test(op, result.second);
2702
174
        }
2703
2704
174
        postprocess(module, op, result);
2705
174
    }
2706
2707
125
    if ( options.noCompare == false ) {
2708
53
        compare(operations, results, data, size);
2709
53
    }
2710
125
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
190
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
190
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
190
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.53k
    do {
2596
1.53k
        auto op = getOp(&parentDs, data, size);
2597
1.53k
        auto module = getModule(parentDs);
2598
1.53k
        if ( module == nullptr ) {
2599
1.36k
            continue;
2600
1.36k
        }
2601
2602
168
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
168
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
5
            break;
2607
5
        }
2608
1.53k
    } while ( parentDs.Get<bool>() == true );
2609
2610
190
    if ( operations.empty() == true ) {
2611
17
        return;
2612
17
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
173
#if 1
2616
173
    {
2617
173
        std::set<uint64_t> moduleIDs;
2618
173
        for (const auto& m : modules ) {
2619
70
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
70
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
70
            moduleIDs.insert(moduleID);
2627
70
        }
2628
2629
173
        std::set<uint64_t> operationModuleIDs;
2630
173
        for (const auto& op : operations) {
2631
100
            operationModuleIDs.insert(op.first->ID);
2632
100
        }
2633
2634
173
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
173
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
173
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
173
        for (const auto& id : addModuleIDs) {
2639
22
            operations.push_back({ modules.at(id), operations[0].second});
2640
22
        }
2641
173
    }
2642
173
#endif
2643
2644
173
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
173
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
295
    for (size_t i = 0; i < operations.size(); i++) {
2652
122
        auto& operation = operations[i];
2653
2654
122
        auto& module = operation.first;
2655
122
        auto& op = operation.second;
2656
2657
122
        if ( i > 0 ) {
2658
87
            auto& prevModule = operations[i-1].first;
2659
87
            auto& prevOp = operations[i].second;
2660
2661
87
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
45
                auto& curModifier = op.modifier.GetVectorPtr();
2663
45
                if ( curModifier.size() == 0 ) {
2664
10.7k
                    for (size_t j = 0; j < 512; j++) {
2665
10.7k
                        curModifier.push_back(1);
2666
10.7k
                    }
2667
24
                } else {
2668
256
                    for (auto& c : curModifier) {
2669
256
                        c++;
2670
256
                    }
2671
24
                }
2672
45
            }
2673
87
        }
2674
2675
122
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
122
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
122
        const auto& result = results.back();
2682
2683
122
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
122
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
122
        if ( options.disableTests == false ) {
2701
122
            tests::test(op, result.second);
2702
122
        }
2703
2704
122
        postprocess(module, op, result);
2705
122
    }
2706
2707
173
    if ( options.noCompare == false ) {
2708
35
        compare(operations, results, data, size);
2709
35
    }
2710
173
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
145
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
145
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
145
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.39k
    do {
2596
2.39k
        auto op = getOp(&parentDs, data, size);
2597
2.39k
        auto module = getModule(parentDs);
2598
2.39k
        if ( module == nullptr ) {
2599
2.17k
            continue;
2600
2.17k
        }
2601
2602
216
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
216
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.38k
    } while ( parentDs.Get<bool>() == true );
2609
2610
145
    if ( operations.empty() == true ) {
2611
15
        return;
2612
15
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
130
#if 1
2616
130
    {
2617
130
        std::set<uint64_t> moduleIDs;
2618
130
        for (const auto& m : modules ) {
2619
72
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
72
            moduleIDs.insert(moduleID);
2627
72
        }
2628
2629
130
        std::set<uint64_t> operationModuleIDs;
2630
130
        for (const auto& op : operations) {
2631
114
            operationModuleIDs.insert(op.first->ID);
2632
114
        }
2633
2634
130
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
130
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
130
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
130
        for (const auto& id : addModuleIDs) {
2639
25
            operations.push_back({ modules.at(id), operations[0].second});
2640
25
        }
2641
130
    }
2642
130
#endif
2643
2644
130
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
130
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
269
    for (size_t i = 0; i < operations.size(); i++) {
2652
139
        auto& operation = operations[i];
2653
2654
139
        auto& module = operation.first;
2655
139
        auto& op = operation.second;
2656
2657
139
        if ( i > 0 ) {
2658
103
            auto& prevModule = operations[i-1].first;
2659
103
            auto& prevOp = operations[i].second;
2660
2661
103
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
59
                auto& curModifier = op.modifier.GetVectorPtr();
2663
59
                if ( curModifier.size() == 0 ) {
2664
6.15k
                    for (size_t j = 0; j < 512; j++) {
2665
6.14k
                        curModifier.push_back(1);
2666
6.14k
                    }
2667
47
                } else {
2668
632
                    for (auto& c : curModifier) {
2669
632
                        c++;
2670
632
                    }
2671
47
                }
2672
59
            }
2673
103
        }
2674
2675
139
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
139
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
139
        const auto& result = results.back();
2682
2683
139
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
139
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
139
        if ( options.disableTests == false ) {
2701
139
            tests::test(op, result.second);
2702
139
        }
2703
2704
139
        postprocess(module, op, result);
2705
139
    }
2706
2707
130
    if ( options.noCompare == false ) {
2708
36
        compare(operations, results, data, size);
2709
36
    }
2710
130
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
195
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
195
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
195
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.92k
    do {
2596
2.92k
        auto op = getOp(&parentDs, data, size);
2597
2.92k
        auto module = getModule(parentDs);
2598
2.92k
        if ( module == nullptr ) {
2599
2.70k
            continue;
2600
2.70k
        }
2601
2602
227
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
227
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
2.92k
    } while ( parentDs.Get<bool>() == true );
2609
2610
195
    if ( operations.empty() == true ) {
2611
35
        return;
2612
35
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
160
#if 1
2616
160
    {
2617
160
        std::set<uint64_t> moduleIDs;
2618
160
        for (const auto& m : modules ) {
2619
112
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
112
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
112
            moduleIDs.insert(moduleID);
2627
112
        }
2628
2629
160
        std::set<uint64_t> operationModuleIDs;
2630
160
        for (const auto& op : operations) {
2631
130
            operationModuleIDs.insert(op.first->ID);
2632
130
        }
2633
2634
160
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
160
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
160
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
160
        for (const auto& id : addModuleIDs) {
2639
47
            operations.push_back({ modules.at(id), operations[0].second});
2640
47
        }
2641
160
    }
2642
160
#endif
2643
2644
160
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
160
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
337
    for (size_t i = 0; i < operations.size(); i++) {
2652
177
        auto& operation = operations[i];
2653
2654
177
        auto& module = operation.first;
2655
177
        auto& op = operation.second;
2656
2657
177
        if ( i > 0 ) {
2658
121
            auto& prevModule = operations[i-1].first;
2659
121
            auto& prevOp = operations[i].second;
2660
2661
121
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
55
                auto& curModifier = op.modifier.GetVectorPtr();
2663
55
                if ( curModifier.size() == 0 ) {
2664
12.8k
                    for (size_t j = 0; j < 512; j++) {
2665
12.8k
                        curModifier.push_back(1);
2666
12.8k
                    }
2667
30
                } else {
2668
273
                    for (auto& c : curModifier) {
2669
273
                        c++;
2670
273
                    }
2671
30
                }
2672
55
            }
2673
121
        }
2674
2675
177
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
177
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
177
        const auto& result = results.back();
2682
2683
177
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
177
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
177
        if ( options.disableTests == false ) {
2701
177
            tests::test(op, result.second);
2702
177
        }
2703
2704
177
        postprocess(module, op, result);
2705
177
    }
2706
2707
160
    if ( options.noCompare == false ) {
2708
56
        compare(operations, results, data, size);
2709
56
    }
2710
160
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
167
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
167
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
167
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.27k
    do {
2596
2.27k
        auto op = getOp(&parentDs, data, size);
2597
2.27k
        auto module = getModule(parentDs);
2598
2.27k
        if ( module == nullptr ) {
2599
2.07k
            continue;
2600
2.07k
        }
2601
2602
191
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
191
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
5
            break;
2607
5
        }
2608
2.26k
    } while ( parentDs.Get<bool>() == true );
2609
2610
167
    if ( operations.empty() == true ) {
2611
29
        return;
2612
29
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
138
#if 1
2616
138
    {
2617
138
        std::set<uint64_t> moduleIDs;
2618
138
        for (const auto& m : modules ) {
2619
74
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
74
            moduleIDs.insert(moduleID);
2627
74
        }
2628
2629
138
        std::set<uint64_t> operationModuleIDs;
2630
138
        for (const auto& op : operations) {
2631
103
            operationModuleIDs.insert(op.first->ID);
2632
103
        }
2633
2634
138
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
138
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
138
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
138
        for (const auto& id : addModuleIDs) {
2639
26
            operations.push_back({ modules.at(id), operations[0].second});
2640
26
        }
2641
138
    }
2642
138
#endif
2643
2644
138
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
138
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
267
    for (size_t i = 0; i < operations.size(); i++) {
2652
129
        auto& operation = operations[i];
2653
2654
129
        auto& module = operation.first;
2655
129
        auto& op = operation.second;
2656
2657
129
        if ( i > 0 ) {
2658
92
            auto& prevModule = operations[i-1].first;
2659
92
            auto& prevOp = operations[i].second;
2660
2661
92
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
49
                auto& curModifier = op.modifier.GetVectorPtr();
2663
49
                if ( curModifier.size() == 0 ) {
2664
10.7k
                    for (size_t j = 0; j < 512; j++) {
2665
10.7k
                        curModifier.push_back(1);
2666
10.7k
                    }
2667
28
                } else {
2668
643
                    for (auto& c : curModifier) {
2669
643
                        c++;
2670
643
                    }
2671
28
                }
2672
49
            }
2673
92
        }
2674
2675
129
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
129
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
129
        const auto& result = results.back();
2682
2683
129
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
129
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
129
        if ( options.disableTests == false ) {
2701
129
            tests::test(op, result.second);
2702
129
        }
2703
2704
129
        postprocess(module, op, result);
2705
129
    }
2706
2707
138
    if ( options.noCompare == false ) {
2708
37
        compare(operations, results, data, size);
2709
37
    }
2710
138
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
123
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
123
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
123
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.22k
    do {
2596
3.22k
        auto op = getOp(&parentDs, data, size);
2597
3.22k
        auto module = getModule(parentDs);
2598
3.22k
        if ( module == nullptr ) {
2599
3.03k
            continue;
2600
3.03k
        }
2601
2602
186
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
186
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
3.21k
    } while ( parentDs.Get<bool>() == true );
2609
2610
123
    if ( operations.empty() == true ) {
2611
10
        return;
2612
10
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
113
#if 1
2616
113
    {
2617
113
        std::set<uint64_t> moduleIDs;
2618
113
        for (const auto& m : modules ) {
2619
58
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
58
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
58
            moduleIDs.insert(moduleID);
2627
58
        }
2628
2629
113
        std::set<uint64_t> operationModuleIDs;
2630
113
        for (const auto& op : operations) {
2631
84
            operationModuleIDs.insert(op.first->ID);
2632
84
        }
2633
2634
113
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
113
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
113
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
113
        for (const auto& id : addModuleIDs) {
2639
20
            operations.push_back({ modules.at(id), operations[0].second});
2640
20
        }
2641
113
    }
2642
113
#endif
2643
2644
113
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
113
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
217
    for (size_t i = 0; i < operations.size(); i++) {
2652
104
        auto& operation = operations[i];
2653
2654
104
        auto& module = operation.first;
2655
104
        auto& op = operation.second;
2656
2657
104
        if ( i > 0 ) {
2658
75
            auto& prevModule = operations[i-1].first;
2659
75
            auto& prevOp = operations[i].second;
2660
2661
75
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
36
                auto& curModifier = op.modifier.GetVectorPtr();
2663
36
                if ( curModifier.size() == 0 ) {
2664
6.66k
                    for (size_t j = 0; j < 512; j++) {
2665
6.65k
                        curModifier.push_back(1);
2666
6.65k
                    }
2667
23
                } else {
2668
516
                    for (auto& c : curModifier) {
2669
516
                        c++;
2670
516
                    }
2671
23
                }
2672
36
            }
2673
75
        }
2674
2675
104
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
104
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
104
        const auto& result = results.back();
2682
2683
104
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
104
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
104
        if ( options.disableTests == false ) {
2701
104
            tests::test(op, result.second);
2702
104
        }
2703
2704
104
        postprocess(module, op, result);
2705
104
    }
2706
2707
113
    if ( options.noCompare == false ) {
2708
29
        compare(operations, results, data, size);
2709
29
    }
2710
113
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
123
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
123
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
123
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.90k
    do {
2596
2.90k
        auto op = getOp(&parentDs, data, size);
2597
2.90k
        auto module = getModule(parentDs);
2598
2.90k
        if ( module == nullptr ) {
2599
2.65k
            continue;
2600
2.65k
        }
2601
2602
245
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
245
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
2.89k
    } while ( parentDs.Get<bool>() == true );
2609
2610
123
    if ( operations.empty() == true ) {
2611
7
        return;
2612
7
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
116
#if 1
2616
116
    {
2617
116
        std::set<uint64_t> moduleIDs;
2618
116
        for (const auto& m : modules ) {
2619
82
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
82
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
82
            moduleIDs.insert(moduleID);
2627
82
        }
2628
2629
116
        std::set<uint64_t> operationModuleIDs;
2630
117
        for (const auto& op : operations) {
2631
117
            operationModuleIDs.insert(op.first->ID);
2632
117
        }
2633
2634
116
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
116
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
116
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
116
        for (const auto& id : addModuleIDs) {
2639
30
            operations.push_back({ modules.at(id), operations[0].second});
2640
30
        }
2641
116
    }
2642
116
#endif
2643
2644
116
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
116
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
263
    for (size_t i = 0; i < operations.size(); i++) {
2652
147
        auto& operation = operations[i];
2653
2654
147
        auto& module = operation.first;
2655
147
        auto& op = operation.second;
2656
2657
147
        if ( i > 0 ) {
2658
106
            auto& prevModule = operations[i-1].first;
2659
106
            auto& prevOp = operations[i].second;
2660
2661
106
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
59
                auto& curModifier = op.modifier.GetVectorPtr();
2663
59
                if ( curModifier.size() == 0 ) {
2664
11.7k
                    for (size_t j = 0; j < 512; j++) {
2665
11.7k
                        curModifier.push_back(1);
2666
11.7k
                    }
2667
36
                } else {
2668
640
                    for (auto& c : curModifier) {
2669
640
                        c++;
2670
640
                    }
2671
36
                }
2672
59
            }
2673
106
        }
2674
2675
147
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
147
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
147
        const auto& result = results.back();
2682
2683
147
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
147
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
147
        if ( options.disableTests == false ) {
2701
147
            tests::test(op, result.second);
2702
147
        }
2703
2704
147
        postprocess(module, op, result);
2705
147
    }
2706
2707
116
    if ( options.noCompare == false ) {
2708
41
        compare(operations, results, data, size);
2709
41
    }
2710
116
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
179
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
179
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
179
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.09k
    do {
2596
2.09k
        auto op = getOp(&parentDs, data, size);
2597
2.09k
        auto module = getModule(parentDs);
2598
2.09k
        if ( module == nullptr ) {
2599
1.80k
            continue;
2600
1.80k
        }
2601
2602
294
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
294
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
10
            break;
2607
10
        }
2608
2.08k
    } while ( parentDs.Get<bool>() == true );
2609
2610
179
    if ( operations.empty() == true ) {
2611
10
        return;
2612
10
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
169
#if 1
2616
169
    {
2617
169
        std::set<uint64_t> moduleIDs;
2618
169
        for (const auto& m : modules ) {
2619
154
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
154
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
154
            moduleIDs.insert(moduleID);
2627
154
        }
2628
2629
169
        std::set<uint64_t> operationModuleIDs;
2630
201
        for (const auto& op : operations) {
2631
201
            operationModuleIDs.insert(op.first->ID);
2632
201
        }
2633
2634
169
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
169
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
169
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
169
        for (const auto& id : addModuleIDs) {
2639
67
            operations.push_back({ modules.at(id), operations[0].second});
2640
67
        }
2641
169
    }
2642
169
#endif
2643
2644
169
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
169
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
437
    for (size_t i = 0; i < operations.size(); i++) {
2652
268
        auto& operation = operations[i];
2653
2654
268
        auto& module = operation.first;
2655
268
        auto& op = operation.second;
2656
2657
268
        if ( i > 0 ) {
2658
191
            auto& prevModule = operations[i-1].first;
2659
191
            auto& prevOp = operations[i].second;
2660
2661
191
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
108
                auto& curModifier = op.modifier.GetVectorPtr();
2663
108
                if ( curModifier.size() == 0 ) {
2664
33.3k
                    for (size_t j = 0; j < 512; j++) {
2665
33.2k
                        curModifier.push_back(1);
2666
33.2k
                    }
2667
65
                } else {
2668
357
                    for (auto& c : curModifier) {
2669
357
                        c++;
2670
357
                    }
2671
43
                }
2672
108
            }
2673
191
        }
2674
2675
268
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
268
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
268
        const auto& result = results.back();
2682
2683
268
        if ( result.second != std::nullopt ) {
2684
33
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
33
        }
2691
2692
268
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
268
        if ( options.disableTests == false ) {
2701
268
            tests::test(op, result.second);
2702
268
        }
2703
2704
268
        postprocess(module, op, result);
2705
268
    }
2706
2707
169
    if ( options.noCompare == false ) {
2708
77
        compare(operations, results, data, size);
2709
77
    }
2710
169
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
871
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
871
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
871
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.86k
    do {
2596
3.86k
        auto op = getOp(&parentDs, data, size);
2597
3.86k
        auto module = getModule(parentDs);
2598
3.86k
        if ( module == nullptr ) {
2599
2.44k
            continue;
2600
2.44k
        }
2601
2602
1.41k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.41k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
28
            break;
2607
28
        }
2608
3.83k
    } while ( parentDs.Get<bool>() == true );
2609
2610
871
    if ( operations.empty() == true ) {
2611
40
        return;
2612
40
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
831
#if 1
2616
831
    {
2617
831
        std::set<uint64_t> moduleIDs;
2618
1.44k
        for (const auto& m : modules ) {
2619
1.44k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.44k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.44k
            moduleIDs.insert(moduleID);
2627
1.44k
        }
2628
2629
831
        std::set<uint64_t> operationModuleIDs;
2630
1.30k
        for (const auto& op : operations) {
2631
1.30k
            operationModuleIDs.insert(op.first->ID);
2632
1.30k
        }
2633
2634
831
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
831
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
831
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
831
        for (const auto& id : addModuleIDs) {
2639
707
            operations.push_back({ modules.at(id), operations[0].second});
2640
707
        }
2641
831
    }
2642
831
#endif
2643
2644
831
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
831
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
2.84k
    for (size_t i = 0; i < operations.size(); i++) {
2652
2.00k
        auto& operation = operations[i];
2653
2654
2.00k
        auto& module = operation.first;
2655
2.00k
        auto& op = operation.second;
2656
2657
2.00k
        if ( i > 0 ) {
2658
1.28k
            auto& prevModule = operations[i-1].first;
2659
1.28k
            auto& prevOp = operations[i].second;
2660
2661
1.28k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
550
                auto& curModifier = op.modifier.GetVectorPtr();
2663
550
                if ( curModifier.size() == 0 ) {
2664
242k
                    for (size_t j = 0; j < 512; j++) {
2665
241k
                        curModifier.push_back(1);
2666
241k
                    }
2667
472
                } else {
2668
308
                    for (auto& c : curModifier) {
2669
308
                        c++;
2670
308
                    }
2671
78
                }
2672
550
            }
2673
1.28k
        }
2674
2675
2.00k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
2.00k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
2.00k
        const auto& result = results.back();
2682
2683
2.00k
        if ( result.second != std::nullopt ) {
2684
145
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
145
        }
2691
2692
2.00k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
2.00k
        if ( options.disableTests == false ) {
2701
2.00k
            tests::test(op, result.second);
2702
2.00k
        }
2703
2704
2.00k
        postprocess(module, op, result);
2705
2.00k
    }
2706
2707
831
    if ( options.noCompare == false ) {
2708
723
        compare(operations, results, data, size);
2709
723
    }
2710
831
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
193
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
193
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
193
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.85k
    do {
2596
1.85k
        auto op = getOp(&parentDs, data, size);
2597
1.85k
        auto module = getModule(parentDs);
2598
1.85k
        if ( module == nullptr ) {
2599
1.61k
            continue;
2600
1.61k
        }
2601
2602
239
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
239
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
1.84k
    } while ( parentDs.Get<bool>() == true );
2609
2610
193
    if ( operations.empty() == true ) {
2611
18
        return;
2612
18
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
175
#if 1
2616
175
    {
2617
175
        std::set<uint64_t> moduleIDs;
2618
175
        for (const auto& m : modules ) {
2619
128
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
128
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
128
            moduleIDs.insert(moduleID);
2627
128
        }
2628
2629
175
        std::set<uint64_t> operationModuleIDs;
2630
175
        for (const auto& op : operations) {
2631
166
            operationModuleIDs.insert(op.first->ID);
2632
166
        }
2633
2634
175
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
175
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
175
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
175
        for (const auto& id : addModuleIDs) {
2639
52
            operations.push_back({ modules.at(id), operations[0].second});
2640
52
        }
2641
175
    }
2642
175
#endif
2643
2644
175
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
175
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
393
    for (size_t i = 0; i < operations.size(); i++) {
2652
218
        auto& operation = operations[i];
2653
2654
218
        auto& module = operation.first;
2655
218
        auto& op = operation.second;
2656
2657
218
        if ( i > 0 ) {
2658
154
            auto& prevModule = operations[i-1].first;
2659
154
            auto& prevOp = operations[i].second;
2660
2661
154
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
82
                auto& curModifier = op.modifier.GetVectorPtr();
2663
82
                if ( curModifier.size() == 0 ) {
2664
26.1k
                    for (size_t j = 0; j < 512; j++) {
2665
26.1k
                        curModifier.push_back(1);
2666
26.1k
                    }
2667
51
                } else {
2668
290
                    for (auto& c : curModifier) {
2669
290
                        c++;
2670
290
                    }
2671
31
                }
2672
82
            }
2673
154
        }
2674
2675
218
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
218
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
218
        const auto& result = results.back();
2682
2683
218
        if ( result.second != std::nullopt ) {
2684
35
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
35
        }
2691
2692
218
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
218
        if ( options.disableTests == false ) {
2701
218
            tests::test(op, result.second);
2702
218
        }
2703
2704
218
        postprocess(module, op, result);
2705
218
    }
2706
2707
175
    if ( options.noCompare == false ) {
2708
64
        compare(operations, results, data, size);
2709
64
    }
2710
175
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
168
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
168
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
168
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.53k
    do {
2596
1.53k
        auto op = getOp(&parentDs, data, size);
2597
1.53k
        auto module = getModule(parentDs);
2598
1.53k
        if ( module == nullptr ) {
2599
1.29k
            continue;
2600
1.29k
        }
2601
2602
235
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
235
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
1.52k
    } while ( parentDs.Get<bool>() == true );
2609
2610
168
    if ( operations.empty() == true ) {
2611
17
        return;
2612
17
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
151
#if 1
2616
151
    {
2617
151
        std::set<uint64_t> moduleIDs;
2618
151
        for (const auto& m : modules ) {
2619
130
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
130
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
130
            moduleIDs.insert(moduleID);
2627
130
        }
2628
2629
151
        std::set<uint64_t> operationModuleIDs;
2630
165
        for (const auto& op : operations) {
2631
165
            operationModuleIDs.insert(op.first->ID);
2632
165
        }
2633
2634
151
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
151
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
151
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
151
        for (const auto& id : addModuleIDs) {
2639
53
            operations.push_back({ modules.at(id), operations[0].second});
2640
53
        }
2641
151
    }
2642
151
#endif
2643
2644
151
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
151
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
369
    for (size_t i = 0; i < operations.size(); i++) {
2652
218
        auto& operation = operations[i];
2653
2654
218
        auto& module = operation.first;
2655
218
        auto& op = operation.second;
2656
2657
218
        if ( i > 0 ) {
2658
153
            auto& prevModule = operations[i-1].first;
2659
153
            auto& prevOp = operations[i].second;
2660
2661
153
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
81
                auto& curModifier = op.modifier.GetVectorPtr();
2663
81
                if ( curModifier.size() == 0 ) {
2664
25.6k
                    for (size_t j = 0; j < 512; j++) {
2665
25.6k
                        curModifier.push_back(1);
2666
25.6k
                    }
2667
50
                } else {
2668
513
                    for (auto& c : curModifier) {
2669
513
                        c++;
2670
513
                    }
2671
31
                }
2672
81
            }
2673
153
        }
2674
2675
218
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
218
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
218
        const auto& result = results.back();
2682
2683
218
        if ( result.second != std::nullopt ) {
2684
25
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
25
        }
2691
2692
218
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
218
        if ( options.disableTests == false ) {
2701
218
            tests::test(op, result.second);
2702
218
        }
2703
2704
218
        postprocess(module, op, result);
2705
218
    }
2706
2707
151
    if ( options.noCompare == false ) {
2708
65
        compare(operations, results, data, size);
2709
65
    }
2710
151
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
195
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
195
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
195
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.53k
    do {
2596
2.53k
        auto op = getOp(&parentDs, data, size);
2597
2.53k
        auto module = getModule(parentDs);
2598
2.53k
        if ( module == nullptr ) {
2599
2.25k
            continue;
2600
2.25k
        }
2601
2602
284
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
284
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
9
            break;
2607
9
        }
2608
2.52k
    } while ( parentDs.Get<bool>() == true );
2609
2610
195
    if ( operations.empty() == true ) {
2611
18
        return;
2612
18
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
177
#if 1
2616
177
    {
2617
177
        std::set<uint64_t> moduleIDs;
2618
177
        for (const auto& m : modules ) {
2619
156
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
156
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
156
            moduleIDs.insert(moduleID);
2627
156
        }
2628
2629
177
        std::set<uint64_t> operationModuleIDs;
2630
198
        for (const auto& op : operations) {
2631
198
            operationModuleIDs.insert(op.first->ID);
2632
198
        }
2633
2634
177
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
177
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
177
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
177
        for (const auto& id : addModuleIDs) {
2639
67
            operations.push_back({ modules.at(id), operations[0].second});
2640
67
        }
2641
177
    }
2642
177
#endif
2643
2644
177
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
177
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
442
    for (size_t i = 0; i < operations.size(); i++) {
2652
265
        auto& operation = operations[i];
2653
2654
265
        auto& module = operation.first;
2655
265
        auto& op = operation.second;
2656
2657
265
        if ( i > 0 ) {
2658
187
            auto& prevModule = operations[i-1].first;
2659
187
            auto& prevOp = operations[i].second;
2660
2661
187
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
103
                auto& curModifier = op.modifier.GetVectorPtr();
2663
103
                if ( curModifier.size() == 0 ) {
2664
31.2k
                    for (size_t j = 0; j < 512; j++) {
2665
31.2k
                        curModifier.push_back(1);
2666
31.2k
                    }
2667
61
                } else {
2668
310
                    for (auto& c : curModifier) {
2669
310
                        c++;
2670
310
                    }
2671
42
                }
2672
103
            }
2673
187
        }
2674
2675
265
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
265
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
265
        const auto& result = results.back();
2682
2683
265
        if ( result.second != std::nullopt ) {
2684
15
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
15
        }
2691
2692
265
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
265
        if ( options.disableTests == false ) {
2701
265
            tests::test(op, result.second);
2702
265
        }
2703
2704
265
        postprocess(module, op, result);
2705
265
    }
2706
2707
177
    if ( options.noCompare == false ) {
2708
78
        compare(operations, results, data, size);
2709
78
    }
2710
177
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
180
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
180
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
180
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.56k
    do {
2596
2.56k
        auto op = getOp(&parentDs, data, size);
2597
2.56k
        auto module = getModule(parentDs);
2598
2.56k
        if ( module == nullptr ) {
2599
2.35k
            continue;
2600
2.35k
        }
2601
2602
213
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
213
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
10
            break;
2607
10
        }
2608
2.55k
    } while ( parentDs.Get<bool>() == true );
2609
2610
180
    if ( operations.empty() == true ) {
2611
11
        return;
2612
11
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
169
#if 1
2616
169
    {
2617
169
        std::set<uint64_t> moduleIDs;
2618
169
        for (const auto& m : modules ) {
2619
98
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
98
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
98
            moduleIDs.insert(moduleID);
2627
98
        }
2628
2629
169
        std::set<uint64_t> operationModuleIDs;
2630
169
        for (const auto& op : operations) {
2631
139
            operationModuleIDs.insert(op.first->ID);
2632
139
        }
2633
2634
169
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
169
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
169
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
169
        for (const auto& id : addModuleIDs) {
2639
36
            operations.push_back({ modules.at(id), operations[0].second});
2640
36
        }
2641
169
    }
2642
169
#endif
2643
2644
169
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
169
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
344
    for (size_t i = 0; i < operations.size(); i++) {
2652
175
        auto& operation = operations[i];
2653
2654
175
        auto& module = operation.first;
2655
175
        auto& op = operation.second;
2656
2657
175
        if ( i > 0 ) {
2658
126
            auto& prevModule = operations[i-1].first;
2659
126
            auto& prevOp = operations[i].second;
2660
2661
126
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
71
                auto& curModifier = op.modifier.GetVectorPtr();
2663
71
                if ( curModifier.size() == 0 ) {
2664
15.3k
                    for (size_t j = 0; j < 512; j++) {
2665
15.3k
                        curModifier.push_back(1);
2666
15.3k
                    }
2667
41
                } else {
2668
275
                    for (auto& c : curModifier) {
2669
275
                        c++;
2670
275
                    }
2671
41
                }
2672
71
            }
2673
126
        }
2674
2675
175
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
175
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
175
        const auto& result = results.back();
2682
2683
175
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
175
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
175
        if ( options.disableTests == false ) {
2701
175
            tests::test(op, result.second);
2702
175
        }
2703
2704
175
        postprocess(module, op, result);
2705
175
    }
2706
2707
169
    if ( options.noCompare == false ) {
2708
49
        compare(operations, results, data, size);
2709
49
    }
2710
169
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
310
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
310
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
310
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.86k
    do {
2596
2.86k
        auto op = getOp(&parentDs, data, size);
2597
2.86k
        auto module = getModule(parentDs);
2598
2.86k
        if ( module == nullptr ) {
2599
2.36k
            continue;
2600
2.36k
        }
2601
2602
502
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
502
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
12
            break;
2607
12
        }
2608
2.85k
    } while ( parentDs.Get<bool>() == true );
2609
2610
310
    if ( operations.empty() == true ) {
2611
12
        return;
2612
12
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
298
#if 1
2616
298
    {
2617
298
        std::set<uint64_t> moduleIDs;
2618
412
        for (const auto& m : modules ) {
2619
412
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
412
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
412
            moduleIDs.insert(moduleID);
2627
412
        }
2628
2629
298
        std::set<uint64_t> operationModuleIDs;
2630
423
        for (const auto& op : operations) {
2631
423
            operationModuleIDs.insert(op.first->ID);
2632
423
        }
2633
2634
298
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
298
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
298
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
298
        for (const auto& id : addModuleIDs) {
2639
193
            operations.push_back({ modules.at(id), operations[0].second});
2640
193
        }
2641
298
    }
2642
298
#endif
2643
2644
298
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
298
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
914
    for (size_t i = 0; i < operations.size(); i++) {
2652
616
        auto& operation = operations[i];
2653
2654
616
        auto& module = operation.first;
2655
616
        auto& op = operation.second;
2656
2657
616
        if ( i > 0 ) {
2658
410
            auto& prevModule = operations[i-1].first;
2659
410
            auto& prevOp = operations[i].second;
2660
2661
410
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
196
                auto& curModifier = op.modifier.GetVectorPtr();
2663
196
                if ( curModifier.size() == 0 ) {
2664
49.2k
                    for (size_t j = 0; j < 512; j++) {
2665
49.1k
                        curModifier.push_back(1);
2666
49.1k
                    }
2667
100
                } else {
2668
3.38k
                    for (auto& c : curModifier) {
2669
3.38k
                        c++;
2670
3.38k
                    }
2671
100
                }
2672
196
            }
2673
410
        }
2674
2675
616
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
616
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
616
        const auto& result = results.back();
2682
2683
616
        if ( result.second != std::nullopt ) {
2684
56
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
56
        }
2691
2692
616
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
616
        if ( options.disableTests == false ) {
2701
616
            tests::test(op, result.second);
2702
616
        }
2703
2704
616
        postprocess(module, op, result);
2705
616
    }
2706
2707
298
    if ( options.noCompare == false ) {
2708
206
        compare(operations, results, data, size);
2709
206
    }
2710
298
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
7.62k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
7.62k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
7.62k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
16.9k
    do {
2596
16.9k
        auto op = getOp(&parentDs, data, size);
2597
16.9k
        auto module = getModule(parentDs);
2598
16.9k
        if ( module == nullptr ) {
2599
6.72k
            continue;
2600
6.72k
        }
2601
2602
10.2k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
10.2k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
117
            break;
2607
117
        }
2608
16.8k
    } while ( parentDs.Get<bool>() == true );
2609
2610
7.62k
    if ( operations.empty() == true ) {
2611
57
        return;
2612
57
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
7.56k
#if 1
2616
7.56k
    {
2617
7.56k
        std::set<uint64_t> moduleIDs;
2618
14.6k
        for (const auto& m : modules ) {
2619
14.6k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
14.6k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
14.6k
            moduleIDs.insert(moduleID);
2627
14.6k
        }
2628
2629
7.56k
        std::set<uint64_t> operationModuleIDs;
2630
9.94k
        for (const auto& op : operations) {
2631
9.94k
            operationModuleIDs.insert(op.first->ID);
2632
9.94k
        }
2633
2634
7.56k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
7.56k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
7.56k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
7.56k
        for (const auto& id : addModuleIDs) {
2639
7.28k
            operations.push_back({ modules.at(id), operations[0].second});
2640
7.28k
        }
2641
7.56k
    }
2642
7.56k
#endif
2643
2644
7.56k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
7.56k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
24.7k
    for (size_t i = 0; i < operations.size(); i++) {
2652
17.2k
        auto& operation = operations[i];
2653
2654
17.2k
        auto& module = operation.first;
2655
17.2k
        auto& op = operation.second;
2656
2657
17.2k
        if ( i > 0 ) {
2658
9.91k
            auto& prevModule = operations[i-1].first;
2659
9.91k
            auto& prevOp = operations[i].second;
2660
2661
9.91k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
2.59k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
2.59k
                if ( curModifier.size() == 0 ) {
2664
685k
                    for (size_t j = 0; j < 512; j++) {
2665
684k
                        curModifier.push_back(1);
2666
684k
                    }
2667
1.33k
                } else {
2668
60.8k
                    for (auto& c : curModifier) {
2669
60.8k
                        c++;
2670
60.8k
                    }
2671
1.25k
                }
2672
2.59k
            }
2673
9.91k
        }
2674
2675
17.2k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
17.2k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
17.2k
        const auto& result = results.back();
2682
2683
17.2k
        if ( result.second != std::nullopt ) {
2684
4.12k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
4.12k
        }
2691
2692
17.2k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
17.2k
        if ( options.disableTests == false ) {
2701
17.2k
            tests::test(op, result.second);
2702
17.2k
        }
2703
2704
17.2k
        postprocess(module, op, result);
2705
17.2k
    }
2706
2707
7.56k
    if ( options.noCompare == false ) {
2708
7.31k
        compare(operations, results, data, size);
2709
7.31k
    }
2710
7.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
128
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
128
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
128
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.21k
    do {
2596
2.21k
        auto op = getOp(&parentDs, data, size);
2597
2.21k
        auto module = getModule(parentDs);
2598
2.21k
        if ( module == nullptr ) {
2599
1.97k
            continue;
2600
1.97k
        }
2601
2602
239
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
239
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.20k
    } while ( parentDs.Get<bool>() == true );
2609
2610
128
    if ( operations.empty() == true ) {
2611
7
        return;
2612
7
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
121
#if 1
2616
121
    {
2617
121
        std::set<uint64_t> moduleIDs;
2618
138
        for (const auto& m : modules ) {
2619
138
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
138
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
138
            moduleIDs.insert(moduleID);
2627
138
        }
2628
2629
121
        std::set<uint64_t> operationModuleIDs;
2630
162
        for (const auto& op : operations) {
2631
162
            operationModuleIDs.insert(op.first->ID);
2632
162
        }
2633
2634
121
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
121
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
121
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
121
        for (const auto& id : addModuleIDs) {
2639
56
            operations.push_back({ modules.at(id), operations[0].second});
2640
56
        }
2641
121
    }
2642
121
#endif
2643
2644
121
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
121
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
339
    for (size_t i = 0; i < operations.size(); i++) {
2652
218
        auto& operation = operations[i];
2653
2654
218
        auto& module = operation.first;
2655
218
        auto& op = operation.second;
2656
2657
218
        if ( i > 0 ) {
2658
149
            auto& prevModule = operations[i-1].first;
2659
149
            auto& prevOp = operations[i].second;
2660
2661
149
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
71
                auto& curModifier = op.modifier.GetVectorPtr();
2663
71
                if ( curModifier.size() == 0 ) {
2664
17.4k
                    for (size_t j = 0; j < 512; j++) {
2665
17.4k
                        curModifier.push_back(1);
2666
17.4k
                    }
2667
37
                } else {
2668
1.07k
                    for (auto& c : curModifier) {
2669
1.07k
                        c++;
2670
1.07k
                    }
2671
37
                }
2672
71
            }
2673
149
        }
2674
2675
218
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
218
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
218
        const auto& result = results.back();
2682
2683
218
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
218
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
218
        if ( options.disableTests == false ) {
2701
218
            tests::test(op, result.second);
2702
218
        }
2703
2704
218
        postprocess(module, op, result);
2705
218
    }
2706
2707
121
    if ( options.noCompare == false ) {
2708
69
        compare(operations, results, data, size);
2709
69
    }
2710
121
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
310
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
310
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
310
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.68k
    do {
2596
2.68k
        auto op = getOp(&parentDs, data, size);
2597
2.68k
        auto module = getModule(parentDs);
2598
2.68k
        if ( module == nullptr ) {
2599
2.06k
            continue;
2600
2.06k
        }
2601
2602
622
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
622
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
40
            break;
2607
40
        }
2608
2.64k
    } while ( parentDs.Get<bool>() == true );
2609
2610
310
    if ( operations.empty() == true ) {
2611
1
        return;
2612
1
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
309
#if 1
2616
309
    {
2617
309
        std::set<uint64_t> moduleIDs;
2618
454
        for (const auto& m : modules ) {
2619
454
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
454
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
454
            moduleIDs.insert(moduleID);
2627
454
        }
2628
2629
309
        std::set<uint64_t> operationModuleIDs;
2630
513
        for (const auto& op : operations) {
2631
513
            operationModuleIDs.insert(op.first->ID);
2632
513
        }
2633
2634
309
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
309
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
309
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
309
        for (const auto& id : addModuleIDs) {
2639
215
            operations.push_back({ modules.at(id), operations[0].second});
2640
215
        }
2641
309
    }
2642
309
#endif
2643
2644
309
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
309
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.03k
    for (size_t i = 0; i < operations.size(); i++) {
2652
728
        auto& operation = operations[i];
2653
2654
728
        auto& module = operation.first;
2655
728
        auto& op = operation.second;
2656
2657
728
        if ( i > 0 ) {
2658
501
            auto& prevModule = operations[i-1].first;
2659
501
            auto& prevOp = operations[i].second;
2660
2661
501
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
261
                auto& curModifier = op.modifier.GetVectorPtr();
2663
261
                if ( curModifier.size() == 0 ) {
2664
103k
                    for (size_t j = 0; j < 512; j++) {
2665
102k
                        curModifier.push_back(1);
2666
102k
                    }
2667
201
                } else {
2668
700
                    for (auto& c : curModifier) {
2669
700
                        c++;
2670
700
                    }
2671
60
                }
2672
261
            }
2673
501
        }
2674
2675
728
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
728
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
728
        const auto& result = results.back();
2682
2683
728
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
728
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
728
        if ( options.disableTests == false ) {
2701
728
            tests::test(op, result.second);
2702
728
        }
2703
2704
728
        postprocess(module, op, result);
2705
728
    }
2706
2707
309
    if ( options.noCompare == false ) {
2708
227
        compare(operations, results, data, size);
2709
227
    }
2710
309
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
162
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
162
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
162
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.55k
    do {
2596
1.55k
        auto op = getOp(&parentDs, data, size);
2597
1.55k
        auto module = getModule(parentDs);
2598
1.55k
        if ( module == nullptr ) {
2599
1.37k
            continue;
2600
1.37k
        }
2601
2602
186
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
186
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
1.54k
    } while ( parentDs.Get<bool>() == true );
2609
2610
162
    if ( operations.empty() == true ) {
2611
22
        return;
2612
22
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
140
#if 1
2616
140
    {
2617
140
        std::set<uint64_t> moduleIDs;
2618
140
        for (const auto& m : modules ) {
2619
86
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
86
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
86
            moduleIDs.insert(moduleID);
2627
86
        }
2628
2629
140
        std::set<uint64_t> operationModuleIDs;
2630
140
        for (const auto& op : operations) {
2631
118
            operationModuleIDs.insert(op.first->ID);
2632
118
        }
2633
2634
140
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
140
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
140
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
140
        for (const auto& id : addModuleIDs) {
2639
32
            operations.push_back({ modules.at(id), operations[0].second});
2640
32
        }
2641
140
    }
2642
140
#endif
2643
2644
140
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
140
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
290
    for (size_t i = 0; i < operations.size(); i++) {
2652
150
        auto& operation = operations[i];
2653
2654
150
        auto& module = operation.first;
2655
150
        auto& op = operation.second;
2656
2657
150
        if ( i > 0 ) {
2658
107
            auto& prevModule = operations[i-1].first;
2659
107
            auto& prevOp = operations[i].second;
2660
2661
107
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
58
                auto& curModifier = op.modifier.GetVectorPtr();
2663
58
                if ( curModifier.size() == 0 ) {
2664
14.8k
                    for (size_t j = 0; j < 512; j++) {
2665
14.8k
                        curModifier.push_back(1);
2666
14.8k
                    }
2667
29
                } else {
2668
506
                    for (auto& c : curModifier) {
2669
506
                        c++;
2670
506
                    }
2671
29
                }
2672
58
            }
2673
107
        }
2674
2675
150
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
150
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
150
        const auto& result = results.back();
2682
2683
150
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
150
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
150
        if ( options.disableTests == false ) {
2701
150
            tests::test(op, result.second);
2702
150
        }
2703
2704
150
        postprocess(module, op, result);
2705
150
    }
2706
2707
140
    if ( options.noCompare == false ) {
2708
43
        compare(operations, results, data, size);
2709
43
    }
2710
140
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
143
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
143
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
143
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.60k
    do {
2596
1.60k
        auto op = getOp(&parentDs, data, size);
2597
1.60k
        auto module = getModule(parentDs);
2598
1.60k
        if ( module == nullptr ) {
2599
1.39k
            continue;
2600
1.39k
        }
2601
2602
211
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
211
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
1.60k
    } while ( parentDs.Get<bool>() == true );
2609
2610
143
    if ( operations.empty() == true ) {
2611
16
        return;
2612
16
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
127
#if 1
2616
127
    {
2617
127
        std::set<uint64_t> moduleIDs;
2618
127
        for (const auto& m : modules ) {
2619
88
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
88
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
88
            moduleIDs.insert(moduleID);
2627
88
        }
2628
2629
127
        std::set<uint64_t> operationModuleIDs;
2630
127
        for (const auto& op : operations) {
2631
115
            operationModuleIDs.insert(op.first->ID);
2632
115
        }
2633
2634
127
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
127
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
127
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
127
        for (const auto& id : addModuleIDs) {
2639
32
            operations.push_back({ modules.at(id), operations[0].second});
2640
32
        }
2641
127
    }
2642
127
#endif
2643
2644
127
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
127
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
274
    for (size_t i = 0; i < operations.size(); i++) {
2652
147
        auto& operation = operations[i];
2653
2654
147
        auto& module = operation.first;
2655
147
        auto& op = operation.second;
2656
2657
147
        if ( i > 0 ) {
2658
103
            auto& prevModule = operations[i-1].first;
2659
103
            auto& prevOp = operations[i].second;
2660
2661
103
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
52
                auto& curModifier = op.modifier.GetVectorPtr();
2663
52
                if ( curModifier.size() == 0 ) {
2664
11.2k
                    for (size_t j = 0; j < 512; j++) {
2665
11.2k
                        curModifier.push_back(1);
2666
11.2k
                    }
2667
30
                } else {
2668
401
                    for (auto& c : curModifier) {
2669
401
                        c++;
2670
401
                    }
2671
30
                }
2672
52
            }
2673
103
        }
2674
2675
147
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
147
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
147
        const auto& result = results.back();
2682
2683
147
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
147
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
147
        if ( options.disableTests == false ) {
2701
147
            tests::test(op, result.second);
2702
147
        }
2703
2704
147
        postprocess(module, op, result);
2705
147
    }
2706
2707
127
    if ( options.noCompare == false ) {
2708
44
        compare(operations, results, data, size);
2709
44
    }
2710
127
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
109
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
109
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
109
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.40k
    do {
2596
2.40k
        auto op = getOp(&parentDs, data, size);
2597
2.40k
        auto module = getModule(parentDs);
2598
2.40k
        if ( module == nullptr ) {
2599
2.19k
            continue;
2600
2.19k
        }
2601
2602
216
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
216
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
5
            break;
2607
5
        }
2608
2.40k
    } while ( parentDs.Get<bool>() == true );
2609
2610
109
    if ( operations.empty() == true ) {
2611
2
        return;
2612
2
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
107
#if 1
2616
107
    {
2617
107
        std::set<uint64_t> moduleIDs;
2618
107
        for (const auto& m : modules ) {
2619
92
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
92
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
92
            moduleIDs.insert(moduleID);
2627
92
        }
2628
2629
107
        std::set<uint64_t> operationModuleIDs;
2630
120
        for (const auto& op : operations) {
2631
120
            operationModuleIDs.insert(op.first->ID);
2632
120
        }
2633
2634
107
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
107
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
107
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
107
        for (const auto& id : addModuleIDs) {
2639
35
            operations.push_back({ modules.at(id), operations[0].second});
2640
35
        }
2641
107
    }
2642
107
#endif
2643
2644
107
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
107
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
262
    for (size_t i = 0; i < operations.size(); i++) {
2652
155
        auto& operation = operations[i];
2653
2654
155
        auto& module = operation.first;
2655
155
        auto& op = operation.second;
2656
2657
155
        if ( i > 0 ) {
2658
109
            auto& prevModule = operations[i-1].first;
2659
109
            auto& prevOp = operations[i].second;
2660
2661
109
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
57
                auto& curModifier = op.modifier.GetVectorPtr();
2663
57
                if ( curModifier.size() == 0 ) {
2664
14.8k
                    for (size_t j = 0; j < 512; j++) {
2665
14.8k
                        curModifier.push_back(1);
2666
14.8k
                    }
2667
29
                } else {
2668
245
                    for (auto& c : curModifier) {
2669
245
                        c++;
2670
245
                    }
2671
28
                }
2672
57
            }
2673
109
        }
2674
2675
155
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
155
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
155
        const auto& result = results.back();
2682
2683
155
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
155
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
155
        if ( options.disableTests == false ) {
2701
155
            tests::test(op, result.second);
2702
155
        }
2703
2704
155
        postprocess(module, op, result);
2705
155
    }
2706
2707
107
    if ( options.noCompare == false ) {
2708
46
        compare(operations, results, data, size);
2709
46
    }
2710
107
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
121
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
121
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
121
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.35k
    do {
2596
2.35k
        auto op = getOp(&parentDs, data, size);
2597
2.35k
        auto module = getModule(parentDs);
2598
2.35k
        if ( module == nullptr ) {
2599
2.13k
            continue;
2600
2.13k
        }
2601
2602
211
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
211
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
2.34k
    } while ( parentDs.Get<bool>() == true );
2609
2610
121
    if ( operations.empty() == true ) {
2611
9
        return;
2612
9
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
112
#if 1
2616
112
    {
2617
112
        std::set<uint64_t> moduleIDs;
2618
112
        for (const auto& m : modules ) {
2619
92
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
92
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
92
            moduleIDs.insert(moduleID);
2627
92
        }
2628
2629
112
        std::set<uint64_t> operationModuleIDs;
2630
131
        for (const auto& op : operations) {
2631
131
            operationModuleIDs.insert(op.first->ID);
2632
131
        }
2633
2634
112
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
112
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
112
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
112
        for (const auto& id : addModuleIDs) {
2639
33
            operations.push_back({ modules.at(id), operations[0].second});
2640
33
        }
2641
112
    }
2642
112
#endif
2643
2644
112
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
112
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
276
    for (size_t i = 0; i < operations.size(); i++) {
2652
164
        auto& operation = operations[i];
2653
2654
164
        auto& module = operation.first;
2655
164
        auto& op = operation.second;
2656
2657
164
        if ( i > 0 ) {
2658
118
            auto& prevModule = operations[i-1].first;
2659
118
            auto& prevOp = operations[i].second;
2660
2661
118
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
65
                auto& curModifier = op.modifier.GetVectorPtr();
2663
65
                if ( curModifier.size() == 0 ) {
2664
10.7k
                    for (size_t j = 0; j < 512; j++) {
2665
10.7k
                        curModifier.push_back(1);
2666
10.7k
                    }
2667
44
                } else {
2668
421
                    for (auto& c : curModifier) {
2669
421
                        c++;
2670
421
                    }
2671
44
                }
2672
65
            }
2673
118
        }
2674
2675
164
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
164
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
164
        const auto& result = results.back();
2682
2683
164
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
164
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
164
        if ( options.disableTests == false ) {
2701
164
            tests::test(op, result.second);
2702
164
        }
2703
2704
164
        postprocess(module, op, result);
2705
164
    }
2706
2707
112
    if ( options.noCompare == false ) {
2708
46
        compare(operations, results, data, size);
2709
46
    }
2710
112
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
219
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
219
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
219
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.19k
    do {
2596
2.19k
        auto op = getOp(&parentDs, data, size);
2597
2.19k
        auto module = getModule(parentDs);
2598
2.19k
        if ( module == nullptr ) {
2599
1.91k
            continue;
2600
1.91k
        }
2601
2602
282
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
282
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
2.18k
    } while ( parentDs.Get<bool>() == true );
2609
2610
219
    if ( operations.empty() == true ) {
2611
12
        return;
2612
12
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
207
#if 1
2616
207
    {
2617
207
        std::set<uint64_t> moduleIDs;
2618
207
        for (const auto& m : modules ) {
2619
88
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
88
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
88
            moduleIDs.insert(moduleID);
2627
88
        }
2628
2629
207
        std::set<uint64_t> operationModuleIDs;
2630
207
        for (const auto& op : operations) {
2631
117
            operationModuleIDs.insert(op.first->ID);
2632
117
        }
2633
2634
207
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
207
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
207
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
207
        for (const auto& id : addModuleIDs) {
2639
34
            operations.push_back({ modules.at(id), operations[0].second});
2640
34
        }
2641
207
    }
2642
207
#endif
2643
2644
207
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
207
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
358
    for (size_t i = 0; i < operations.size(); i++) {
2652
151
        auto& operation = operations[i];
2653
2654
151
        auto& module = operation.first;
2655
151
        auto& op = operation.second;
2656
2657
151
        if ( i > 0 ) {
2658
107
            auto& prevModule = operations[i-1].first;
2659
107
            auto& prevOp = operations[i].second;
2660
2661
107
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
57
                auto& curModifier = op.modifier.GetVectorPtr();
2663
57
                if ( curModifier.size() == 0 ) {
2664
13.8k
                    for (size_t j = 0; j < 512; j++) {
2665
13.8k
                        curModifier.push_back(1);
2666
13.8k
                    }
2667
30
                } else {
2668
753
                    for (auto& c : curModifier) {
2669
753
                        c++;
2670
753
                    }
2671
30
                }
2672
57
            }
2673
107
        }
2674
2675
151
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
151
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
151
        const auto& result = results.back();
2682
2683
151
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
151
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
151
        if ( options.disableTests == false ) {
2701
151
            tests::test(op, result.second);
2702
151
        }
2703
2704
151
        postprocess(module, op, result);
2705
151
    }
2706
2707
207
    if ( options.noCompare == false ) {
2708
44
        compare(operations, results, data, size);
2709
44
    }
2710
207
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
250
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
250
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
250
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.11k
    do {
2596
2.11k
        auto op = getOp(&parentDs, data, size);
2597
2.11k
        auto module = getModule(parentDs);
2598
2.11k
        if ( module == nullptr ) {
2599
1.82k
            continue;
2600
1.82k
        }
2601
2602
292
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
292
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
2.10k
    } while ( parentDs.Get<bool>() == true );
2609
2610
250
    if ( operations.empty() == true ) {
2611
18
        return;
2612
18
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
232
#if 1
2616
232
    {
2617
232
        std::set<uint64_t> moduleIDs;
2618
232
        for (const auto& m : modules ) {
2619
90
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
90
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
90
            moduleIDs.insert(moduleID);
2627
90
        }
2628
2629
232
        std::set<uint64_t> operationModuleIDs;
2630
232
        for (const auto& op : operations) {
2631
125
            operationModuleIDs.insert(op.first->ID);
2632
125
        }
2633
2634
232
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
232
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
232
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
232
        for (const auto& id : addModuleIDs) {
2639
34
            operations.push_back({ modules.at(id), operations[0].second});
2640
34
        }
2641
232
    }
2642
232
#endif
2643
2644
232
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
232
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
391
    for (size_t i = 0; i < operations.size(); i++) {
2652
159
        auto& operation = operations[i];
2653
2654
159
        auto& module = operation.first;
2655
159
        auto& op = operation.second;
2656
2657
159
        if ( i > 0 ) {
2658
114
            auto& prevModule = operations[i-1].first;
2659
114
            auto& prevOp = operations[i].second;
2660
2661
114
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
63
                auto& curModifier = op.modifier.GetVectorPtr();
2663
63
                if ( curModifier.size() == 0 ) {
2664
14.3k
                    for (size_t j = 0; j < 512; j++) {
2665
14.3k
                        curModifier.push_back(1);
2666
14.3k
                    }
2667
35
                } else {
2668
901
                    for (auto& c : curModifier) {
2669
901
                        c++;
2670
901
                    }
2671
35
                }
2672
63
            }
2673
114
        }
2674
2675
159
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
159
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
159
        const auto& result = results.back();
2682
2683
159
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
159
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
159
        if ( options.disableTests == false ) {
2701
159
            tests::test(op, result.second);
2702
159
        }
2703
2704
159
        postprocess(module, op, result);
2705
159
    }
2706
2707
232
    if ( options.noCompare == false ) {
2708
45
        compare(operations, results, data, size);
2709
45
    }
2710
232
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
182
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
182
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
182
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.98k
    do {
2596
1.98k
        auto op = getOp(&parentDs, data, size);
2597
1.98k
        auto module = getModule(parentDs);
2598
1.98k
        if ( module == nullptr ) {
2599
1.73k
            continue;
2600
1.73k
        }
2601
2602
246
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
246
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
1.97k
    } while ( parentDs.Get<bool>() == true );
2609
2610
182
    if ( operations.empty() == true ) {
2611
3
        return;
2612
3
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
179
#if 1
2616
179
    {
2617
179
        std::set<uint64_t> moduleIDs;
2618
179
        for (const auto& m : modules ) {
2619
88
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
88
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
88
            moduleIDs.insert(moduleID);
2627
88
        }
2628
2629
179
        std::set<uint64_t> operationModuleIDs;
2630
179
        for (const auto& op : operations) {
2631
119
            operationModuleIDs.insert(op.first->ID);
2632
119
        }
2633
2634
179
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
179
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
179
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
179
        for (const auto& id : addModuleIDs) {
2639
33
            operations.push_back({ modules.at(id), operations[0].second});
2640
33
        }
2641
179
    }
2642
179
#endif
2643
2644
179
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
179
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
331
    for (size_t i = 0; i < operations.size(); i++) {
2652
152
        auto& operation = operations[i];
2653
2654
152
        auto& module = operation.first;
2655
152
        auto& op = operation.second;
2656
2657
152
        if ( i > 0 ) {
2658
108
            auto& prevModule = operations[i-1].first;
2659
108
            auto& prevOp = operations[i].second;
2660
2661
108
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
58
                auto& curModifier = op.modifier.GetVectorPtr();
2663
58
                if ( curModifier.size() == 0 ) {
2664
13.8k
                    for (size_t j = 0; j < 512; j++) {
2665
13.8k
                        curModifier.push_back(1);
2666
13.8k
                    }
2667
31
                } else {
2668
519
                    for (auto& c : curModifier) {
2669
519
                        c++;
2670
519
                    }
2671
31
                }
2672
58
            }
2673
108
        }
2674
2675
152
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
152
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
152
        const auto& result = results.back();
2682
2683
152
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
152
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
152
        if ( options.disableTests == false ) {
2701
152
            tests::test(op, result.second);
2702
152
        }
2703
2704
152
        postprocess(module, op, result);
2705
152
    }
2706
2707
179
    if ( options.noCompare == false ) {
2708
44
        compare(operations, results, data, size);
2709
44
    }
2710
179
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
176
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
176
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
176
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.17k
    do {
2596
2.17k
        auto op = getOp(&parentDs, data, size);
2597
2.17k
        auto module = getModule(parentDs);
2598
2.17k
        if ( module == nullptr ) {
2599
1.95k
            continue;
2600
1.95k
        }
2601
2602
222
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
222
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
2.17k
    } while ( parentDs.Get<bool>() == true );
2609
2610
176
    if ( operations.empty() == true ) {
2611
12
        return;
2612
12
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
164
#if 1
2616
164
    {
2617
164
        std::set<uint64_t> moduleIDs;
2618
164
        for (const auto& m : modules ) {
2619
66
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
66
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
66
            moduleIDs.insert(moduleID);
2627
66
        }
2628
2629
164
        std::set<uint64_t> operationModuleIDs;
2630
164
        for (const auto& op : operations) {
2631
99
            operationModuleIDs.insert(op.first->ID);
2632
99
        }
2633
2634
164
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
164
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
164
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
164
        for (const auto& id : addModuleIDs) {
2639
22
            operations.push_back({ modules.at(id), operations[0].second});
2640
22
        }
2641
164
    }
2642
164
#endif
2643
2644
164
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
164
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
285
    for (size_t i = 0; i < operations.size(); i++) {
2652
121
        auto& operation = operations[i];
2653
2654
121
        auto& module = operation.first;
2655
121
        auto& op = operation.second;
2656
2657
121
        if ( i > 0 ) {
2658
88
            auto& prevModule = operations[i-1].first;
2659
88
            auto& prevOp = operations[i].second;
2660
2661
88
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
49
                auto& curModifier = op.modifier.GetVectorPtr();
2663
49
                if ( curModifier.size() == 0 ) {
2664
13.8k
                    for (size_t j = 0; j < 512; j++) {
2665
13.8k
                        curModifier.push_back(1);
2666
13.8k
                    }
2667
27
                } else {
2668
130
                    for (auto& c : curModifier) {
2669
130
                        c++;
2670
130
                    }
2671
22
                }
2672
49
            }
2673
88
        }
2674
2675
121
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
121
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
121
        const auto& result = results.back();
2682
2683
121
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
121
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
121
        if ( options.disableTests == false ) {
2701
121
            tests::test(op, result.second);
2702
121
        }
2703
2704
121
        postprocess(module, op, result);
2705
121
    }
2706
2707
164
    if ( options.noCompare == false ) {
2708
33
        compare(operations, results, data, size);
2709
33
    }
2710
164
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
116
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
116
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
116
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.12k
    do {
2596
2.12k
        auto op = getOp(&parentDs, data, size);
2597
2.12k
        auto module = getModule(parentDs);
2598
2.12k
        if ( module == nullptr ) {
2599
1.97k
            continue;
2600
1.97k
        }
2601
2602
155
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
155
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
2.12k
    } while ( parentDs.Get<bool>() == true );
2609
2610
116
    if ( operations.empty() == true ) {
2611
8
        return;
2612
8
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
108
#if 1
2616
108
    {
2617
108
        std::set<uint64_t> moduleIDs;
2618
108
        for (const auto& m : modules ) {
2619
54
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
54
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
54
            moduleIDs.insert(moduleID);
2627
54
        }
2628
2629
108
        std::set<uint64_t> operationModuleIDs;
2630
108
        for (const auto& op : operations) {
2631
84
            operationModuleIDs.insert(op.first->ID);
2632
84
        }
2633
2634
108
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
108
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
108
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
108
        for (const auto& id : addModuleIDs) {
2639
17
            operations.push_back({ modules.at(id), operations[0].second});
2640
17
        }
2641
108
    }
2642
108
#endif
2643
2644
108
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
108
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
209
    for (size_t i = 0; i < operations.size(); i++) {
2652
101
        auto& operation = operations[i];
2653
2654
101
        auto& module = operation.first;
2655
101
        auto& op = operation.second;
2656
2657
101
        if ( i > 0 ) {
2658
74
            auto& prevModule = operations[i-1].first;
2659
74
            auto& prevOp = operations[i].second;
2660
2661
74
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
41
                auto& curModifier = op.modifier.GetVectorPtr();
2663
41
                if ( curModifier.size() == 0 ) {
2664
8.72k
                    for (size_t j = 0; j < 512; j++) {
2665
8.70k
                        curModifier.push_back(1);
2666
8.70k
                    }
2667
24
                } else {
2668
400
                    for (auto& c : curModifier) {
2669
400
                        c++;
2670
400
                    }
2671
24
                }
2672
41
            }
2673
74
        }
2674
2675
101
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
101
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
101
        const auto& result = results.back();
2682
2683
101
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
101
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
101
        if ( options.disableTests == false ) {
2701
101
            tests::test(op, result.second);
2702
101
        }
2703
2704
101
        postprocess(module, op, result);
2705
101
    }
2706
2707
108
    if ( options.noCompare == false ) {
2708
27
        compare(operations, results, data, size);
2709
27
    }
2710
108
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
132
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
132
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
132
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.36k
    do {
2596
2.36k
        auto op = getOp(&parentDs, data, size);
2597
2.36k
        auto module = getModule(parentDs);
2598
2.36k
        if ( module == nullptr ) {
2599
2.15k
            continue;
2600
2.15k
        }
2601
2602
216
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
216
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.36k
    } while ( parentDs.Get<bool>() == true );
2609
2610
132
    if ( operations.empty() == true ) {
2611
5
        return;
2612
5
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
127
#if 1
2616
127
    {
2617
127
        std::set<uint64_t> moduleIDs;
2618
127
        for (const auto& m : modules ) {
2619
68
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
68
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
68
            moduleIDs.insert(moduleID);
2627
68
        }
2628
2629
127
        std::set<uint64_t> operationModuleIDs;
2630
127
        for (const auto& op : operations) {
2631
100
            operationModuleIDs.insert(op.first->ID);
2632
100
        }
2633
2634
127
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
127
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
127
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
127
        for (const auto& id : addModuleIDs) {
2639
21
            operations.push_back({ modules.at(id), operations[0].second});
2640
21
        }
2641
127
    }
2642
127
#endif
2643
2644
127
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
127
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
248
    for (size_t i = 0; i < operations.size(); i++) {
2652
121
        auto& operation = operations[i];
2653
2654
121
        auto& module = operation.first;
2655
121
        auto& op = operation.second;
2656
2657
121
        if ( i > 0 ) {
2658
87
            auto& prevModule = operations[i-1].first;
2659
87
            auto& prevOp = operations[i].second;
2660
2661
87
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
45
                auto& curModifier = op.modifier.GetVectorPtr();
2663
45
                if ( curModifier.size() == 0 ) {
2664
8.72k
                    for (size_t j = 0; j < 512; j++) {
2665
8.70k
                        curModifier.push_back(1);
2666
8.70k
                    }
2667
28
                } else {
2668
627
                    for (auto& c : curModifier) {
2669
627
                        c++;
2670
627
                    }
2671
28
                }
2672
45
            }
2673
87
        }
2674
2675
121
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
121
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
121
        const auto& result = results.back();
2682
2683
121
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
121
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
121
        if ( options.disableTests == false ) {
2701
121
            tests::test(op, result.second);
2702
121
        }
2703
2704
121
        postprocess(module, op, result);
2705
121
    }
2706
2707
127
    if ( options.noCompare == false ) {
2708
34
        compare(operations, results, data, size);
2709
34
    }
2710
127
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
128
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
128
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
128
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.05k
    do {
2596
2.05k
        auto op = getOp(&parentDs, data, size);
2597
2.05k
        auto module = getModule(parentDs);
2598
2.05k
        if ( module == nullptr ) {
2599
1.83k
            continue;
2600
1.83k
        }
2601
2602
224
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
224
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.04k
    } while ( parentDs.Get<bool>() == true );
2609
2610
128
    if ( operations.empty() == true ) {
2611
3
        return;
2612
3
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
125
#if 1
2616
125
    {
2617
125
        std::set<uint64_t> moduleIDs;
2618
125
        for (const auto& m : modules ) {
2619
98
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
98
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
98
            moduleIDs.insert(moduleID);
2627
98
        }
2628
2629
125
        std::set<uint64_t> operationModuleIDs;
2630
136
        for (const auto& op : operations) {
2631
136
            operationModuleIDs.insert(op.first->ID);
2632
136
        }
2633
2634
125
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
125
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
125
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
125
        for (const auto& id : addModuleIDs) {
2639
38
            operations.push_back({ modules.at(id), operations[0].second});
2640
38
        }
2641
125
    }
2642
125
#endif
2643
2644
125
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
125
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
299
    for (size_t i = 0; i < operations.size(); i++) {
2652
174
        auto& operation = operations[i];
2653
2654
174
        auto& module = operation.first;
2655
174
        auto& op = operation.second;
2656
2657
174
        if ( i > 0 ) {
2658
125
            auto& prevModule = operations[i-1].first;
2659
125
            auto& prevOp = operations[i].second;
2660
2661
125
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
70
                auto& curModifier = op.modifier.GetVectorPtr();
2663
70
                if ( curModifier.size() == 0 ) {
2664
20.5k
                    for (size_t j = 0; j < 512; j++) {
2665
20.4k
                        curModifier.push_back(1);
2666
20.4k
                    }
2667
40
                } else {
2668
264
                    for (auto& c : curModifier) {
2669
264
                        c++;
2670
264
                    }
2671
30
                }
2672
70
            }
2673
125
        }
2674
2675
174
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
174
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
174
        const auto& result = results.back();
2682
2683
174
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
174
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
174
        if ( options.disableTests == false ) {
2701
174
            tests::test(op, result.second);
2702
174
        }
2703
2704
174
        postprocess(module, op, result);
2705
174
    }
2706
2707
125
    if ( options.noCompare == false ) {
2708
49
        compare(operations, results, data, size);
2709
49
    }
2710
125
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
145
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
145
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
145
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.27k
    do {
2596
2.27k
        auto op = getOp(&parentDs, data, size);
2597
2.27k
        auto module = getModule(parentDs);
2598
2.27k
        if ( module == nullptr ) {
2599
2.08k
            continue;
2600
2.08k
        }
2601
2602
194
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
194
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
2.27k
    } while ( parentDs.Get<bool>() == true );
2609
2610
145
    if ( operations.empty() == true ) {
2611
13
        return;
2612
13
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
132
#if 1
2616
132
    {
2617
132
        std::set<uint64_t> moduleIDs;
2618
132
        for (const auto& m : modules ) {
2619
80
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
80
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
80
            moduleIDs.insert(moduleID);
2627
80
        }
2628
2629
132
        std::set<uint64_t> operationModuleIDs;
2630
132
        for (const auto& op : operations) {
2631
107
            operationModuleIDs.insert(op.first->ID);
2632
107
        }
2633
2634
132
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
132
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
132
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
132
        for (const auto& id : addModuleIDs) {
2639
27
            operations.push_back({ modules.at(id), operations[0].second});
2640
27
        }
2641
132
    }
2642
132
#endif
2643
2644
132
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
132
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
266
    for (size_t i = 0; i < operations.size(); i++) {
2652
134
        auto& operation = operations[i];
2653
2654
134
        auto& module = operation.first;
2655
134
        auto& op = operation.second;
2656
2657
134
        if ( i > 0 ) {
2658
94
            auto& prevModule = operations[i-1].first;
2659
94
            auto& prevOp = operations[i].second;
2660
2661
94
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
48
                auto& curModifier = op.modifier.GetVectorPtr();
2663
48
                if ( curModifier.size() == 0 ) {
2664
13.8k
                    for (size_t j = 0; j < 512; j++) {
2665
13.8k
                        curModifier.push_back(1);
2666
13.8k
                    }
2667
27
                } else {
2668
283
                    for (auto& c : curModifier) {
2669
283
                        c++;
2670
283
                    }
2671
21
                }
2672
48
            }
2673
94
        }
2674
2675
134
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
134
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
134
        const auto& result = results.back();
2682
2683
134
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
134
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
134
        if ( options.disableTests == false ) {
2701
134
            tests::test(op, result.second);
2702
134
        }
2703
2704
134
        postprocess(module, op, result);
2705
134
    }
2706
2707
132
    if ( options.noCompare == false ) {
2708
40
        compare(operations, results, data, size);
2709
40
    }
2710
132
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
153
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
153
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
153
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.93k
    do {
2596
2.93k
        auto op = getOp(&parentDs, data, size);
2597
2.93k
        auto module = getModule(parentDs);
2598
2.93k
        if ( module == nullptr ) {
2599
2.73k
            continue;
2600
2.73k
        }
2601
2602
208
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
208
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
2.93k
    } while ( parentDs.Get<bool>() == true );
2609
2610
153
    if ( operations.empty() == true ) {
2611
15
        return;
2612
15
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
138
#if 1
2616
138
    {
2617
138
        std::set<uint64_t> moduleIDs;
2618
138
        for (const auto& m : modules ) {
2619
80
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
80
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
80
            moduleIDs.insert(moduleID);
2627
80
        }
2628
2629
138
        std::set<uint64_t> operationModuleIDs;
2630
138
        for (const auto& op : operations) {
2631
102
            operationModuleIDs.insert(op.first->ID);
2632
102
        }
2633
2634
138
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
138
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
138
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
138
        for (const auto& id : addModuleIDs) {
2639
29
            operations.push_back({ modules.at(id), operations[0].second});
2640
29
        }
2641
138
    }
2642
138
#endif
2643
2644
138
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
138
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
269
    for (size_t i = 0; i < operations.size(); i++) {
2652
131
        auto& operation = operations[i];
2653
2654
131
        auto& module = operation.first;
2655
131
        auto& op = operation.second;
2656
2657
131
        if ( i > 0 ) {
2658
91
            auto& prevModule = operations[i-1].first;
2659
91
            auto& prevOp = operations[i].second;
2660
2661
91
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
43
                auto& curModifier = op.modifier.GetVectorPtr();
2663
43
                if ( curModifier.size() == 0 ) {
2664
10.7k
                    for (size_t j = 0; j < 512; j++) {
2665
10.7k
                        curModifier.push_back(1);
2666
10.7k
                    }
2667
22
                } else {
2668
284
                    for (auto& c : curModifier) {
2669
284
                        c++;
2670
284
                    }
2671
22
                }
2672
43
            }
2673
91
        }
2674
2675
131
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
131
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
131
        const auto& result = results.back();
2682
2683
131
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
131
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
131
        if ( options.disableTests == false ) {
2701
131
            tests::test(op, result.second);
2702
131
        }
2703
2704
131
        postprocess(module, op, result);
2705
131
    }
2706
2707
138
    if ( options.noCompare == false ) {
2708
40
        compare(operations, results, data, size);
2709
40
    }
2710
138
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
140
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
140
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
140
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.51k
    do {
2596
2.51k
        auto op = getOp(&parentDs, data, size);
2597
2.51k
        auto module = getModule(parentDs);
2598
2.51k
        if ( module == nullptr ) {
2599
2.31k
            continue;
2600
2.31k
        }
2601
2602
205
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
205
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
10
            break;
2607
10
        }
2608
2.50k
    } while ( parentDs.Get<bool>() == true );
2609
2610
140
    if ( operations.empty() == true ) {
2611
20
        return;
2612
20
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
120
#if 1
2616
120
    {
2617
120
        std::set<uint64_t> moduleIDs;
2618
120
        for (const auto& m : modules ) {
2619
84
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
84
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
84
            moduleIDs.insert(moduleID);
2627
84
        }
2628
2629
120
        std::set<uint64_t> operationModuleIDs;
2630
127
        for (const auto& op : operations) {
2631
127
            operationModuleIDs.insert(op.first->ID);
2632
127
        }
2633
2634
120
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
120
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
120
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
120
        for (const auto& id : addModuleIDs) {
2639
30
            operations.push_back({ modules.at(id), operations[0].second});
2640
30
        }
2641
120
    }
2642
120
#endif
2643
2644
120
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
120
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
277
    for (size_t i = 0; i < operations.size(); i++) {
2652
157
        auto& operation = operations[i];
2653
2654
157
        auto& module = operation.first;
2655
157
        auto& op = operation.second;
2656
2657
157
        if ( i > 0 ) {
2658
115
            auto& prevModule = operations[i-1].first;
2659
115
            auto& prevOp = operations[i].second;
2660
2661
115
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
67
                auto& curModifier = op.modifier.GetVectorPtr();
2663
67
                if ( curModifier.size() == 0 ) {
2664
17.4k
                    for (size_t j = 0; j < 512; j++) {
2665
17.4k
                        curModifier.push_back(1);
2666
17.4k
                    }
2667
34
                } else {
2668
418
                    for (auto& c : curModifier) {
2669
418
                        c++;
2670
418
                    }
2671
33
                }
2672
67
            }
2673
115
        }
2674
2675
157
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
157
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
157
        const auto& result = results.back();
2682
2683
157
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
157
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
157
        if ( options.disableTests == false ) {
2701
157
            tests::test(op, result.second);
2702
157
        }
2703
2704
157
        postprocess(module, op, result);
2705
157
    }
2706
2707
120
    if ( options.noCompare == false ) {
2708
42
        compare(operations, results, data, size);
2709
42
    }
2710
120
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
130
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
130
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
130
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.35k
    do {
2596
2.35k
        auto op = getOp(&parentDs, data, size);
2597
2.35k
        auto module = getModule(parentDs);
2598
2.35k
        if ( module == nullptr ) {
2599
2.14k
            continue;
2600
2.14k
        }
2601
2602
215
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
215
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.34k
    } while ( parentDs.Get<bool>() == true );
2609
2610
130
    if ( operations.empty() == true ) {
2611
8
        return;
2612
8
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
122
#if 1
2616
122
    {
2617
122
        std::set<uint64_t> moduleIDs;
2618
122
        for (const auto& m : modules ) {
2619
76
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
76
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
76
            moduleIDs.insert(moduleID);
2627
76
        }
2628
2629
122
        std::set<uint64_t> operationModuleIDs;
2630
122
        for (const auto& op : operations) {
2631
108
            operationModuleIDs.insert(op.first->ID);
2632
108
        }
2633
2634
122
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
122
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
122
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
122
        for (const auto& id : addModuleIDs) {
2639
27
            operations.push_back({ modules.at(id), operations[0].second});
2640
27
        }
2641
122
    }
2642
122
#endif
2643
2644
122
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
122
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
257
    for (size_t i = 0; i < operations.size(); i++) {
2652
135
        auto& operation = operations[i];
2653
2654
135
        auto& module = operation.first;
2655
135
        auto& op = operation.second;
2656
2657
135
        if ( i > 0 ) {
2658
97
            auto& prevModule = operations[i-1].first;
2659
97
            auto& prevOp = operations[i].second;
2660
2661
97
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
53
                auto& curModifier = op.modifier.GetVectorPtr();
2663
53
                if ( curModifier.size() == 0 ) {
2664
10.7k
                    for (size_t j = 0; j < 512; j++) {
2665
10.7k
                        curModifier.push_back(1);
2666
10.7k
                    }
2667
32
                } else {
2668
281
                    for (auto& c : curModifier) {
2669
281
                        c++;
2670
281
                    }
2671
32
                }
2672
53
            }
2673
97
        }
2674
2675
135
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
135
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
135
        const auto& result = results.back();
2682
2683
135
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
135
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
135
        if ( options.disableTests == false ) {
2701
135
            tests::test(op, result.second);
2702
135
        }
2703
2704
135
        postprocess(module, op, result);
2705
135
    }
2706
2707
122
    if ( options.noCompare == false ) {
2708
38
        compare(operations, results, data, size);
2709
38
    }
2710
122
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
126
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
126
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
126
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.67k
    do {
2596
1.67k
        auto op = getOp(&parentDs, data, size);
2597
1.67k
        auto module = getModule(parentDs);
2598
1.67k
        if ( module == nullptr ) {
2599
1.46k
            continue;
2600
1.46k
        }
2601
2602
211
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
211
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
1.66k
    } while ( parentDs.Get<bool>() == true );
2609
2610
126
    if ( operations.empty() == true ) {
2611
10
        return;
2612
10
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
116
#if 1
2616
116
    {
2617
116
        std::set<uint64_t> moduleIDs;
2618
116
        for (const auto& m : modules ) {
2619
78
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
78
            moduleIDs.insert(moduleID);
2627
78
        }
2628
2629
116
        std::set<uint64_t> operationModuleIDs;
2630
116
        for (const auto& op : operations) {
2631
108
            operationModuleIDs.insert(op.first->ID);
2632
108
        }
2633
2634
116
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
116
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
116
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
116
        for (const auto& id : addModuleIDs) {
2639
28
            operations.push_back({ modules.at(id), operations[0].second});
2640
28
        }
2641
116
    }
2642
116
#endif
2643
2644
116
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
116
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
252
    for (size_t i = 0; i < operations.size(); i++) {
2652
136
        auto& operation = operations[i];
2653
2654
136
        auto& module = operation.first;
2655
136
        auto& op = operation.second;
2656
2657
136
        if ( i > 0 ) {
2658
97
            auto& prevModule = operations[i-1].first;
2659
97
            auto& prevOp = operations[i].second;
2660
2661
97
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
52
                auto& curModifier = op.modifier.GetVectorPtr();
2663
52
                if ( curModifier.size() == 0 ) {
2664
10.2k
                    for (size_t j = 0; j < 512; j++) {
2665
10.2k
                        curModifier.push_back(1);
2666
10.2k
                    }
2667
32
                } else {
2668
869
                    for (auto& c : curModifier) {
2669
869
                        c++;
2670
869
                    }
2671
32
                }
2672
52
            }
2673
97
        }
2674
2675
136
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
136
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
136
        const auto& result = results.back();
2682
2683
136
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
136
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
136
        if ( options.disableTests == false ) {
2701
136
            tests::test(op, result.second);
2702
136
        }
2703
2704
136
        postprocess(module, op, result);
2705
136
    }
2706
2707
116
    if ( options.noCompare == false ) {
2708
39
        compare(operations, results, data, size);
2709
39
    }
2710
116
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
151
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
151
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
151
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.33k
    do {
2596
2.33k
        auto op = getOp(&parentDs, data, size);
2597
2.33k
        auto module = getModule(parentDs);
2598
2.33k
        if ( module == nullptr ) {
2599
2.09k
            continue;
2600
2.09k
        }
2601
2602
249
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
249
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.33k
    } while ( parentDs.Get<bool>() == true );
2609
2610
151
    if ( operations.empty() == true ) {
2611
8
        return;
2612
8
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
143
#if 1
2616
143
    {
2617
143
        std::set<uint64_t> moduleIDs;
2618
143
        for (const auto& m : modules ) {
2619
108
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
108
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
108
            moduleIDs.insert(moduleID);
2627
108
        }
2628
2629
143
        std::set<uint64_t> operationModuleIDs;
2630
143
        for (const auto& op : operations) {
2631
135
            operationModuleIDs.insert(op.first->ID);
2632
135
        }
2633
2634
143
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
143
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
143
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
143
        for (const auto& id : addModuleIDs) {
2639
42
            operations.push_back({ modules.at(id), operations[0].second});
2640
42
        }
2641
143
    }
2642
143
#endif
2643
2644
143
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
143
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
320
    for (size_t i = 0; i < operations.size(); i++) {
2652
177
        auto& operation = operations[i];
2653
2654
177
        auto& module = operation.first;
2655
177
        auto& op = operation.second;
2656
2657
177
        if ( i > 0 ) {
2658
123
            auto& prevModule = operations[i-1].first;
2659
123
            auto& prevOp = operations[i].second;
2660
2661
123
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
61
                auto& curModifier = op.modifier.GetVectorPtr();
2663
61
                if ( curModifier.size() == 0 ) {
2664
14.3k
                    for (size_t j = 0; j < 512; j++) {
2665
14.3k
                        curModifier.push_back(1);
2666
14.3k
                    }
2667
33
                } else {
2668
387
                    for (auto& c : curModifier) {
2669
387
                        c++;
2670
387
                    }
2671
33
                }
2672
61
            }
2673
123
        }
2674
2675
177
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
177
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
177
        const auto& result = results.back();
2682
2683
177
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
177
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
177
        if ( options.disableTests == false ) {
2701
177
            tests::test(op, result.second);
2702
177
        }
2703
2704
177
        postprocess(module, op, result);
2705
177
    }
2706
2707
143
    if ( options.noCompare == false ) {
2708
54
        compare(operations, results, data, size);
2709
54
    }
2710
143
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
181
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
181
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
181
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.45k
    do {
2596
2.45k
        auto op = getOp(&parentDs, data, size);
2597
2.45k
        auto module = getModule(parentDs);
2598
2.45k
        if ( module == nullptr ) {
2599
2.24k
            continue;
2600
2.24k
        }
2601
2602
203
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
203
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
2.44k
    } while ( parentDs.Get<bool>() == true );
2609
2610
181
    if ( operations.empty() == true ) {
2611
23
        return;
2612
23
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
158
#if 1
2616
158
    {
2617
158
        std::set<uint64_t> moduleIDs;
2618
158
        for (const auto& m : modules ) {
2619
76
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
76
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
76
            moduleIDs.insert(moduleID);
2627
76
        }
2628
2629
158
        std::set<uint64_t> operationModuleIDs;
2630
158
        for (const auto& op : operations) {
2631
106
            operationModuleIDs.insert(op.first->ID);
2632
106
        }
2633
2634
158
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
158
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
158
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
158
        for (const auto& id : addModuleIDs) {
2639
25
            operations.push_back({ modules.at(id), operations[0].second});
2640
25
        }
2641
158
    }
2642
158
#endif
2643
2644
158
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
158
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
289
    for (size_t i = 0; i < operations.size(); i++) {
2652
131
        auto& operation = operations[i];
2653
2654
131
        auto& module = operation.first;
2655
131
        auto& op = operation.second;
2656
2657
131
        if ( i > 0 ) {
2658
93
            auto& prevModule = operations[i-1].first;
2659
93
            auto& prevOp = operations[i].second;
2660
2661
93
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
49
                auto& curModifier = op.modifier.GetVectorPtr();
2663
49
                if ( curModifier.size() == 0 ) {
2664
10.7k
                    for (size_t j = 0; j < 512; j++) {
2665
10.7k
                        curModifier.push_back(1);
2666
10.7k
                    }
2667
28
                } else {
2668
267
                    for (auto& c : curModifier) {
2669
267
                        c++;
2670
267
                    }
2671
28
                }
2672
49
            }
2673
93
        }
2674
2675
131
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
131
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
131
        const auto& result = results.back();
2682
2683
131
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
131
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
131
        if ( options.disableTests == false ) {
2701
131
            tests::test(op, result.second);
2702
131
        }
2703
2704
131
        postprocess(module, op, result);
2705
131
    }
2706
2707
158
    if ( options.noCompare == false ) {
2708
38
        compare(operations, results, data, size);
2709
38
    }
2710
158
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
106
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
106
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
106
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.77k
    do {
2596
1.77k
        auto op = getOp(&parentDs, data, size);
2597
1.77k
        auto module = getModule(parentDs);
2598
1.77k
        if ( module == nullptr ) {
2599
1.60k
            continue;
2600
1.60k
        }
2601
2602
164
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
164
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
1.76k
    } while ( parentDs.Get<bool>() == true );
2609
2610
106
    if ( operations.empty() == true ) {
2611
7
        return;
2612
7
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
99
#if 1
2616
99
    {
2617
99
        std::set<uint64_t> moduleIDs;
2618
99
        for (const auto& m : modules ) {
2619
66
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
66
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
66
            moduleIDs.insert(moduleID);
2627
66
        }
2628
2629
99
        std::set<uint64_t> operationModuleIDs;
2630
99
        for (const auto& op : operations) {
2631
97
            operationModuleIDs.insert(op.first->ID);
2632
97
        }
2633
2634
99
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
99
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
99
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
99
        for (const auto& id : addModuleIDs) {
2639
21
            operations.push_back({ modules.at(id), operations[0].second});
2640
21
        }
2641
99
    }
2642
99
#endif
2643
2644
99
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
99
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
217
    for (size_t i = 0; i < operations.size(); i++) {
2652
118
        auto& operation = operations[i];
2653
2654
118
        auto& module = operation.first;
2655
118
        auto& op = operation.second;
2656
2657
118
        if ( i > 0 ) {
2658
85
            auto& prevModule = operations[i-1].first;
2659
85
            auto& prevOp = operations[i].second;
2660
2661
85
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
46
                auto& curModifier = op.modifier.GetVectorPtr();
2663
46
                if ( curModifier.size() == 0 ) {
2664
12.3k
                    for (size_t j = 0; j < 512; j++) {
2665
12.2k
                        curModifier.push_back(1);
2666
12.2k
                    }
2667
24
                } else {
2668
330
                    for (auto& c : curModifier) {
2669
330
                        c++;
2670
330
                    }
2671
22
                }
2672
46
            }
2673
85
        }
2674
2675
118
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
118
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
118
        const auto& result = results.back();
2682
2683
118
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
118
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
118
        if ( options.disableTests == false ) {
2701
118
            tests::test(op, result.second);
2702
118
        }
2703
2704
118
        postprocess(module, op, result);
2705
118
    }
2706
2707
99
    if ( options.noCompare == false ) {
2708
33
        compare(operations, results, data, size);
2709
33
    }
2710
99
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
182
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
182
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
182
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.84k
    do {
2596
1.84k
        auto op = getOp(&parentDs, data, size);
2597
1.84k
        auto module = getModule(parentDs);
2598
1.84k
        if ( module == nullptr ) {
2599
1.66k
            continue;
2600
1.66k
        }
2601
2602
182
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
182
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
1.84k
    } while ( parentDs.Get<bool>() == true );
2609
2610
182
    if ( operations.empty() == true ) {
2611
29
        return;
2612
29
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
153
#if 1
2616
153
    {
2617
153
        std::set<uint64_t> moduleIDs;
2618
153
        for (const auto& m : modules ) {
2619
68
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
68
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
68
            moduleIDs.insert(moduleID);
2627
68
        }
2628
2629
153
        std::set<uint64_t> operationModuleIDs;
2630
153
        for (const auto& op : operations) {
2631
98
            operationModuleIDs.insert(op.first->ID);
2632
98
        }
2633
2634
153
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
153
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
153
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
153
        for (const auto& id : addModuleIDs) {
2639
21
            operations.push_back({ modules.at(id), operations[0].second});
2640
21
        }
2641
153
    }
2642
153
#endif
2643
2644
153
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
153
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
272
    for (size_t i = 0; i < operations.size(); i++) {
2652
119
        auto& operation = operations[i];
2653
2654
119
        auto& module = operation.first;
2655
119
        auto& op = operation.second;
2656
2657
119
        if ( i > 0 ) {
2658
85
            auto& prevModule = operations[i-1].first;
2659
85
            auto& prevOp = operations[i].second;
2660
2661
85
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
45
                auto& curModifier = op.modifier.GetVectorPtr();
2663
45
                if ( curModifier.size() == 0 ) {
2664
10.7k
                    for (size_t j = 0; j < 512; j++) {
2665
10.7k
                        curModifier.push_back(1);
2666
10.7k
                    }
2667
24
                } else {
2668
281
                    for (auto& c : curModifier) {
2669
281
                        c++;
2670
281
                    }
2671
24
                }
2672
45
            }
2673
85
        }
2674
2675
119
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
119
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
119
        const auto& result = results.back();
2682
2683
119
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
119
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
119
        if ( options.disableTests == false ) {
2701
119
            tests::test(op, result.second);
2702
119
        }
2703
2704
119
        postprocess(module, op, result);
2705
119
    }
2706
2707
153
    if ( options.noCompare == false ) {
2708
34
        compare(operations, results, data, size);
2709
34
    }
2710
153
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
125
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
125
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
125
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.92k
    do {
2596
1.92k
        auto op = getOp(&parentDs, data, size);
2597
1.92k
        auto module = getModule(parentDs);
2598
1.92k
        if ( module == nullptr ) {
2599
1.75k
            continue;
2600
1.75k
        }
2601
2602
168
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
168
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
1.91k
    } while ( parentDs.Get<bool>() == true );
2609
2610
125
    if ( operations.empty() == true ) {
2611
15
        return;
2612
15
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
110
#if 1
2616
110
    {
2617
110
        std::set<uint64_t> moduleIDs;
2618
110
        for (const auto& m : modules ) {
2619
56
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
56
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
56
            moduleIDs.insert(moduleID);
2627
56
        }
2628
2629
110
        std::set<uint64_t> operationModuleIDs;
2630
110
        for (const auto& op : operations) {
2631
87
            operationModuleIDs.insert(op.first->ID);
2632
87
        }
2633
2634
110
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
110
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
110
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
110
        for (const auto& id : addModuleIDs) {
2639
17
            operations.push_back({ modules.at(id), operations[0].second});
2640
17
        }
2641
110
    }
2642
110
#endif
2643
2644
110
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
110
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
214
    for (size_t i = 0; i < operations.size(); i++) {
2652
104
        auto& operation = operations[i];
2653
2654
104
        auto& module = operation.first;
2655
104
        auto& op = operation.second;
2656
2657
104
        if ( i > 0 ) {
2658
76
            auto& prevModule = operations[i-1].first;
2659
76
            auto& prevOp = operations[i].second;
2660
2661
76
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
42
                auto& curModifier = op.modifier.GetVectorPtr();
2663
42
                if ( curModifier.size() == 0 ) {
2664
7.18k
                    for (size_t j = 0; j < 512; j++) {
2665
7.16k
                        curModifier.push_back(1);
2666
7.16k
                    }
2667
28
                } else {
2668
279
                    for (auto& c : curModifier) {
2669
279
                        c++;
2670
279
                    }
2671
28
                }
2672
42
            }
2673
76
        }
2674
2675
104
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
104
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
104
        const auto& result = results.back();
2682
2683
104
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
104
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
104
        if ( options.disableTests == false ) {
2701
104
            tests::test(op, result.second);
2702
104
        }
2703
2704
104
        postprocess(module, op, result);
2705
104
    }
2706
2707
110
    if ( options.noCompare == false ) {
2708
28
        compare(operations, results, data, size);
2709
28
    }
2710
110
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
135
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
135
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
135
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.26k
    do {
2596
2.26k
        auto op = getOp(&parentDs, data, size);
2597
2.26k
        auto module = getModule(parentDs);
2598
2.26k
        if ( module == nullptr ) {
2599
2.07k
            continue;
2600
2.07k
        }
2601
2602
188
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
188
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.25k
    } while ( parentDs.Get<bool>() == true );
2609
2610
135
    if ( operations.empty() == true ) {
2611
8
        return;
2612
8
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
127
#if 1
2616
127
    {
2617
127
        std::set<uint64_t> moduleIDs;
2618
127
        for (const auto& m : modules ) {
2619
74
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
74
            moduleIDs.insert(moduleID);
2627
74
        }
2628
2629
127
        std::set<uint64_t> operationModuleIDs;
2630
127
        for (const auto& op : operations) {
2631
111
            operationModuleIDs.insert(op.first->ID);
2632
111
        }
2633
2634
127
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
127
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
127
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
127
        for (const auto& id : addModuleIDs) {
2639
27
            operations.push_back({ modules.at(id), operations[0].second});
2640
27
        }
2641
127
    }
2642
127
#endif
2643
2644
127
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
127
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
265
    for (size_t i = 0; i < operations.size(); i++) {
2652
138
        auto& operation = operations[i];
2653
2654
138
        auto& module = operation.first;
2655
138
        auto& op = operation.second;
2656
2657
138
        if ( i > 0 ) {
2658
101
            auto& prevModule = operations[i-1].first;
2659
101
            auto& prevOp = operations[i].second;
2660
2661
101
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
58
                auto& curModifier = op.modifier.GetVectorPtr();
2663
58
                if ( curModifier.size() == 0 ) {
2664
14.8k
                    for (size_t j = 0; j < 512; j++) {
2665
14.8k
                        curModifier.push_back(1);
2666
14.8k
                    }
2667
29
                } else {
2668
417
                    for (auto& c : curModifier) {
2669
417
                        c++;
2670
417
                    }
2671
29
                }
2672
58
            }
2673
101
        }
2674
2675
138
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
138
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
138
        const auto& result = results.back();
2682
2683
138
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
138
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
138
        if ( options.disableTests == false ) {
2701
138
            tests::test(op, result.second);
2702
138
        }
2703
2704
138
        postprocess(module, op, result);
2705
138
    }
2706
2707
127
    if ( options.noCompare == false ) {
2708
37
        compare(operations, results, data, size);
2709
37
    }
2710
127
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
128
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
128
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
128
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.10k
    do {
2596
2.10k
        auto op = getOp(&parentDs, data, size);
2597
2.10k
        auto module = getModule(parentDs);
2598
2.10k
        if ( module == nullptr ) {
2599
1.90k
            continue;
2600
1.90k
        }
2601
2602
208
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
208
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
2.10k
    } while ( parentDs.Get<bool>() == true );
2609
2610
128
    if ( operations.empty() == true ) {
2611
11
        return;
2612
11
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
117
#if 1
2616
117
    {
2617
117
        std::set<uint64_t> moduleIDs;
2618
117
        for (const auto& m : modules ) {
2619
94
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
94
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
94
            moduleIDs.insert(moduleID);
2627
94
        }
2628
2629
117
        std::set<uint64_t> operationModuleIDs;
2630
125
        for (const auto& op : operations) {
2631
125
            operationModuleIDs.insert(op.first->ID);
2632
125
        }
2633
2634
117
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
117
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
117
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
117
        for (const auto& id : addModuleIDs) {
2639
35
            operations.push_back({ modules.at(id), operations[0].second});
2640
35
        }
2641
117
    }
2642
117
#endif
2643
2644
117
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
117
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
277
    for (size_t i = 0; i < operations.size(); i++) {
2652
160
        auto& operation = operations[i];
2653
2654
160
        auto& module = operation.first;
2655
160
        auto& op = operation.second;
2656
2657
160
        if ( i > 0 ) {
2658
113
            auto& prevModule = operations[i-1].first;
2659
113
            auto& prevOp = operations[i].second;
2660
2661
113
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
60
                auto& curModifier = op.modifier.GetVectorPtr();
2663
60
                if ( curModifier.size() == 0 ) {
2664
17.4k
                    for (size_t j = 0; j < 512; j++) {
2665
17.4k
                        curModifier.push_back(1);
2666
17.4k
                    }
2667
34
                } else {
2668
621
                    for (auto& c : curModifier) {
2669
621
                        c++;
2670
621
                    }
2671
26
                }
2672
60
            }
2673
113
        }
2674
2675
160
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
160
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
160
        const auto& result = results.back();
2682
2683
160
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
160
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
160
        if ( options.disableTests == false ) {
2701
160
            tests::test(op, result.second);
2702
160
        }
2703
2704
160
        postprocess(module, op, result);
2705
160
    }
2706
2707
117
    if ( options.noCompare == false ) {
2708
47
        compare(operations, results, data, size);
2709
47
    }
2710
117
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
127
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
127
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
127
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.91k
    do {
2596
1.91k
        auto op = getOp(&parentDs, data, size);
2597
1.91k
        auto module = getModule(parentDs);
2598
1.91k
        if ( module == nullptr ) {
2599
1.71k
            continue;
2600
1.71k
        }
2601
2602
203
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
203
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
5
            break;
2607
5
        }
2608
1.91k
    } while ( parentDs.Get<bool>() == true );
2609
2610
127
    if ( operations.empty() == true ) {
2611
5
        return;
2612
5
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
122
#if 1
2616
122
    {
2617
122
        std::set<uint64_t> moduleIDs;
2618
122
        for (const auto& m : modules ) {
2619
86
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
86
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
86
            moduleIDs.insert(moduleID);
2627
86
        }
2628
2629
122
        std::set<uint64_t> operationModuleIDs;
2630
122
        for (const auto& op : operations) {
2631
103
            operationModuleIDs.insert(op.first->ID);
2632
103
        }
2633
2634
122
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
122
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
122
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
122
        for (const auto& id : addModuleIDs) {
2639
31
            operations.push_back({ modules.at(id), operations[0].second});
2640
31
        }
2641
122
    }
2642
122
#endif
2643
2644
122
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
122
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
256
    for (size_t i = 0; i < operations.size(); i++) {
2652
134
        auto& operation = operations[i];
2653
2654
134
        auto& module = operation.first;
2655
134
        auto& op = operation.second;
2656
2657
134
        if ( i > 0 ) {
2658
91
            auto& prevModule = operations[i-1].first;
2659
91
            auto& prevOp = operations[i].second;
2660
2661
91
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
42
                auto& curModifier = op.modifier.GetVectorPtr();
2663
42
                if ( curModifier.size() == 0 ) {
2664
9.74k
                    for (size_t j = 0; j < 512; j++) {
2665
9.72k
                        curModifier.push_back(1);
2666
9.72k
                    }
2667
23
                } else {
2668
264
                    for (auto& c : curModifier) {
2669
264
                        c++;
2670
264
                    }
2671
23
                }
2672
42
            }
2673
91
        }
2674
2675
134
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
134
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
134
        const auto& result = results.back();
2682
2683
134
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
134
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
134
        if ( options.disableTests == false ) {
2701
134
            tests::test(op, result.second);
2702
134
        }
2703
2704
134
        postprocess(module, op, result);
2705
134
    }
2706
2707
122
    if ( options.noCompare == false ) {
2708
43
        compare(operations, results, data, size);
2709
43
    }
2710
122
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
189
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
189
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
189
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.26k
    do {
2596
2.26k
        auto op = getOp(&parentDs, data, size);
2597
2.26k
        auto module = getModule(parentDs);
2598
2.26k
        if ( module == nullptr ) {
2599
2.03k
            continue;
2600
2.03k
        }
2601
2602
232
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
232
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.26k
    } while ( parentDs.Get<bool>() == true );
2609
2610
189
    if ( operations.empty() == true ) {
2611
17
        return;
2612
17
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
172
#if 1
2616
172
    {
2617
172
        std::set<uint64_t> moduleIDs;
2618
172
        for (const auto& m : modules ) {
2619
102
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
102
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
102
            moduleIDs.insert(moduleID);
2627
102
        }
2628
2629
172
        std::set<uint64_t> operationModuleIDs;
2630
172
        for (const auto& op : operations) {
2631
125
            operationModuleIDs.insert(op.first->ID);
2632
125
        }
2633
2634
172
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
172
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
172
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
172
        for (const auto& id : addModuleIDs) {
2639
38
            operations.push_back({ modules.at(id), operations[0].second});
2640
38
        }
2641
172
    }
2642
172
#endif
2643
2644
172
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
172
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
335
    for (size_t i = 0; i < operations.size(); i++) {
2652
163
        auto& operation = operations[i];
2653
2654
163
        auto& module = operation.first;
2655
163
        auto& op = operation.second;
2656
2657
163
        if ( i > 0 ) {
2658
112
            auto& prevModule = operations[i-1].first;
2659
112
            auto& prevOp = operations[i].second;
2660
2661
112
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
55
                auto& curModifier = op.modifier.GetVectorPtr();
2663
55
                if ( curModifier.size() == 0 ) {
2664
13.3k
                    for (size_t j = 0; j < 512; j++) {
2665
13.3k
                        curModifier.push_back(1);
2666
13.3k
                    }
2667
29
                } else {
2668
276
                    for (auto& c : curModifier) {
2669
276
                        c++;
2670
276
                    }
2671
29
                }
2672
55
            }
2673
112
        }
2674
2675
163
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
163
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
163
        const auto& result = results.back();
2682
2683
163
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
163
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
163
        if ( options.disableTests == false ) {
2701
163
            tests::test(op, result.second);
2702
163
        }
2703
2704
163
        postprocess(module, op, result);
2705
163
    }
2706
2707
172
    if ( options.noCompare == false ) {
2708
51
        compare(operations, results, data, size);
2709
51
    }
2710
172
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
149
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
149
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
149
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.19k
    do {
2596
2.19k
        auto op = getOp(&parentDs, data, size);
2597
2.19k
        auto module = getModule(parentDs);
2598
2.19k
        if ( module == nullptr ) {
2599
1.98k
            continue;
2600
1.98k
        }
2601
2602
212
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
212
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
2.18k
    } while ( parentDs.Get<bool>() == true );
2609
2610
149
    if ( operations.empty() == true ) {
2611
17
        return;
2612
17
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
132
#if 1
2616
132
    {
2617
132
        std::set<uint64_t> moduleIDs;
2618
132
        for (const auto& m : modules ) {
2619
96
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
96
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
96
            moduleIDs.insert(moduleID);
2627
96
        }
2628
2629
132
        std::set<uint64_t> operationModuleIDs;
2630
132
        for (const auto& op : operations) {
2631
123
            operationModuleIDs.insert(op.first->ID);
2632
123
        }
2633
2634
132
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
132
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
132
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
132
        for (const auto& id : addModuleIDs) {
2639
36
            operations.push_back({ modules.at(id), operations[0].second});
2640
36
        }
2641
132
    }
2642
132
#endif
2643
2644
132
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
132
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
291
    for (size_t i = 0; i < operations.size(); i++) {
2652
159
        auto& operation = operations[i];
2653
2654
159
        auto& module = operation.first;
2655
159
        auto& op = operation.second;
2656
2657
159
        if ( i > 0 ) {
2658
111
            auto& prevModule = operations[i-1].first;
2659
111
            auto& prevOp = operations[i].second;
2660
2661
111
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
57
                auto& curModifier = op.modifier.GetVectorPtr();
2663
57
                if ( curModifier.size() == 0 ) {
2664
10.7k
                    for (size_t j = 0; j < 512; j++) {
2665
10.7k
                        curModifier.push_back(1);
2666
10.7k
                    }
2667
36
                } else {
2668
385
                    for (auto& c : curModifier) {
2669
385
                        c++;
2670
385
                    }
2671
36
                }
2672
57
            }
2673
111
        }
2674
2675
159
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
159
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
159
        const auto& result = results.back();
2682
2683
159
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
159
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
159
        if ( options.disableTests == false ) {
2701
159
            tests::test(op, result.second);
2702
159
        }
2703
2704
159
        postprocess(module, op, result);
2705
159
    }
2706
2707
132
    if ( options.noCompare == false ) {
2708
48
        compare(operations, results, data, size);
2709
48
    }
2710
132
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
183
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
183
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
183
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.31k
    do {
2596
2.31k
        auto op = getOp(&parentDs, data, size);
2597
2.31k
        auto module = getModule(parentDs);
2598
2.31k
        if ( module == nullptr ) {
2599
2.04k
            continue;
2600
2.04k
        }
2601
2602
271
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
271
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.31k
    } while ( parentDs.Get<bool>() == true );
2609
2610
183
    if ( operations.empty() == true ) {
2611
10
        return;
2612
10
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
173
#if 1
2616
173
    {
2617
173
        std::set<uint64_t> moduleIDs;
2618
173
        for (const auto& m : modules ) {
2619
152
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
152
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
152
            moduleIDs.insert(moduleID);
2627
152
        }
2628
2629
173
        std::set<uint64_t> operationModuleIDs;
2630
173
        for (const auto& op : operations) {
2631
163
            operationModuleIDs.insert(op.first->ID);
2632
163
        }
2633
2634
173
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
173
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
173
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
173
        for (const auto& id : addModuleIDs) {
2639
63
            operations.push_back({ modules.at(id), operations[0].second});
2640
63
        }
2641
173
    }
2642
173
#endif
2643
2644
173
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
173
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
399
    for (size_t i = 0; i < operations.size(); i++) {
2652
226
        auto& operation = operations[i];
2653
2654
226
        auto& module = operation.first;
2655
226
        auto& op = operation.second;
2656
2657
226
        if ( i > 0 ) {
2658
150
            auto& prevModule = operations[i-1].first;
2659
150
            auto& prevOp = operations[i].second;
2660
2661
150
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
68
                auto& curModifier = op.modifier.GetVectorPtr();
2663
68
                if ( curModifier.size() == 0 ) {
2664
19.4k
                    for (size_t j = 0; j < 512; j++) {
2665
19.4k
                        curModifier.push_back(1);
2666
19.4k
                    }
2667
38
                } else {
2668
539
                    for (auto& c : curModifier) {
2669
539
                        c++;
2670
539
                    }
2671
30
                }
2672
68
            }
2673
150
        }
2674
2675
226
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
226
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
226
        const auto& result = results.back();
2682
2683
226
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
226
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
226
        if ( options.disableTests == false ) {
2701
226
            tests::test(op, result.second);
2702
226
        }
2703
2704
226
        postprocess(module, op, result);
2705
226
    }
2706
2707
173
    if ( options.noCompare == false ) {
2708
76
        compare(operations, results, data, size);
2709
76
    }
2710
173
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
183
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
183
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
183
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.56k
    do {
2596
2.56k
        auto op = getOp(&parentDs, data, size);
2597
2.56k
        auto module = getModule(parentDs);
2598
2.56k
        if ( module == nullptr ) {
2599
2.32k
            continue;
2600
2.32k
        }
2601
2602
242
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
242
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
2.55k
    } while ( parentDs.Get<bool>() == true );
2609
2610
183
    if ( operations.empty() == true ) {
2611
18
        return;
2612
18
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
165
#if 1
2616
165
    {
2617
165
        std::set<uint64_t> moduleIDs;
2618
165
        for (const auto& m : modules ) {
2619
124
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
124
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
124
            moduleIDs.insert(moduleID);
2627
124
        }
2628
2629
165
        std::set<uint64_t> operationModuleIDs;
2630
165
        for (const auto& op : operations) {
2631
138
            operationModuleIDs.insert(op.first->ID);
2632
138
        }
2633
2634
165
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
165
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
165
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
165
        for (const auto& id : addModuleIDs) {
2639
51
            operations.push_back({ modules.at(id), operations[0].second});
2640
51
        }
2641
165
    }
2642
165
#endif
2643
2644
165
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
165
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
354
    for (size_t i = 0; i < operations.size(); i++) {
2652
189
        auto& operation = operations[i];
2653
2654
189
        auto& module = operation.first;
2655
189
        auto& op = operation.second;
2656
2657
189
        if ( i > 0 ) {
2658
127
            auto& prevModule = operations[i-1].first;
2659
127
            auto& prevOp = operations[i].second;
2660
2661
127
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
59
                auto& curModifier = op.modifier.GetVectorPtr();
2663
59
                if ( curModifier.size() == 0 ) {
2664
16.9k
                    for (size_t j = 0; j < 512; j++) {
2665
16.8k
                        curModifier.push_back(1);
2666
16.8k
                    }
2667
33
                } else {
2668
366
                    for (auto& c : curModifier) {
2669
366
                        c++;
2670
366
                    }
2671
26
                }
2672
59
            }
2673
127
        }
2674
2675
189
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
189
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
189
        const auto& result = results.back();
2682
2683
189
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
189
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
189
        if ( options.disableTests == false ) {
2701
189
            tests::test(op, result.second);
2702
189
        }
2703
2704
189
        postprocess(module, op, result);
2705
189
    }
2706
2707
165
    if ( options.noCompare == false ) {
2708
62
        compare(operations, results, data, size);
2709
62
    }
2710
165
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
175
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
175
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
175
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.87k
    do {
2596
2.87k
        auto op = getOp(&parentDs, data, size);
2597
2.87k
        auto module = getModule(parentDs);
2598
2.87k
        if ( module == nullptr ) {
2599
2.61k
            continue;
2600
2.61k
        }
2601
2602
256
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
256
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.86k
    } while ( parentDs.Get<bool>() == true );
2609
2610
175
    if ( operations.empty() == true ) {
2611
6
        return;
2612
6
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
169
#if 1
2616
169
    {
2617
169
        std::set<uint64_t> moduleIDs;
2618
169
        for (const auto& m : modules ) {
2619
140
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
140
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
140
            moduleIDs.insert(moduleID);
2627
140
        }
2628
2629
169
        std::set<uint64_t> operationModuleIDs;
2630
169
        for (const auto& op : operations) {
2631
163
            operationModuleIDs.insert(op.first->ID);
2632
163
        }
2633
2634
169
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
169
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
169
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
169
        for (const auto& id : addModuleIDs) {
2639
60
            operations.push_back({ modules.at(id), operations[0].second});
2640
60
        }
2641
169
    }
2642
169
#endif
2643
2644
169
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
169
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
392
    for (size_t i = 0; i < operations.size(); i++) {
2652
223
        auto& operation = operations[i];
2653
2654
223
        auto& module = operation.first;
2655
223
        auto& op = operation.second;
2656
2657
223
        if ( i > 0 ) {
2658
153
            auto& prevModule = operations[i-1].first;
2659
153
            auto& prevOp = operations[i].second;
2660
2661
153
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
73
                auto& curModifier = op.modifier.GetVectorPtr();
2663
73
                if ( curModifier.size() == 0 ) {
2664
17.9k
                    for (size_t j = 0; j < 512; j++) {
2665
17.9k
                        curModifier.push_back(1);
2666
17.9k
                    }
2667
38
                } else {
2668
870
                    for (auto& c : curModifier) {
2669
870
                        c++;
2670
870
                    }
2671
38
                }
2672
73
            }
2673
153
        }
2674
2675
223
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
223
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
223
        const auto& result = results.back();
2682
2683
223
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
223
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
223
        if ( options.disableTests == false ) {
2701
223
            tests::test(op, result.second);
2702
223
        }
2703
2704
223
        postprocess(module, op, result);
2705
223
    }
2706
2707
169
    if ( options.noCompare == false ) {
2708
70
        compare(operations, results, data, size);
2709
70
    }
2710
169
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
171
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
171
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
171
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.33k
    do {
2596
2.33k
        auto op = getOp(&parentDs, data, size);
2597
2.33k
        auto module = getModule(parentDs);
2598
2.33k
        if ( module == nullptr ) {
2599
2.09k
            continue;
2600
2.09k
        }
2601
2602
239
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
239
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.33k
    } while ( parentDs.Get<bool>() == true );
2609
2610
171
    if ( operations.empty() == true ) {
2611
11
        return;
2612
11
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
160
#if 1
2616
160
    {
2617
160
        std::set<uint64_t> moduleIDs;
2618
160
        for (const auto& m : modules ) {
2619
100
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
100
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
100
            moduleIDs.insert(moduleID);
2627
100
        }
2628
2629
160
        std::set<uint64_t> operationModuleIDs;
2630
160
        for (const auto& op : operations) {
2631
120
            operationModuleIDs.insert(op.first->ID);
2632
120
        }
2633
2634
160
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
160
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
160
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
160
        for (const auto& id : addModuleIDs) {
2639
38
            operations.push_back({ modules.at(id), operations[0].second});
2640
38
        }
2641
160
    }
2642
160
#endif
2643
2644
160
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
160
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
318
    for (size_t i = 0; i < operations.size(); i++) {
2652
158
        auto& operation = operations[i];
2653
2654
158
        auto& module = operation.first;
2655
158
        auto& op = operation.second;
2656
2657
158
        if ( i > 0 ) {
2658
108
            auto& prevModule = operations[i-1].first;
2659
108
            auto& prevOp = operations[i].second;
2660
2661
108
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
52
                auto& curModifier = op.modifier.GetVectorPtr();
2663
52
                if ( curModifier.size() == 0 ) {
2664
13.3k
                    for (size_t j = 0; j < 512; j++) {
2665
13.3k
                        curModifier.push_back(1);
2666
13.3k
                    }
2667
26
                } else {
2668
641
                    for (auto& c : curModifier) {
2669
641
                        c++;
2670
641
                    }
2671
26
                }
2672
52
            }
2673
108
        }
2674
2675
158
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
158
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
158
        const auto& result = results.back();
2682
2683
158
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
158
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
158
        if ( options.disableTests == false ) {
2701
158
            tests::test(op, result.second);
2702
158
        }
2703
2704
158
        postprocess(module, op, result);
2705
158
    }
2706
2707
160
    if ( options.noCompare == false ) {
2708
50
        compare(operations, results, data, size);
2709
50
    }
2710
160
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
146
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
146
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
146
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.79k
    do {
2596
1.79k
        auto op = getOp(&parentDs, data, size);
2597
1.79k
        auto module = getModule(parentDs);
2598
1.79k
        if ( module == nullptr ) {
2599
1.61k
            continue;
2600
1.61k
        }
2601
2602
183
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
183
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
1.79k
    } while ( parentDs.Get<bool>() == true );
2609
2610
146
    if ( operations.empty() == true ) {
2611
14
        return;
2612
14
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
132
#if 1
2616
132
    {
2617
132
        std::set<uint64_t> moduleIDs;
2618
132
        for (const auto& m : modules ) {
2619
62
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
62
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
62
            moduleIDs.insert(moduleID);
2627
62
        }
2628
2629
132
        std::set<uint64_t> operationModuleIDs;
2630
132
        for (const auto& op : operations) {
2631
99
            operationModuleIDs.insert(op.first->ID);
2632
99
        }
2633
2634
132
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
132
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
132
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
132
        for (const auto& id : addModuleIDs) {
2639
20
            operations.push_back({ modules.at(id), operations[0].second});
2640
20
        }
2641
132
    }
2642
132
#endif
2643
2644
132
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
132
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
251
    for (size_t i = 0; i < operations.size(); i++) {
2652
119
        auto& operation = operations[i];
2653
2654
119
        auto& module = operation.first;
2655
119
        auto& op = operation.second;
2656
2657
119
        if ( i > 0 ) {
2658
88
            auto& prevModule = operations[i-1].first;
2659
88
            auto& prevOp = operations[i].second;
2660
2661
88
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
49
                auto& curModifier = op.modifier.GetVectorPtr();
2663
49
                if ( curModifier.size() == 0 ) {
2664
12.8k
                    for (size_t j = 0; j < 512; j++) {
2665
12.8k
                        curModifier.push_back(1);
2666
12.8k
                    }
2667
25
                } else {
2668
296
                    for (auto& c : curModifier) {
2669
296
                        c++;
2670
296
                    }
2671
24
                }
2672
49
            }
2673
88
        }
2674
2675
119
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
119
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
119
        const auto& result = results.back();
2682
2683
119
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
119
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
119
        if ( options.disableTests == false ) {
2701
119
            tests::test(op, result.second);
2702
119
        }
2703
2704
119
        postprocess(module, op, result);
2705
119
    }
2706
2707
132
    if ( options.noCompare == false ) {
2708
31
        compare(operations, results, data, size);
2709
31
    }
2710
132
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
148
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
148
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
148
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.69k
    do {
2596
2.69k
        auto op = getOp(&parentDs, data, size);
2597
2.69k
        auto module = getModule(parentDs);
2598
2.69k
        if ( module == nullptr ) {
2599
2.46k
            continue;
2600
2.46k
        }
2601
2602
233
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
233
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
5
            break;
2607
5
        }
2608
2.69k
    } while ( parentDs.Get<bool>() == true );
2609
2610
148
    if ( operations.empty() == true ) {
2611
6
        return;
2612
6
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
142
#if 1
2616
142
    {
2617
142
        std::set<uint64_t> moduleIDs;
2618
142
        for (const auto& m : modules ) {
2619
78
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
78
            moduleIDs.insert(moduleID);
2627
78
        }
2628
2629
142
        std::set<uint64_t> operationModuleIDs;
2630
142
        for (const auto& op : operations) {
2631
109
            operationModuleIDs.insert(op.first->ID);
2632
109
        }
2633
2634
142
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
142
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
142
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
142
        for (const auto& id : addModuleIDs) {
2639
22
            operations.push_back({ modules.at(id), operations[0].second});
2640
22
        }
2641
142
    }
2642
142
#endif
2643
2644
142
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
142
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
273
    for (size_t i = 0; i < operations.size(); i++) {
2652
131
        auto& operation = operations[i];
2653
2654
131
        auto& module = operation.first;
2655
131
        auto& op = operation.second;
2656
2657
131
        if ( i > 0 ) {
2658
92
            auto& prevModule = operations[i-1].first;
2659
92
            auto& prevOp = operations[i].second;
2660
2661
92
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
43
                auto& curModifier = op.modifier.GetVectorPtr();
2663
43
                if ( curModifier.size() == 0 ) {
2664
11.7k
                    for (size_t j = 0; j < 512; j++) {
2665
11.7k
                        curModifier.push_back(1);
2666
11.7k
                    }
2667
23
                } else {
2668
230
                    for (auto& c : curModifier) {
2669
230
                        c++;
2670
230
                    }
2671
20
                }
2672
43
            }
2673
92
        }
2674
2675
131
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
131
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
131
        const auto& result = results.back();
2682
2683
131
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
131
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
131
        if ( options.disableTests == false ) {
2701
131
            tests::test(op, result.second);
2702
131
        }
2703
2704
131
        postprocess(module, op, result);
2705
131
    }
2706
2707
142
    if ( options.noCompare == false ) {
2708
39
        compare(operations, results, data, size);
2709
39
    }
2710
142
}
2711
2712
/* Explicit template instantiation */
2713
template class ExecutorBase<component::Digest, operation::Digest>;
2714
template class ExecutorBase<component::MAC, operation::HMAC>;
2715
template class ExecutorBase<component::MAC, operation::UMAC>;
2716
template class ExecutorBase<component::MAC, operation::CMAC>;
2717
template class ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>;
2718
template class ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>;
2719
template class ExecutorBase<component::Key, operation::KDF_SCRYPT>;
2720
template class ExecutorBase<component::Key, operation::KDF_HKDF>;
2721
template class ExecutorBase<component::Key, operation::KDF_TLS1_PRF>;
2722
template class ExecutorBase<component::Key, operation::KDF_PBKDF>;
2723
template class ExecutorBase<component::Key, operation::KDF_PBKDF1>;
2724
template class ExecutorBase<component::Key, operation::KDF_PBKDF2>;
2725
template class ExecutorBase<component::Key, operation::KDF_ARGON2>;
2726
template class ExecutorBase<component::Key, operation::KDF_SSH>;
2727
template class ExecutorBase<component::Key, operation::KDF_X963>;
2728
template class ExecutorBase<component::Key, operation::KDF_BCRYPT>;
2729
template class ExecutorBase<component::Key, operation::KDF_SP_800_108>;
2730
template class ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>;
2731
template class ExecutorBase<bool, operation::ECC_ValidatePubkey>;
2732
template class ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>;
2733
template class ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>;
2734
template class ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>;
2735
template class ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>;
2736
template class ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>;
2737
template class ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>;
2738
template class ExecutorBase<bool, operation::ECCSI_Verify>;
2739
template class ExecutorBase<bool, operation::ECDSA_Verify>;
2740
template class ExecutorBase<bool, operation::ECGDSA_Verify>;
2741
template class ExecutorBase<bool, operation::ECRDSA_Verify>;
2742
template class ExecutorBase<bool, operation::Schnorr_Verify>;
2743
template class ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>;
2744
template class ExecutorBase<bool, operation::DSA_Verify>;
2745
template class ExecutorBase<component::DSA_Signature, operation::DSA_Sign>;
2746
template class ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>;
2747
template class ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>;
2748
template class ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>;
2749
template class ExecutorBase<component::Secret, operation::ECDH_Derive>;
2750
template class ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>;
2751
template class ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>;
2752
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>;
2753
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>;
2754
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>;
2755
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>;
2756
template class ExecutorBase<bool, operation::ECC_Point_Cmp>;
2757
template class ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>;
2758
template class ExecutorBase<component::Bignum, operation::DH_Derive>;
2759
template class ExecutorBase<component::Bignum, operation::BignumCalc>;
2760
template class ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>;
2761
template class ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>;
2762
template class ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>;
2763
template class ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>;
2764
template class ExecutorBase<component::BLS_Signature, operation::BLS_Sign>;
2765
template class ExecutorBase<bool, operation::BLS_Verify>;
2766
template class ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>;
2767
template class ExecutorBase<bool, operation::BLS_BatchVerify>;
2768
template class ExecutorBase<component::G1, operation::BLS_Aggregate_G1>;
2769
template class ExecutorBase<component::G2, operation::BLS_Aggregate_G2>;
2770
template class ExecutorBase<component::Fp12, operation::BLS_Pairing>;
2771
template class ExecutorBase<component::Fp12, operation::BLS_MillerLoop>;
2772
template class ExecutorBase<component::Fp12, operation::BLS_FinalExp>;
2773
template class ExecutorBase<component::G1, operation::BLS_HashToG1>;
2774
template class ExecutorBase<component::G2, operation::BLS_HashToG2>;
2775
template class ExecutorBase<component::G1, operation::BLS_MapToG1>;
2776
template class ExecutorBase<component::G2, operation::BLS_MapToG2>;
2777
template class ExecutorBase<bool, operation::BLS_IsG1OnCurve>;
2778
template class ExecutorBase<bool, operation::BLS_IsG2OnCurve>;
2779
template class ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>;
2780
template class ExecutorBase<component::G1, operation::BLS_Decompress_G1>;
2781
template class ExecutorBase<component::Bignum, operation::BLS_Compress_G1>;
2782
template class ExecutorBase<component::G2, operation::BLS_Decompress_G2>;
2783
template class ExecutorBase<component::G1, operation::BLS_Compress_G2>;
2784
template class ExecutorBase<component::G1, operation::BLS_G1_Add>;
2785
template class ExecutorBase<component::G1, operation::BLS_G1_Mul>;
2786
template class ExecutorBase<bool, operation::BLS_G1_IsEq>;
2787
template class ExecutorBase<component::G1, operation::BLS_G1_Neg>;
2788
template class ExecutorBase<component::G2, operation::BLS_G2_Add>;
2789
template class ExecutorBase<component::G2, operation::BLS_G2_Mul>;
2790
template class ExecutorBase<bool, operation::BLS_G2_IsEq>;
2791
template class ExecutorBase<component::G2, operation::BLS_G2_Neg>;
2792
template class ExecutorBase<Buffer, operation::Misc>;
2793
template class ExecutorBase<bool, operation::SR25519_Verify>;
2794
2795
} /* namespace cryptofuzz */