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
72.6k
#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
4.58k
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
4.58k
    (void)module;
53
4.58k
    (void)op;
54
55
4.58k
    if ( result.second != std::nullopt ) {
56
2.09k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
2.09k
    }
58
4.58k
}
59
60
4.58k
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
4.58k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
4.58k
    return module->OpDigest(op);
64
4.58k
}
65
66
/* Specialization for operation::HMAC */
67
2.28k
template<> void ExecutorBase<component::MAC, operation::HMAC>::postprocess(std::shared_ptr<Module> module, operation::HMAC& op, const ExecutorBase<component::MAC, operation::HMAC>::ResultPair& result) const {
68
2.28k
    (void)module;
69
2.28k
    (void)op;
70
71
2.28k
    if ( result.second != std::nullopt ) {
72
1.06k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
1.06k
    }
74
2.28k
}
75
76
2.28k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
2.28k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
2.28k
    return module->OpHMAC(op);
80
2.28k
}
81
82
/* Specialization for operation::UMAC */
83
2.86k
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
2.86k
    (void)module;
85
2.86k
    (void)op;
86
87
2.86k
    if ( result.second != std::nullopt ) {
88
1.39k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
1.39k
    }
90
2.86k
}
91
92
2.86k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
2.86k
    return module->OpUMAC(op);
94
2.86k
}
95
96
/* Specialization for operation::CMAC */
97
2.48k
template<> void ExecutorBase<component::MAC, operation::CMAC>::postprocess(std::shared_ptr<Module> module, operation::CMAC& op, const ExecutorBase<component::MAC, operation::CMAC>::ResultPair& result) const {
98
2.48k
    (void)module;
99
2.48k
    (void)op;
100
101
2.48k
    if ( result.second != std::nullopt ) {
102
1.09k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
1.09k
    }
104
2.48k
}
105
106
2.48k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
2.48k
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
2.48k
    return module->OpCMAC(op);
110
2.48k
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
11.9k
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
11.9k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
11.9k
    if ( result.second != std::nullopt ) {
119
3.91k
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
3.91k
        if ( result.second->tag != std::nullopt ) {
121
1.34k
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
1.34k
        }
123
3.91k
    }
124
125
11.9k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
3.21k
        using fuzzing::datasource::ID;
127
128
3.21k
        bool tryDecrypt = true;
129
130
3.21k
        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
3.21k
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
3.21k
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
3.21k
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
3.21k
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
3.21k
                    op.cleartext.GetSize() + 32,
171
172
3.21k
                    op.aad,
173
174
                    /* Empty modifier */
175
3.21k
                    {});
176
177
3.21k
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
3.21k
            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
3.21k
            } 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
3.21k
        }
208
3.21k
    }
209
11.9k
}
210
211
11.9k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
11.9k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
11.9k
    return module->OpSymmetricEncrypt(op);
215
11.9k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
9.60k
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
9.60k
    (void)module;
220
9.60k
    (void)op;
221
222
9.60k
    if ( result.second != std::nullopt ) {
223
869
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
869
    }
225
9.60k
}
226
227
9.60k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
9.60k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
9.60k
    return module->OpSymmetricDecrypt(op);
231
9.60k
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
782
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
782
    (void)module;
236
782
    (void)op;
237
238
782
    if ( result.second != std::nullopt ) {
239
216
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
216
    }
241
782
}
242
243
782
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
782
    return module->OpKDF_SCRYPT(op);
245
782
}
246
247
/* Specialization for operation::KDF_HKDF */
248
4.96k
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
4.96k
    (void)module;
250
4.96k
    (void)op;
251
252
4.96k
    if ( result.second != std::nullopt ) {
253
2.11k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
2.11k
    }
255
4.96k
}
256
257
4.96k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
4.96k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
4.96k
    return module->OpKDF_HKDF(op);
261
4.96k
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
313
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
313
    (void)module;
266
313
    (void)op;
267
268
313
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
313
}
272
273
313
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
313
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
313
    return module->OpKDF_PBKDF(op);
277
313
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
376
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
376
    (void)module;
282
376
    (void)op;
283
284
376
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
376
}
288
289
376
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
376
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
376
    return module->OpKDF_PBKDF1(op);
293
376
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
1.55k
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.55k
    (void)module;
298
1.55k
    (void)op;
299
300
1.55k
    if ( result.second != std::nullopt ) {
301
771
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
771
    }
303
1.55k
}
304
305
1.55k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
1.55k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
1.55k
    return module->OpKDF_PBKDF2(op);
309
1.55k
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
570
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
570
    (void)module;
314
570
    (void)op;
315
316
570
    if ( result.second != std::nullopt ) {
317
261
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
261
    }
319
570
}
320
321
570
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
570
    return module->OpKDF_ARGON2(op);
323
570
}
324
325
/* Specialization for operation::KDF_SSH */
326
410
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
410
    (void)module;
328
410
    (void)op;
329
330
410
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
410
}
334
335
410
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
410
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
410
    return module->OpKDF_SSH(op);
339
410
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
388
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
388
    (void)module;
344
388
    (void)op;
345
346
388
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
388
}
350
351
388
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
388
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
388
    return module->OpKDF_TLS1_PRF(op);
355
388
}
356
357
/* Specialization for operation::KDF_X963 */
358
414
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
414
    (void)module;
360
414
    (void)op;
361
362
414
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
414
}
366
367
414
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
414
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
414
    return module->OpKDF_X963(op);
371
414
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
152
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
152
    (void)module;
376
152
    (void)op;
377
378
152
    if ( result.second != std::nullopt ) {
379
40
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
40
    }
381
152
}
382
383
152
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
152
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
152
    return module->OpKDF_BCRYPT(op);
387
152
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
1.43k
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.43k
    (void)module;
392
1.43k
    (void)op;
393
394
1.43k
    if ( result.second != std::nullopt ) {
395
527
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
527
    }
397
1.43k
}
398
399
1.43k
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.43k
    if ( op.mech.mode == true ) {
401
1.18k
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
1.18k
    }
403
404
1.43k
    return module->OpKDF_SP_800_108(op);
405
1.43k
}
406
407
408
/* Specialization for operation::ECC_PrivateToPublic */
409
1.57k
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op, const ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::ResultPair& result) const {
410
1.57k
    (void)module;
411
412
1.57k
    if ( result.second != std::nullopt  ) {
413
577
        const auto curveID = op.curveType.Get();
414
577
        const auto privkey = op.priv.ToTrimmedString();
415
577
        const auto pub_x = result.second->first.ToTrimmedString();
416
577
        const auto pub_y = result.second->second.ToTrimmedString();
417
418
577
        Pool_CurvePrivkey.Set({ curveID, privkey });
419
577
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
420
577
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
421
422
577
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
423
577
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
424
577
    }
425
1.57k
}
426
427
1.57k
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op) const {
428
1.57k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
429
430
1.57k
    const size_t size = op.priv.ToTrimmedString().size();
431
432
1.57k
    if ( size == 0 || size > 4096 ) {
433
0
        return std::nullopt;
434
0
    }
435
436
1.57k
    return module->OpECC_PrivateToPublic(op);
437
1.57k
}
438
439
/* Specialization for operation::ECC_ValidatePubkey */
440
1.19k
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
1.19k
    (void)module;
442
1.19k
    (void)op;
443
1.19k
    (void)result;
444
1.19k
}
445
446
1.19k
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
447
1.19k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
448
449
1.19k
    return module->OpECC_ValidatePubkey(op);
450
1.19k
}
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
32
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
32
    (void)operations;
458
32
    (void)results;
459
32
    (void)data;
460
32
    (void)size;
461
32
}
462
463
1.44k
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.44k
    (void)module;
465
466
1.44k
    if ( result.second != std::nullopt  ) {
467
433
        const auto curveID = op.curveType.Get();
468
433
        const auto privkey = result.second->priv.ToTrimmedString();
469
433
        const auto pub_x = result.second->pub.first.ToTrimmedString();
470
433
        const auto pub_y = result.second->pub.second.ToTrimmedString();
471
472
433
        Pool_CurvePrivkey.Set({ curveID, privkey });
473
433
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
474
433
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
475
433
    }
476
1.44k
}
477
478
1.44k
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.44k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
480
481
1.44k
    return module->OpECC_GenerateKeyPair(op);
482
1.44k
}
483
484
/* Specialization for operation::ECCSI_Sign */
485
149
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
149
    (void)module;
487
488
149
    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
149
}
531
532
149
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
149
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
534
149
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
535
536
149
    const size_t size = op.priv.ToTrimmedString().size();
537
538
149
    if ( size == 0 || size > 4096 ) {
539
0
        return std::nullopt;
540
0
    }
541
542
149
    return module->OpECCSI_Sign(op);
543
149
}
544
545
/* Specialization for operation::ECDSA_Sign */
546
1.77k
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.77k
    (void)module;
548
549
1.77k
    if ( result.second != std::nullopt  ) {
550
845
        const auto curveID = op.curveType.Get();
551
845
        const auto cleartext = op.cleartext.ToHex();
552
845
        const auto pub_x = result.second->pub.first.ToTrimmedString();
553
845
        const auto pub_y = result.second->pub.second.ToTrimmedString();
554
845
        const auto sig_r = result.second->signature.first.ToTrimmedString();
555
845
        const auto sig_s = result.second->signature.second.ToTrimmedString();
556
557
845
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
558
845
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
559
845
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
560
561
845
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
562
845
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
563
845
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
564
845
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
565
566
845
        {
567
845
            auto opVerify = operation::ECDSA_Verify(
568
845
                    op,
569
845
                    *(result.second),
570
845
                    op.modifier);
571
572
845
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
573
845
            CF_ASSERT(
574
845
                    verifyResult == std::nullopt ||
575
845
                    *verifyResult == true,
576
845
                    "Cannot verify generated signature");
577
845
        }
578
845
    }
579
1.77k
}
580
581
1.77k
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.77k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
583
1.77k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
584
585
1.77k
    const size_t size = op.priv.ToTrimmedString().size();
586
587
1.77k
    if ( size == 0 || size > 4096 ) {
588
0
        return std::nullopt;
589
0
    }
590
591
1.77k
    return module->OpECDSA_Sign(op);
592
1.77k
}
593
594
/* Specialization for operation::ECGDSA_Sign */
595
460
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
460
    (void)module;
597
598
460
    if ( result.second != std::nullopt  ) {
599
65
        const auto curveID = op.curveType.Get();
600
65
        const auto cleartext = op.cleartext.ToHex();
601
65
        const auto pub_x = result.second->pub.first.ToTrimmedString();
602
65
        const auto pub_y = result.second->pub.second.ToTrimmedString();
603
65
        const auto sig_r = result.second->signature.first.ToTrimmedString();
604
65
        const auto sig_s = result.second->signature.second.ToTrimmedString();
605
606
65
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
607
65
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
608
65
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
609
610
65
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
611
65
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
612
65
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
613
65
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
614
65
    }
615
460
}
616
617
460
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
460
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
619
460
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
620
621
460
    const size_t size = op.priv.ToTrimmedString().size();
622
623
460
    if ( size == 0 || size > 4096 ) {
624
7
        return std::nullopt;
625
7
    }
626
627
453
    return module->OpECGDSA_Sign(op);
628
460
}
629
630
/* Specialization for operation::ECRDSA_Sign */
631
158
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
158
    (void)module;
633
634
158
    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
158
}
652
653
158
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
158
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
655
158
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
656
657
158
    const size_t size = op.priv.ToTrimmedString().size();
658
659
158
    if ( size == 0 || size > 4096 ) {
660
0
        return std::nullopt;
661
0
    }
662
663
158
    return module->OpECRDSA_Sign(op);
664
158
}
665
666
/* Specialization for operation::Schnorr_Sign */
667
111
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
111
    (void)module;
669
670
111
    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
111
}
688
689
111
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
111
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
691
111
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
692
693
111
    const size_t size = op.priv.ToTrimmedString().size();
694
695
111
    if ( size == 0 || size > 4096 ) {
696
0
        return std::nullopt;
697
0
    }
698
699
111
    return module->OpSchnorr_Sign(op);
700
111
}
701
702
/* Specialization for operation::ECCSI_Verify */
703
113
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
113
    (void)module;
705
113
    (void)op;
706
113
    (void)result;
707
113
}
708
709
113
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
710
113
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
711
113
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
712
713
113
    return module->OpECCSI_Verify(op);
714
113
}
715
716
/* Specialization for operation::ECDSA_Verify */
717
779
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
779
    (void)module;
719
779
    (void)op;
720
779
    (void)result;
721
779
}
722
723
779
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
724
779
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
779
    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
779
    return module->OpECDSA_Verify(op);
738
779
}
739
740
/* Specialization for operation::ECGDSA_Verify */
741
406
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
406
    (void)module;
743
406
    (void)op;
744
406
    (void)result;
745
406
}
746
747
406
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
748
406
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
749
406
    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
406
    return module->OpECGDSA_Verify(op);
762
406
}
763
764
/* Specialization for operation::ECRDSA_Verify */
765
107
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
107
    (void)module;
767
107
    (void)op;
768
107
    (void)result;
769
107
}
770
771
107
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
772
107
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
773
107
    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
107
    return module->OpECRDSA_Verify(op);
786
107
}
787
788
/* Specialization for operation::Schnorr_Verify */
789
116
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
116
    (void)module;
791
116
    (void)op;
792
116
    (void)result;
793
116
}
794
795
116
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
796
116
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
797
116
    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
116
    return module->OpSchnorr_Verify(op);
810
116
}
811
812
1.10k
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.10k
    (void)module;
814
1.10k
    (void)op;
815
1.10k
    (void)result;
816
1.10k
}
817
818
1.10k
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.10k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
820
1.10k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
821
822
1.10k
    return module->OpECDSA_Recover(op);
823
1.10k
}
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
148
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
148
    (void)module;
835
148
    (void)op;
836
148
    (void)result;
837
148
}
838
839
148
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
840
148
    const std::vector<size_t> sizes = {
841
148
        op.parameters.p.ToTrimmedString().size(),
842
148
        op.parameters.q.ToTrimmedString().size(),
843
148
        op.parameters.g.ToTrimmedString().size(),
844
148
        op.pub.ToTrimmedString().size(),
845
148
        op.signature.first.ToTrimmedString().size(),
846
148
        op.signature.second.ToTrimmedString().size(),
847
148
    };
848
849
888
    for (const auto& size : sizes) {
850
888
        if ( size == 0 || size > 4096 ) {
851
0
            return std::nullopt;
852
0
        }
853
888
    }
854
855
148
    return module->OpDSA_Verify(op);
856
148
}
857
858
/* Specialization for operation::DSA_Sign */
859
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
860
template <>
861
50
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
50
    (void)operations;
863
50
    (void)results;
864
50
    (void)data;
865
50
    (void)size;
866
50
}
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
186
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
186
    (void)module;
876
186
    (void)op;
877
186
    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
186
}
900
901
186
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
186
    const std::vector<size_t> sizes = {
903
186
        op.parameters.p.ToTrimmedString().size(),
904
186
        op.parameters.q.ToTrimmedString().size(),
905
186
        op.parameters.g.ToTrimmedString().size(),
906
186
        op.priv.ToTrimmedString().size(),
907
186
    };
908
909
729
    for (const auto& size : sizes) {
910
729
        if ( size == 0 || size > 4096 ) {
911
5
            return std::nullopt;
912
5
        }
913
729
    }
914
915
181
    return module->OpDSA_Sign(op);
916
186
}
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
96
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
96
    (void)result;
929
96
    (void)module;
930
96
    if ( result.second != std::nullopt ) {
931
        //Pool_DSA_PubPriv.Set({pub, priv});
932
0
    }
933
96
}
934
935
96
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
936
96
    return module->OpDSA_PrivateToPublic(op);
937
96
}
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
43
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
43
    (void)operations;
945
43
    (void)results;
946
43
    (void)data;
947
43
    (void)size;
948
43
}
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
145
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
145
    (void)result;
959
145
    (void)module;
960
145
    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
145
}
967
968
145
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
145
    const std::vector<size_t> sizes = {
970
145
        op.p.ToTrimmedString().size(),
971
145
        op.q.ToTrimmedString().size(),
972
145
        op.g.ToTrimmedString().size(),
973
145
    };
974
975
435
    for (const auto& size : sizes) {
976
435
        if ( size == 0 || size > 4096 ) {
977
0
            return std::nullopt;
978
0
        }
979
435
    }
980
981
145
    return module->OpDSA_GenerateKeyPair(op);
982
145
}
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
31
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
31
    (void)operations;
990
31
    (void)results;
991
31
    (void)data;
992
31
    (void)size;
993
31
}
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
116
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
116
    (void)result;
1004
116
    (void)module;
1005
116
    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
116
}
1017
1018
116
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
116
    return module->OpDSA_GenerateParameters(op);
1020
116
}
1021
1022
/* Specialization for operation::ECDH_Derive */
1023
137
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
137
    (void)module;
1025
137
    (void)op;
1026
137
    (void)result;
1027
137
}
1028
1029
137
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1030
137
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1031
1032
137
    return module->OpECDH_Derive(op);
1033
137
}
1034
1035
/* Specialization for operation::ECIES_Encrypt */
1036
template <>
1037
31
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
31
    (void)operations;
1039
31
    (void)results;
1040
31
    (void)data;
1041
31
    (void)size;
1042
31
}
1043
114
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
114
    (void)module;
1045
114
    (void)op;
1046
114
    (void)result;
1047
114
}
1048
1049
114
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1050
114
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1051
1052
114
    return module->OpECIES_Encrypt(op);
1053
114
}
1054
1055
/* Specialization for operation::ECIES_Decrypt */
1056
124
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
124
    (void)module;
1058
124
    (void)op;
1059
124
    (void)result;
1060
124
}
1061
1062
124
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1063
124
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1064
1065
124
    return module->OpECIES_Decrypt(op);
1066
124
}
1067
1068
/* Specialization for operation::ECC_Point_Add */
1069
236
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
236
    (void)module;
1071
1072
236
    if ( result.second != std::nullopt  ) {
1073
48
        const auto curveID = op.curveType.Get();
1074
48
        const auto x = result.second->first.ToTrimmedString();
1075
48
        const auto y = result.second->second.ToTrimmedString();
1076
1077
48
        Pool_CurveECC_Point.Set({ curveID, x, y });
1078
1079
48
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1080
48
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1081
48
    }
1082
236
}
1083
1084
236
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
236
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1086
1087
236
    return module->OpECC_Point_Add(op);
1088
236
}
1089
1090
/* Specialization for operation::ECC_Point_Mul */
1091
799
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
799
    (void)module;
1093
1094
799
    if ( result.second != std::nullopt  ) {
1095
130
        const auto curveID = op.curveType.Get();
1096
130
        const auto x = result.second->first.ToTrimmedString();
1097
130
        const auto y = result.second->second.ToTrimmedString();
1098
1099
130
        Pool_CurveECC_Point.Set({ curveID, x, y });
1100
1101
130
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1102
130
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1103
130
    }
1104
799
}
1105
1106
799
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
799
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1108
1109
799
    return module->OpECC_Point_Mul(op);
1110
799
}
1111
1112
/* Specialization for operation::ECC_Point_Neg */
1113
244
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
244
    (void)module;
1115
1116
244
    if ( result.second != std::nullopt  ) {
1117
41
        const auto curveID = op.curveType.Get();
1118
41
        const auto x = result.second->first.ToTrimmedString();
1119
41
        const auto y = result.second->second.ToTrimmedString();
1120
1121
41
        Pool_CurveECC_Point.Set({ curveID, x, y });
1122
1123
41
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1124
41
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1125
41
    }
1126
244
}
1127
1128
244
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
244
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1130
1131
244
    return module->OpECC_Point_Neg(op);
1132
244
}
1133
1134
/* Specialization for operation::ECC_Point_Dbl */
1135
201
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
201
    (void)module;
1137
1138
201
    if ( result.second != std::nullopt  ) {
1139
19
        const auto curveID = op.curveType.Get();
1140
19
        const auto x = result.second->first.ToTrimmedString();
1141
19
        const auto y = result.second->second.ToTrimmedString();
1142
1143
19
        Pool_CurveECC_Point.Set({ curveID, x, y });
1144
1145
19
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1146
19
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1147
19
    }
1148
201
}
1149
1150
201
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
201
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1152
1153
201
    return module->OpECC_Point_Dbl(op);
1154
201
}
1155
1156
/* Specialization for operation::ECC_Point_Cmp */
1157
273
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
273
    (void)module;
1159
273
    (void)result;
1160
273
}
1161
1162
273
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1163
273
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1164
1165
273
    return module->OpECC_Point_Cmp(op);
1166
273
}
1167
1168
/* Specialization for operation::DH_Derive */
1169
588
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
588
    (void)module;
1171
588
    (void)op;
1172
588
    (void)result;
1173
588
}
1174
1175
588
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1176
588
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1177
577
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1178
566
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1179
555
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1180
1181
544
    return module->OpDH_Derive(op);
1182
555
}
1183
1184
/* Specialization for operation::DH_GenerateKeyPair */
1185
114
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
114
    (void)result;
1187
114
    (void)op;
1188
114
    (void)module;
1189
1190
114
    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
114
}
1198
1199
114
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
114
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1201
105
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1202
1203
105
    return module->OpDH_GenerateKeyPair(op);
1204
105
}
1205
1206
/* Specialization for operation::BignumCalc */
1207
12.7k
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
12.7k
    (void)module;
1209
12.7k
    (void)op;
1210
1211
12.7k
    if ( result.second != std::nullopt  ) {
1212
3.59k
        const auto bignum = result.second->ToTrimmedString();
1213
1214
3.59k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1215
3.59k
            Pool_Bignum.Set(bignum);
1216
3.59k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1217
638
                Pool_Bignum_Primes.Set(bignum);
1218
638
            }
1219
3.59k
        }
1220
3.59k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1221
168
            if ( bignum == "1" ) {
1222
79
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1223
79
            }
1224
168
        }
1225
3.59k
    }
1226
12.7k
}
1227
1228
12.7k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1229
12.7k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1230
1231
    /* Prevent timeouts */
1232
12.7k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1233
12.7k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1234
12.7k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1235
12.7k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1236
1237
12.7k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1238
896
        return std::nullopt;
1239
896
    }
1240
1241
11.8k
    switch ( op.calcOp.Get() ) {
1242
57
        case    CF_CALCOP("SetBit(A,B)"):
1243
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1244
57
            if ( op.bn1.GetSize() > 4 ) {
1245
10
                return std::nullopt;
1246
10
            }
1247
47
            break;
1248
66
        case    CF_CALCOP("Exp(A,B)"):
1249
66
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1250
17
                return std::nullopt;
1251
17
            }
1252
49
            break;
1253
49
        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
47
        case    CF_CALCOP("Exp2(A)"):
1259
47
            if ( op.bn0.GetSize() > 4 ) {
1260
10
                return std::nullopt;
1261
10
            }
1262
37
            break;
1263
11.8k
    }
1264
1265
11.7k
    return module->OpBignumCalc(op);
1266
11.8k
}
1267
1268
/* Specialization for operation::BignumCalc_Fp2 */
1269
197
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
197
    (void)module;
1271
197
    (void)op;
1272
1273
197
    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
197
}
1285
1286
197
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1287
197
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1288
1289
    /* Prevent timeouts */
1290
197
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1291
192
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1292
183
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1293
181
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1294
181
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1295
176
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1296
167
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1297
158
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1298
1299
142
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1300
0
        return std::nullopt;
1301
0
    }
1302
1303
142
    return module->OpBignumCalc_Fp2(op);
1304
142
}
1305
1306
/* Specialization for operation::BignumCalc_Fp12 */
1307
636
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
636
    (void)module;
1309
636
    (void)op;
1310
1311
636
    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
636
}
1340
1341
636
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1342
636
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1343
1344
    /* Prevent timeouts */
1345
636
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1346
627
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1347
619
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1348
610
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1349
601
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1350
592
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1351
583
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1352
574
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1353
565
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1354
556
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1355
547
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1356
538
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1357
1358
529
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1359
520
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1360
511
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1361
502
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1362
493
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1363
484
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1364
475
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1365
466
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1366
457
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1367
448
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1368
439
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1369
430
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1370
1371
421
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1372
412
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1373
403
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1374
394
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1375
385
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1376
376
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1377
367
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1378
358
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1379
349
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1380
340
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1381
331
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1382
322
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1383
1384
313
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1385
304
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1386
295
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1387
286
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1388
277
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1389
268
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1390
259
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1391
250
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1392
241
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1393
232
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1394
223
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1395
214
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1396
1397
205
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1398
0
        return std::nullopt;
1399
0
    }
1400
1401
205
    return module->OpBignumCalc_Fp12(op);
1402
205
}
1403
1404
/* Specialization for operation::BLS_PrivateToPublic */
1405
153
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
153
    (void)module;
1407
1408
153
    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
153
}
1419
1420
153
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
153
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1422
1423
153
    const size_t size = op.priv.ToTrimmedString().size();
1424
1425
153
    if ( size == 0 || size > 4096 ) {
1426
0
        return std::nullopt;
1427
0
    }
1428
1429
153
    return module->OpBLS_PrivateToPublic(op);
1430
153
}
1431
1432
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1433
128
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
128
    (void)module;
1435
128
    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
128
}
1450
1451
128
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
128
    const size_t size = op.priv.ToTrimmedString().size();
1453
1454
128
    if ( size == 0 || size > 4096 ) {
1455
0
        return std::nullopt;
1456
0
    }
1457
1458
128
    return module->OpBLS_PrivateToPublic_G2(op);
1459
128
}
1460
1461
/* Specialization for operation::BLS_Sign */
1462
98
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
98
    (void)module;
1464
1465
98
    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
98
}
1493
1494
98
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
98
    const size_t size = op.priv.ToTrimmedString().size();
1496
1497
98
    if ( size == 0 || size > 4096 ) {
1498
0
        return std::nullopt;
1499
0
    }
1500
1501
98
    return module->OpBLS_Sign(op);
1502
98
}
1503
1504
/* Specialization for operation::BLS_Verify */
1505
126
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
126
    (void)module;
1507
126
    (void)op;
1508
126
    (void)result;
1509
126
}
1510
1511
126
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
126
    return module->OpBLS_Verify(op);
1528
126
}
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
126
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
126
    (void)module;
1572
126
    (void)op;
1573
126
    (void)result;
1574
126
}
1575
1576
126
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1577
126
    return module->OpBLS_BatchVerify(op);
1578
126
}
1579
1580
/* Specialization for operation::BLS_Aggregate_G1 */
1581
114
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
114
    (void)module;
1583
114
    (void)op;
1584
114
    (void)result;
1585
114
}
1586
1587
114
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
114
    return module->OpBLS_Aggregate_G1(op);
1589
114
}
1590
1591
/* Specialization for operation::BLS_Aggregate_G2 */
1592
117
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
117
    (void)module;
1594
117
    (void)op;
1595
117
    (void)result;
1596
117
}
1597
1598
117
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
117
    return module->OpBLS_Aggregate_G2(op);
1600
117
}
1601
1602
/* Specialization for operation::BLS_Pairing */
1603
108
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
108
    (void)module;
1605
108
    (void)op;
1606
1607
108
    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
108
}
1624
1625
108
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1626
108
    return module->OpBLS_Pairing(op);
1627
108
}
1628
1629
/* Specialization for operation::BLS_MillerLoop */
1630
103
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
103
    (void)module;
1632
103
    (void)op;
1633
1634
103
    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
103
}
1651
1652
103
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1653
103
    return module->OpBLS_MillerLoop(op);
1654
103
}
1655
1656
/* Specialization for operation::BLS_FinalExp */
1657
140
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
140
    (void)module;
1659
140
    (void)op;
1660
1661
140
    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
140
}
1678
1679
140
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1680
140
    return module->OpBLS_FinalExp(op);
1681
140
}
1682
1683
/* Specialization for operation::BLS_HashToG1 */
1684
122
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
122
    (void)module;
1686
1687
122
    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
122
}
1698
1699
122
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1700
122
    return module->OpBLS_HashToG1(op);
1701
122
}
1702
1703
/* Specialization for operation::BLS_MapToG1 */
1704
149
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
149
    (void)module;
1706
1707
149
    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
149
}
1718
1719
149
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1720
149
    return module->OpBLS_MapToG1(op);
1721
149
}
1722
1723
/* Specialization for operation::BLS_MapToG2 */
1724
113
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
113
    (void)module;
1726
1727
113
    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
113
}
1742
1743
113
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1744
113
    return module->OpBLS_MapToG2(op);
1745
113
}
1746
1747
/* Specialization for operation::BLS_IsG1OnCurve */
1748
111
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
111
    (void)module;
1750
111
    (void)op;
1751
111
    (void)result;
1752
111
}
1753
1754
111
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1755
111
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1756
111
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1757
1758
111
    return module->OpBLS_IsG1OnCurve(op);
1759
111
}
1760
1761
/* Specialization for operation::BLS_IsG2OnCurve */
1762
130
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
130
    (void)module;
1764
130
    (void)op;
1765
130
    (void)result;
1766
130
}
1767
1768
130
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1769
130
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1770
130
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1771
130
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1772
130
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1773
1774
130
    return module->OpBLS_IsG2OnCurve(op);
1775
130
}
1776
1777
/* Specialization for operation::BLS_GenerateKeyPair */
1778
153
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
153
    (void)module;
1780
1781
153
    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
153
}
1794
1795
153
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
153
    return module->OpBLS_GenerateKeyPair(op);
1797
153
}
1798
1799
/* Specialization for operation::BLS_Decompress_G1 */
1800
109
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
109
    (void)module;
1802
1803
109
    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
109
}
1814
1815
109
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
109
    return module->OpBLS_Decompress_G1(op);
1817
109
}
1818
1819
/* Specialization for operation::BLS_Compress_G1 */
1820
121
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
121
    (void)module;
1822
1823
121
    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
121
}
1829
1830
121
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
121
    return module->OpBLS_Compress_G1(op);
1832
121
}
1833
1834
/* Specialization for operation::BLS_Decompress_G2 */
1835
121
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
121
    (void)module;
1837
1838
121
    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
121
}
1853
1854
121
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
121
    return module->OpBLS_Decompress_G2(op);
1856
121
}
1857
1858
/* Specialization for operation::BLS_Compress_G2 */
1859
120
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
120
    (void)module;
1861
1862
120
    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
120
}
1873
1874
120
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
120
    return module->OpBLS_Compress_G2(op);
1876
120
}
1877
1878
/* Specialization for operation::BLS_G1_Add */
1879
168
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
168
    (void)module;
1881
1882
168
    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
168
}
1893
1894
168
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
168
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1896
168
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1897
168
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1898
159
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1899
150
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1900
1901
141
    return module->OpBLS_G1_Add(op);
1902
150
}
1903
1904
/* Specialization for operation::BLS_G1_Mul */
1905
124
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
124
    (void)module;
1907
1908
124
    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
124
}
1919
1920
124
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
124
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1922
124
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1923
124
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1924
124
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1925
1926
124
    return module->OpBLS_G1_Mul(op);
1927
124
}
1928
1929
/* Specialization for operation::BLS_G1_IsEq */
1930
159
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
159
    (void)module;
1932
159
    (void)op;
1933
159
    (void)result;
1934
159
}
1935
1936
159
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
1937
159
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1938
159
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1939
159
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1940
150
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1941
150
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1942
1943
150
    return module->OpBLS_G1_IsEq(op);
1944
150
}
1945
1946
/* Specialization for operation::BLS_G1_Neg */
1947
122
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
122
    (void)module;
1949
1950
122
    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
122
}
1961
1962
122
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
122
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1964
122
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1965
122
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1966
1967
120
    return module->OpBLS_G1_Neg(op);
1968
122
}
1969
1970
/* Specialization for operation::BLS_G2_Add */
1971
224
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
224
    (void)module;
1973
1974
224
    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
224
}
1989
1990
224
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
224
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1992
224
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1993
215
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1994
205
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1995
196
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1996
187
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1997
178
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1998
169
    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
173
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
173
    (void)module;
2007
2008
173
    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
173
}
2023
2024
173
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
173
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2026
173
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2027
173
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2028
173
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
173
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
173
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2031
2032
173
    return module->OpBLS_G2_Mul(op);
2033
173
}
2034
2035
/* Specialization for operation::BLS_G2_IsEq */
2036
175
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
175
    (void)module;
2038
175
    (void)op;
2039
175
    (void)result;
2040
175
}
2041
2042
175
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2043
175
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2044
175
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2045
166
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2046
164
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2047
155
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2048
155
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2049
145
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2050
134
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2051
124
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2052
2053
115
    return module->OpBLS_G2_IsEq(op);
2054
124
}
2055
2056
/* Specialization for operation::BLS_G2_Neg */
2057
199
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
199
    (void)module;
2059
2060
199
    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
199
}
2075
2076
199
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
199
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2078
199
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2079
190
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2080
181
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2081
172
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2082
2083
161
    return module->OpBLS_G2_Neg(op);
2084
172
}
2085
2086
/* Specialization for operation::Misc */
2087
103
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2088
103
    (void)module;
2089
103
    (void)op;
2090
103
    (void)result;
2091
103
}
2092
2093
103
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2094
103
    return module->OpMisc(op);
2095
103
}
2096
2097
/* Specialization for operation::BLS_HashToG2 */
2098
116
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
116
    (void)module;
2100
2101
116
    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
116
}
2116
2117
116
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2118
116
    return module->OpBLS_HashToG2(op);
2119
116
}
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
108
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
108
    (void)module;
2248
108
    (void)op;
2249
108
    (void)result;
2250
108
}
2251
2252
108
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2253
108
    return module->OpSR25519_Verify(op);
2254
108
}
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
21.8k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
21.8k
    ResultSet ret;
2264
2265
73.9k
    for (const auto& result : results) {
2266
73.9k
        if ( result.second == std::nullopt ) {
2267
52.3k
            continue;
2268
52.3k
        }
2269
2270
21.6k
        ret.push_back(result);
2271
21.6k
    }
2272
2273
21.8k
    return ret;
2274
21.8k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2262
1.54k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
1.54k
    ResultSet ret;
2264
2265
4.58k
    for (const auto& result : results) {
2266
4.58k
        if ( result.second == std::nullopt ) {
2267
2.49k
            continue;
2268
2.49k
        }
2269
2270
2.09k
        ret.push_back(result);
2271
2.09k
    }
2272
2273
1.54k
    return ret;
2274
1.54k
}
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
637
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
637
    ResultSet ret;
2264
2265
2.28k
    for (const auto& result : results) {
2266
2.28k
        if ( result.second == std::nullopt ) {
2267
1.22k
            continue;
2268
1.22k
        }
2269
2270
1.06k
        ret.push_back(result);
2271
1.06k
    }
2272
2273
637
    return ret;
2274
637
}
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
503
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
503
    ResultSet ret;
2264
2265
2.86k
    for (const auto& result : results) {
2266
2.86k
        if ( result.second == std::nullopt ) {
2267
1.47k
            continue;
2268
1.47k
        }
2269
2270
1.39k
        ret.push_back(result);
2271
1.39k
    }
2272
2273
503
    return ret;
2274
503
}
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
661
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
661
    ResultSet ret;
2264
2265
2.48k
    for (const auto& result : results) {
2266
2.48k
        if ( result.second == std::nullopt ) {
2267
1.39k
            continue;
2268
1.39k
        }
2269
2270
1.09k
        ret.push_back(result);
2271
1.09k
    }
2272
2273
661
    return ret;
2274
661
}
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
2.59k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
2.59k
    ResultSet ret;
2264
2265
11.9k
    for (const auto& result : results) {
2266
11.9k
        if ( result.second == std::nullopt ) {
2267
8.08k
            continue;
2268
8.08k
        }
2269
2270
3.91k
        ret.push_back(result);
2271
3.91k
    }
2272
2273
2.59k
    return ret;
2274
2.59k
}
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
2.42k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
2.42k
    ResultSet ret;
2264
2265
9.60k
    for (const auto& result : results) {
2266
9.60k
        if ( result.second == std::nullopt ) {
2267
8.73k
            continue;
2268
8.73k
        }
2269
2270
869
        ret.push_back(result);
2271
869
    }
2272
2273
2.42k
    return ret;
2274
2.42k
}
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
119
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
119
    ResultSet ret;
2264
2265
782
    for (const auto& result : results) {
2266
782
        if ( result.second == std::nullopt ) {
2267
566
            continue;
2268
566
        }
2269
2270
216
        ret.push_back(result);
2271
216
    }
2272
2273
119
    return ret;
2274
119
}
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.56k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
1.56k
    ResultSet ret;
2264
2265
4.96k
    for (const auto& result : results) {
2266
4.96k
        if ( result.second == std::nullopt ) {
2267
2.85k
            continue;
2268
2.85k
        }
2269
2270
2.11k
        ret.push_back(result);
2271
2.11k
    }
2272
2273
1.56k
    return ret;
2274
1.56k
}
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
58
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
58
    ResultSet ret;
2264
2265
388
    for (const auto& result : results) {
2266
388
        if ( result.second == std::nullopt ) {
2267
388
            continue;
2268
388
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
58
    return ret;
2274
58
}
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
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
40
    ResultSet ret;
2264
2265
313
    for (const auto& result : results) {
2266
313
        if ( result.second == std::nullopt ) {
2267
313
            continue;
2268
313
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
40
    return ret;
2274
40
}
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
54
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
54
    ResultSet ret;
2264
2265
376
    for (const auto& result : results) {
2266
376
        if ( result.second == std::nullopt ) {
2267
376
            continue;
2268
376
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
54
    return ret;
2274
54
}
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
391
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
391
    ResultSet ret;
2264
2265
1.55k
    for (const auto& result : results) {
2266
1.55k
        if ( result.second == std::nullopt ) {
2267
785
            continue;
2268
785
        }
2269
2270
771
        ret.push_back(result);
2271
771
    }
2272
2273
391
    return ret;
2274
391
}
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
238
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
238
    ResultSet ret;
2264
2265
570
    for (const auto& result : results) {
2266
570
        if ( result.second == std::nullopt ) {
2267
309
            continue;
2268
309
        }
2269
2270
261
        ret.push_back(result);
2271
261
    }
2272
2273
238
    return ret;
2274
238
}
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
57
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
57
    ResultSet ret;
2264
2265
410
    for (const auto& result : results) {
2266
410
        if ( result.second == std::nullopt ) {
2267
410
            continue;
2268
410
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
57
    return ret;
2274
57
}
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
49
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
49
    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
49
    return ret;
2274
49
}
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
67
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
67
    ResultSet ret;
2264
2265
152
    for (const auto& result : results) {
2266
152
        if ( result.second == std::nullopt ) {
2267
112
            continue;
2268
112
        }
2269
2270
40
        ret.push_back(result);
2271
40
    }
2272
2273
67
    return ret;
2274
67
}
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
304
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
304
    ResultSet ret;
2264
2265
1.43k
    for (const auto& result : results) {
2266
1.43k
        if ( result.second == std::nullopt ) {
2267
912
            continue;
2268
912
        }
2269
2270
527
        ret.push_back(result);
2271
527
    }
2272
2273
304
    return ret;
2274
304
}
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
670
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
670
    ResultSet ret;
2264
2265
1.57k
    for (const auto& result : results) {
2266
1.57k
        if ( result.second == std::nullopt ) {
2267
999
            continue;
2268
999
        }
2269
2270
577
        ret.push_back(result);
2271
577
    }
2272
2273
670
    return ret;
2274
670
}
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
510
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
510
    ResultSet ret;
2264
2265
1.19k
    for (const auto& result : results) {
2266
1.19k
        if ( result.second == std::nullopt ) {
2267
260
            continue;
2268
260
        }
2269
2270
938
        ret.push_back(result);
2271
938
    }
2272
2273
510
    return ret;
2274
510
}
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
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::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
625
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
625
    ResultSet ret;
2264
2265
1.77k
    for (const auto& result : results) {
2266
1.77k
        if ( result.second == std::nullopt ) {
2267
934
            continue;
2268
934
        }
2269
2270
845
        ret.push_back(result);
2271
845
    }
2272
2273
625
    return ret;
2274
625
}
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
133
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
133
    ResultSet ret;
2264
2265
460
    for (const auto& result : results) {
2266
460
        if ( result.second == std::nullopt ) {
2267
395
            continue;
2268
395
        }
2269
2270
65
        ret.push_back(result);
2271
65
    }
2272
2273
133
    return ret;
2274
133
}
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
44
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
44
    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
44
    return ret;
2274
44
}
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
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
30
    ResultSet ret;
2264
2265
111
    for (const auto& result : results) {
2266
111
        if ( result.second == std::nullopt ) {
2267
111
            continue;
2268
111
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
30
    return ret;
2274
30
}
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
29
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
29
    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
29
    return ret;
2274
29
}
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
259
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
259
    ResultSet ret;
2264
2265
779
    for (const auto& result : results) {
2266
779
        if ( result.second == std::nullopt ) {
2267
387
            continue;
2268
387
        }
2269
2270
392
        ret.push_back(result);
2271
392
    }
2272
2273
259
    return ret;
2274
259
}
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
124
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
124
    ResultSet ret;
2264
2265
406
    for (const auto& result : results) {
2266
406
        if ( result.second == std::nullopt ) {
2267
249
            continue;
2268
249
        }
2269
2270
157
        ret.push_back(result);
2271
157
    }
2272
2273
124
    return ret;
2274
124
}
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
29
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
29
    ResultSet ret;
2264
2265
107
    for (const auto& result : results) {
2266
107
        if ( result.second == std::nullopt ) {
2267
107
            continue;
2268
107
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
29
    return ret;
2274
29
}
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
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
30
    ResultSet ret;
2264
2265
116
    for (const auto& result : results) {
2266
116
        if ( result.second == std::nullopt ) {
2267
116
            continue;
2268
116
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
30
    return ret;
2274
30
}
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
437
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
437
    ResultSet ret;
2264
2265
1.10k
    for (const auto& result : results) {
2266
1.10k
        if ( result.second == std::nullopt ) {
2267
699
            continue;
2268
699
        }
2269
2270
403
        ret.push_back(result);
2271
403
    }
2272
2273
437
    return ret;
2274
437
}
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
46
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
46
    ResultSet ret;
2264
2265
148
    for (const auto& result : results) {
2266
148
        if ( result.second == std::nullopt ) {
2267
148
            continue;
2268
148
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
46
    return ret;
2274
46
}
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
27
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
27
    ResultSet ret;
2264
2265
96
    for (const auto& result : results) {
2266
96
        if ( result.second == std::nullopt ) {
2267
96
            continue;
2268
96
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
27
    return ret;
2274
27
}
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
36
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
36
    ResultSet ret;
2264
2265
137
    for (const auto& result : results) {
2266
137
        if ( result.second == std::nullopt ) {
2267
137
            continue;
2268
137
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
36
    return ret;
2274
36
}
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
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
33
    ResultSet ret;
2264
2265
124
    for (const auto& result : results) {
2266
124
        if ( result.second == std::nullopt ) {
2267
124
            continue;
2268
124
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
33
    return ret;
2274
33
}
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
67
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
67
    ResultSet ret;
2264
2265
236
    for (const auto& result : results) {
2266
236
        if ( result.second == std::nullopt ) {
2267
188
            continue;
2268
188
        }
2269
2270
48
        ret.push_back(result);
2271
48
    }
2272
2273
67
    return ret;
2274
67
}
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
324
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
324
    ResultSet ret;
2264
2265
799
    for (const auto& result : results) {
2266
799
        if ( result.second == std::nullopt ) {
2267
669
            continue;
2268
669
        }
2269
2270
130
        ret.push_back(result);
2271
130
    }
2272
2273
324
    return ret;
2274
324
}
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
75
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
75
    ResultSet ret;
2264
2265
244
    for (const auto& result : results) {
2266
244
        if ( result.second == std::nullopt ) {
2267
203
            continue;
2268
203
        }
2269
2270
41
        ret.push_back(result);
2271
41
    }
2272
2273
75
    return ret;
2274
75
}
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
61
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
61
    ResultSet ret;
2264
2265
201
    for (const auto& result : results) {
2266
201
        if ( result.second == std::nullopt ) {
2267
182
            continue;
2268
182
        }
2269
2270
19
        ret.push_back(result);
2271
19
    }
2272
2273
61
    return ret;
2274
61
}
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
273
    for (const auto& result : results) {
2266
273
        if ( result.second == std::nullopt ) {
2267
254
            continue;
2268
254
        }
2269
2270
19
        ret.push_back(result);
2271
19
    }
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
197
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
197
    ResultSet ret;
2264
2265
588
    for (const auto& result : results) {
2266
588
        if ( result.second == std::nullopt ) {
2267
543
            continue;
2268
543
        }
2269
2270
45
        ret.push_back(result);
2271
45
    }
2272
2273
197
    return ret;
2274
197
}
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
5.04k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
5.04k
    ResultSet ret;
2264
2265
12.7k
    for (const auto& result : results) {
2266
12.7k
        if ( result.second == std::nullopt ) {
2267
9.14k
            continue;
2268
9.14k
        }
2269
2270
3.59k
        ret.push_back(result);
2271
3.59k
    }
2272
2273
5.04k
    return ret;
2274
5.04k
}
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
62
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
62
    ResultSet ret;
2264
2265
197
    for (const auto& result : results) {
2266
197
        if ( result.second == std::nullopt ) {
2267
197
            continue;
2268
197
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
62
    return ret;
2274
62
}
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
220
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
220
    ResultSet ret;
2264
2265
636
    for (const auto& result : results) {
2266
636
        if ( result.second == std::nullopt ) {
2267
636
            continue;
2268
636
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
220
    return ret;
2274
220
}
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
41
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
41
    ResultSet ret;
2264
2265
153
    for (const auto& result : results) {
2266
153
        if ( result.second == std::nullopt ) {
2267
153
            continue;
2268
153
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
41
    return ret;
2274
41
}
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
38
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
38
    ResultSet ret;
2264
2265
128
    for (const auto& result : results) {
2266
128
        if ( result.second == std::nullopt ) {
2267
128
            continue;
2268
128
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
38
    return ret;
2274
38
}
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
28
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
28
    ResultSet ret;
2264
2265
98
    for (const auto& result : results) {
2266
98
        if ( result.second == std::nullopt ) {
2267
98
            continue;
2268
98
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
28
    return ret;
2274
28
}
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
35
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
35
    ResultSet ret;
2264
2265
126
    for (const auto& result : results) {
2266
126
        if ( result.second == std::nullopt ) {
2267
126
            continue;
2268
126
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
35
    return ret;
2274
35
}
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
38
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
38
    ResultSet ret;
2264
2265
126
    for (const auto& result : results) {
2266
126
        if ( result.second == std::nullopt ) {
2267
126
            continue;
2268
126
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
38
    return ret;
2274
38
}
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
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
33
    ResultSet ret;
2264
2265
114
    for (const auto& result : results) {
2266
114
        if ( result.second == std::nullopt ) {
2267
114
            continue;
2268
114
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
33
    return ret;
2274
33
}
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
32
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
32
    ResultSet ret;
2264
2265
117
    for (const auto& result : results) {
2266
117
        if ( result.second == std::nullopt ) {
2267
117
            continue;
2268
117
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
32
    return ret;
2274
32
}
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
29
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
29
    ResultSet ret;
2264
2265
108
    for (const auto& result : results) {
2266
108
        if ( result.second == std::nullopt ) {
2267
108
            continue;
2268
108
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
29
    return ret;
2274
29
}
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
28
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
28
    ResultSet ret;
2264
2265
103
    for (const auto& result : results) {
2266
103
        if ( result.second == std::nullopt ) {
2267
103
            continue;
2268
103
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
28
    return ret;
2274
28
}
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
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
43
    ResultSet ret;
2264
2265
140
    for (const auto& result : results) {
2266
140
        if ( result.second == std::nullopt ) {
2267
140
            continue;
2268
140
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
43
    return ret;
2274
43
}
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
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
34
    ResultSet ret;
2264
2265
122
    for (const auto& result : results) {
2266
122
        if ( result.second == std::nullopt ) {
2267
122
            continue;
2268
122
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
34
    return ret;
2274
34
}
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
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
33
    ResultSet ret;
2264
2265
116
    for (const auto& result : results) {
2266
116
        if ( result.second == std::nullopt ) {
2267
116
            continue;
2268
116
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
33
    return ret;
2274
33
}
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
45
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
45
    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
45
    return ret;
2274
45
}
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
31
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
31
    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
31
    return ret;
2274
31
}
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
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
33
    ResultSet ret;
2264
2265
111
    for (const auto& result : results) {
2266
111
        if ( result.second == std::nullopt ) {
2267
111
            continue;
2268
111
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
33
    return ret;
2274
33
}
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
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
43
    ResultSet ret;
2264
2265
130
    for (const auto& result : results) {
2266
130
        if ( result.second == std::nullopt ) {
2267
130
            continue;
2268
130
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
43
    return ret;
2274
43
}
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
44
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
44
    ResultSet ret;
2264
2265
153
    for (const auto& result : results) {
2266
153
        if ( result.second == std::nullopt ) {
2267
153
            continue;
2268
153
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
44
    return ret;
2274
44
}
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
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
30
    ResultSet ret;
2264
2265
109
    for (const auto& result : results) {
2266
109
        if ( result.second == std::nullopt ) {
2267
109
            continue;
2268
109
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
30
    return ret;
2274
30
}
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
35
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
35
    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
35
    return ret;
2274
35
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
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::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
31
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
31
    ResultSet ret;
2264
2265
120
    for (const auto& result : results) {
2266
120
        if ( result.second == std::nullopt ) {
2267
120
            continue;
2268
120
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
31
    return ret;
2274
31
}
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
54
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
54
    ResultSet ret;
2264
2265
168
    for (const auto& result : results) {
2266
168
        if ( result.second == std::nullopt ) {
2267
168
            continue;
2268
168
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
54
    return ret;
2274
54
}
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
36
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
36
    ResultSet ret;
2264
2265
124
    for (const auto& result : results) {
2266
124
        if ( result.second == std::nullopt ) {
2267
124
            continue;
2268
124
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
36
    return ret;
2274
36
}
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
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::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
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
37
    ResultSet ret;
2264
2265
122
    for (const auto& result : results) {
2266
122
        if ( result.second == std::nullopt ) {
2267
122
            continue;
2268
122
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
37
    return ret;
2274
37
}
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
74
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
74
    ResultSet ret;
2264
2265
224
    for (const auto& result : results) {
2266
224
        if ( result.second == std::nullopt ) {
2267
224
            continue;
2268
224
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
74
    return ret;
2274
74
}
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
55
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
55
    ResultSet ret;
2264
2265
173
    for (const auto& result : results) {
2266
173
        if ( result.second == std::nullopt ) {
2267
173
            continue;
2268
173
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
55
    return ret;
2274
55
}
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
55
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
55
    ResultSet ret;
2264
2265
175
    for (const auto& result : results) {
2266
175
        if ( result.second == std::nullopt ) {
2267
175
            continue;
2268
175
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
55
    return ret;
2274
55
}
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
63
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
63
    ResultSet ret;
2264
2265
199
    for (const auto& result : results) {
2266
199
        if ( result.second == std::nullopt ) {
2267
199
            continue;
2268
199
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
63
    return ret;
2274
63
}
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
27
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
27
    ResultSet ret;
2264
2265
103
    for (const auto& result : results) {
2266
103
        if ( result.second == std::nullopt ) {
2267
103
            continue;
2268
103
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
27
    return ret;
2274
27
}
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
28
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
28
    ResultSet ret;
2264
2265
108
    for (const auto& result : results) {
2266
108
        if ( result.second == std::nullopt ) {
2267
108
            continue;
2268
108
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
28
    return ret;
2274
28
}
2275
2276
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2277
template <>
2278
660
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
660
    (void)operations;
2280
660
    (void)results;
2281
660
    (void)data;
2282
660
    (void)size;
2283
660
}
2284
2285
template <class ResultType, class OperationType>
2286
2.24k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
2.24k
    (void)operation;
2288
2289
2.24k
    return false;
2290
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2286
449
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
449
    (void)operation;
2288
2289
449
    return false;
2290
449
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
Line
Count
Source
2286
180
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
180
    (void)operation;
2288
2289
180
    return false;
2290
180
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const
Line
Count
Source
2286
25
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
25
    (void)operation;
2288
2289
25
    return false;
2290
25
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
Line
Count
Source
2286
506
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
506
    (void)operation;
2288
2289
506
    return false;
2290
506
}
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
130
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
130
    (void)operation;
2288
2289
130
    return false;
2290
130
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const
Line
Count
Source
2286
40
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
40
    (void)operation;
2288
2289
40
    return false;
2290
40
}
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
6
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
6
    (void)operation;
2288
2289
6
    return false;
2290
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
Line
Count
Source
2286
71
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
71
    (void)operation;
2288
2289
71
    return false;
2290
71
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::dontCompare(cryptofuzz::operation::ECC_PrivateToPublic const&) const
Line
Count
Source
2286
157
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
157
    (void)operation;
2288
2289
157
    return false;
2290
157
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2286
398
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
398
    (void)operation;
2288
2289
398
    return false;
2290
398
}
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
113
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
113
    (void)operation;
2288
2289
113
    return false;
2290
113
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify 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
}
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
50
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
50
    (void)operation;
2288
2289
50
    return false;
2290
50
}
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
15
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
15
    (void)operation;
2288
2289
15
    return false;
2290
15
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const
Line
Count
Source
2286
40
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
40
    (void)operation;
2288
2289
40
    return false;
2290
40
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2286
12
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
12
    (void)operation;
2288
2289
12
    return false;
2290
12
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl 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<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2286
5
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
5
    (void)operation;
2288
2289
5
    return false;
2290
5
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DH_GenerateKeyPair const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::dontCompare(cryptofuzz::operation::DH_Derive const&) const
Line
Count
Source
2286
8
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
8
    (void)operation;
2288
2289
8
    return false;
2290
8
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::dontCompare(cryptofuzz::operation::BignumCalc_Fp2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::dontCompare(cryptofuzz::operation::BignumCalc_Fp12 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::dontCompare(cryptofuzz::operation::BLS_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::dontCompare(cryptofuzz::operation::BLS_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::dontCompare(cryptofuzz::operation::BLS_BatchSign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::dontCompare(cryptofuzz::operation::BLS_BatchVerify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::dontCompare(cryptofuzz::operation::BLS_Pairing const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::dontCompare(cryptofuzz::operation::BLS_MillerLoop const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::dontCompare(cryptofuzz::operation::BLS_FinalExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::dontCompare(cryptofuzz::operation::BLS_HashToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::dontCompare(cryptofuzz::operation::BLS_HashToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::dontCompare(cryptofuzz::operation::BLS_MapToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::dontCompare(cryptofuzz::operation::BLS_MapToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG1OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG2OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::dontCompare(cryptofuzz::operation::BLS_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::dontCompare(cryptofuzz::operation::BLS_Decompress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::dontCompare(cryptofuzz::operation::BLS_Compress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::dontCompare(cryptofuzz::operation::BLS_Decompress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::dontCompare(cryptofuzz::operation::BLS_Compress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::dontCompare(cryptofuzz::operation::BLS_G1_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::dontCompare(cryptofuzz::operation::BLS_G1_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::dontCompare(cryptofuzz::operation::BLS_G1_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::dontCompare(cryptofuzz::operation::BLS_G1_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::dontCompare(cryptofuzz::operation::BLS_G2_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::dontCompare(cryptofuzz::operation::BLS_G2_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::dontCompare(cryptofuzz::operation::BLS_G2_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::dontCompare(cryptofuzz::operation::BLS_G2_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::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
768
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2294
768
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2295
768
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2296
2297
638
    return false;
2298
768
}
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
151
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2307
151
    if (
2308
151
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2309
151
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2310
101
        if ( operation.UseRandomNonce() ) {
2311
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2312
76
            return true;
2313
76
        }
2314
101
    }
2315
2316
75
    return false;
2317
151
}
2318
2319
template <>
2320
14
bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const {
2321
14
    if (
2322
14
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2323
14
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2324
14
        if ( operation.UseRandomNonce() ) {
2325
            /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */
2326
14
            return true;
2327
14
        }
2328
14
    }
2329
2330
0
    return false;
2331
14
}
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
608
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2350
608
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2351
2352
608
    return false;
2353
608
}
2354
2355
template <>
2356
134
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2357
134
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2358
2359
134
    return false;
2360
134
}
2361
2362
template <>
2363
164
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2364
164
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2365
2366
164
    return false;
2367
164
}
2368
2369
template <>
2370
209
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2371
209
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2372
2373
208
    return false;
2374
209
}
2375
2376
template <class ResultType, class OperationType>
2377
21.8k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
21.8k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
21.8k
    const auto filtered = filter(results);
2384
2385
21.8k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
17.5k
        return;
2388
17.5k
    }
2389
2390
4.29k
    if ( dontCompare(operations[0].second) == true ) {
2391
221
        return;
2392
221
    }
2393
2394
17.3k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
13.2k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
13.2k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
13.2k
        const bool equal = *prev == *cur;
2399
2400
13.2k
        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.2k
    }
2417
4.07k
}
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
1.54k
void ExecutorBase<ResultType, OperationType>::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.54k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
1.54k
    const auto filtered = filter(results);
2384
2385
1.54k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
1.10k
        return;
2388
1.10k
    }
2389
2390
449
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
1.93k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
1.49k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
1.49k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
1.49k
        const bool equal = *prev == *cur;
2399
2400
1.49k
        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.49k
    }
2417
449
}
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
637
void ExecutorBase<ResultType, OperationType>::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
637
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
637
    const auto filtered = filter(results);
2384
2385
637
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
428
        return;
2388
428
    }
2389
2390
209
    if ( dontCompare(operations[0].second) == true ) {
2391
1
        return;
2392
1
    }
2393
2394
1.01k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
806
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
806
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
806
        const bool equal = *prev == *cur;
2399
2400
806
        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
806
    }
2417
208
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::UMAC>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::UMAC> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2377
503
void ExecutorBase<ResultType, OperationType>::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
503
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
503
    const auto filtered = filter(results);
2384
2385
503
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
323
        return;
2388
323
    }
2389
2390
180
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
1.24k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
1.06k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
1.06k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
1.06k
        const bool equal = *prev == *cur;
2399
2400
1.06k
        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.06k
    }
2417
180
}
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
661
void ExecutorBase<ResultType, OperationType>::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
661
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
661
    const auto filtered = filter(results);
2384
2385
661
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
497
        return;
2388
497
    }
2389
2390
164
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
922
    for (size_t i = 1; i < filtered.size(); i++) {
2395
758
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
758
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
758
        const bool equal = *prev == *cur;
2399
2400
758
        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
758
    }
2417
164
}
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
2.59k
void ExecutorBase<ResultType, OperationType>::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.59k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
2.59k
    const auto filtered = filter(results);
2384
2385
2.59k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
1.99k
        return;
2388
1.99k
    }
2389
2390
608
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
3.71k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
3.10k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
3.10k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
3.10k
        const bool equal = *prev == *cur;
2399
2400
3.10k
        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
3.10k
    }
2417
608
}
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
2.42k
void ExecutorBase<ResultType, OperationType>::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.42k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
2.42k
    const auto filtered = filter(results);
2384
2385
2.42k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
2.28k
        return;
2388
2.28k
    }
2389
2390
134
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
793
    for (size_t i = 1; i < filtered.size(); i++) {
2395
659
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
659
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
659
        const bool equal = *prev == *cur;
2399
2400
659
        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
659
    }
2417
134
}
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
119
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
119
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
119
    const auto filtered = filter(results);
2384
2385
119
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
94
        return;
2388
94
    }
2389
2390
25
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
190
    for (size_t i = 1; i < filtered.size(); i++) {
2395
165
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
165
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
165
        const bool equal = *prev == *cur;
2399
2400
165
        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
165
    }
2417
25
}
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.56k
void ExecutorBase<ResultType, OperationType>::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.56k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
1.56k
    const auto filtered = filter(results);
2384
2385
1.56k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
1.05k
        return;
2388
1.05k
    }
2389
2390
506
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
1.96k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
1.45k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
1.45k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
1.45k
        const bool equal = *prev == *cur;
2399
2400
1.45k
        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.45k
    }
2417
506
}
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
58
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
58
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
58
    const auto filtered = filter(results);
2384
2385
58
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
58
        return;
2388
58
    }
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
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::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
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::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
391
void ExecutorBase<ResultType, OperationType>::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
391
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
391
    const auto filtered = filter(results);
2384
2385
391
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
261
        return;
2388
261
    }
2389
2390
130
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
652
    for (size_t i = 1; i < filtered.size(); i++) {
2395
522
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
522
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
522
        const bool equal = *prev == *cur;
2399
2400
522
        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
522
    }
2417
130
}
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
238
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
238
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
238
    const auto filtered = filter(results);
2384
2385
238
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
198
        return;
2388
198
    }
2389
2390
40
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
99
    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
40
}
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
57
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
57
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
57
    const auto filtered = filter(results);
2384
2385
57
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
57
        return;
2388
57
    }
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
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::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
67
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
67
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
67
    const auto filtered = filter(results);
2384
2385
67
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
61
        return;
2388
61
    }
2389
2390
6
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
12
    for (size_t i = 1; i < filtered.size(); i++) {
2395
6
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
6
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
6
        const bool equal = *prev == *cur;
2399
2400
6
        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
6
    }
2417
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2377
304
void ExecutorBase<ResultType, OperationType>::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
304
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
304
    const auto filtered = filter(results);
2384
2385
304
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
233
        return;
2388
233
    }
2389
2390
71
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
387
    for (size_t i = 1; i < filtered.size(); i++) {
2395
316
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
316
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
316
        const bool equal = *prev == *cur;
2399
2400
316
        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
316
    }
2417
71
}
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
670
void ExecutorBase<ResultType, OperationType>::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
670
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
670
    const auto filtered = filter(results);
2384
2385
670
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
513
        return;
2388
513
    }
2389
2390
157
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
414
    for (size_t i = 1; i < filtered.size(); i++) {
2395
257
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
257
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
257
        const bool equal = *prev == *cur;
2399
2400
257
        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
257
    }
2417
157
}
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
510
void ExecutorBase<ResultType, OperationType>::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
510
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
510
    const auto filtered = filter(results);
2384
2385
510
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
112
        return;
2388
112
    }
2389
2390
398
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
912
    for (size_t i = 1; i < filtered.size(); i++) {
2395
514
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
514
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
514
        const bool equal = *prev == *cur;
2399
2400
514
        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
514
    }
2417
398
}
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
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::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
625
void ExecutorBase<ResultType, OperationType>::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
625
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
625
    const auto filtered = filter(results);
2384
2385
625
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
474
        return;
2388
474
    }
2389
2390
151
    if ( dontCompare(operations[0].second) == true ) {
2391
76
        return;
2392
76
    }
2393
2394
269
    for (size_t i = 1; i < filtered.size(); i++) {
2395
194
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
194
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
194
        const bool equal = *prev == *cur;
2399
2400
194
        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
194
    }
2417
75
}
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
133
void ExecutorBase<ResultType, OperationType>::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
133
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
133
    const auto filtered = filter(results);
2384
2385
133
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
119
        return;
2388
119
    }
2389
2390
14
    if ( dontCompare(operations[0].second) == true ) {
2391
14
        return;
2392
14
    }
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
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::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
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::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
29
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
29
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
29
    const auto filtered = filter(results);
2384
2385
29
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
29
        return;
2388
29
    }
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
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
146
        return;
2388
146
    }
2389
2390
113
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
329
    for (size_t i = 1; i < filtered.size(); i++) {
2395
216
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
216
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
216
        const bool equal = *prev == *cur;
2399
2400
216
        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
216
    }
2417
113
}
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
124
void ExecutorBase<ResultType, OperationType>::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
124
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
124
    const auto filtered = filter(results);
2384
2385
124
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
85
        return;
2388
85
    }
2389
2390
39
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
119
    for (size_t i = 1; i < filtered.size(); i++) {
2395
80
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
80
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
80
        const bool equal = *prev == *cur;
2399
2400
80
        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
80
    }
2417
39
}
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
29
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
29
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
29
    const auto filtered = filter(results);
2384
2385
29
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
29
        return;
2388
29
    }
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
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<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
437
void ExecutorBase<ResultType, OperationType>::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
437
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
437
    const auto filtered = filter(results);
2384
2385
437
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
387
        return;
2388
387
    }
2389
2390
50
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
148
    for (size_t i = 1; i < filtered.size(); i++) {
2395
98
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
98
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
98
        const bool equal = *prev == *cur;
2399
2400
98
        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
98
    }
2417
50
}
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
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::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
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::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
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::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
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::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
67
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
67
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
67
    const auto filtered = filter(results);
2384
2385
67
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
52
        return;
2388
52
    }
2389
2390
15
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
43
    for (size_t i = 1; i < filtered.size(); i++) {
2395
28
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
28
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
28
        const bool equal = *prev == *cur;
2399
2400
28
        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
28
    }
2417
15
}
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
324
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
324
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
324
    const auto filtered = filter(results);
2384
2385
324
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
284
        return;
2388
284
    }
2389
2390
40
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
113
    for (size_t i = 1; i < filtered.size(); i++) {
2395
73
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
73
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
73
        const bool equal = *prev == *cur;
2399
2400
73
        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
73
    }
2417
40
}
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
75
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
75
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
75
    const auto filtered = filter(results);
2384
2385
75
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
63
        return;
2388
63
    }
2389
2390
12
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
36
    for (size_t i = 1; i < filtered.size(); i++) {
2395
24
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
24
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
24
        const bool equal = *prev == *cur;
2399
2400
24
        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
24
    }
2417
12
}
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
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
57
        return;
2388
57
    }
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<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
73
        return;
2388
73
    }
2389
2390
5
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
18
    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
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DH_Derive>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DH_Derive> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2377
197
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
197
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
197
    const auto filtered = filter(results);
2384
2385
197
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
189
        return;
2388
189
    }
2389
2390
8
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
26
    for (size_t i = 1; i < filtered.size(); i++) {
2395
18
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
18
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
18
        const bool equal = *prev == *cur;
2399
2400
18
        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
18
    }
2417
8
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2377
5.04k
void ExecutorBase<ResultType, OperationType>::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
5.04k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
5.04k
    const auto filtered = filter(results);
2384
2385
5.04k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
4.27k
        return;
2388
4.27k
    }
2389
2390
768
    if ( dontCompare(operations[0].second) == true ) {
2391
130
        return;
2392
130
    }
2393
2394
1.94k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
1.30k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
1.30k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
1.30k
        const bool equal = *prev == *cur;
2399
2400
1.30k
        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.30k
    }
2417
638
}
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
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<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
220
void ExecutorBase<ResultType, OperationType>::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
220
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
220
    const auto filtered = filter(results);
2384
2385
220
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
220
        return;
2388
220
    }
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
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::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
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::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
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<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
35
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
35
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
35
    const auto filtered = filter(results);
2384
2385
35
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
35
        return;
2388
35
    }
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
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_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
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::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
32
void ExecutorBase<ResultType, OperationType>::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
32
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
32
    const auto filtered = filter(results);
2384
2385
32
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
32
        return;
2388
32
    }
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
29
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
29
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
29
    const auto filtered = filter(results);
2384
2385
29
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
29
        return;
2388
29
    }
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
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::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
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::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
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_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
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::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
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::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
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::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
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<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
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::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
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::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
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<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
35
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
35
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
35
    const auto filtered = filter(results);
2384
2385
35
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
35
        return;
2388
35
    }
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
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::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
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<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
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::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
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<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
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::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
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::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
74
void ExecutorBase<ResultType, OperationType>::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
74
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
74
    const auto filtered = filter(results);
2384
2385
74
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
74
        return;
2388
74
    }
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
55
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
55
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
55
    const auto filtered = filter(results);
2384
2385
55
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
55
        return;
2388
55
    }
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
55
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
55
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
55
    const auto filtered = filter(results);
2384
2385
55
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
55
        return;
2388
55
    }
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
63
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
63
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
63
    const auto filtered = filter(results);
2384
2385
63
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
63
        return;
2388
63
    }
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
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<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
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
}
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
218k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
218k
    (void)parentDs;
2440
218k
    return std::move(op);
2441
218k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2438
5.38k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.38k
    (void)parentDs;
2440
5.38k
    return std::move(op);
2441
5.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2438
3.55k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.55k
    (void)parentDs;
2440
3.55k
    return std::move(op);
2441
3.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2438
5.01k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.01k
    (void)parentDs;
2440
5.01k
    return std::move(op);
2441
5.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2438
4.00k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.00k
    (void)parentDs;
2440
4.00k
    return std::move(op);
2441
4.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2438
14.7k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
14.7k
    (void)parentDs;
2440
14.7k
    return std::move(op);
2441
14.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2438
11.0k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
11.0k
    (void)parentDs;
2440
11.0k
    return std::move(op);
2441
11.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2438
2.88k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.88k
    (void)parentDs;
2440
2.88k
    return std::move(op);
2441
2.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2438
5.98k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.98k
    (void)parentDs;
2440
5.98k
    return std::move(op);
2441
5.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2438
2.68k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.68k
    (void)parentDs;
2440
2.68k
    return std::move(op);
2441
2.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) 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::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2438
2.04k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.04k
    (void)parentDs;
2440
2.04k
    return std::move(op);
2441
2.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2438
3.99k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.99k
    (void)parentDs;
2440
3.99k
    return std::move(op);
2441
3.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2438
2.61k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.61k
    (void)parentDs;
2440
2.61k
    return std::move(op);
2441
2.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) 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<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) 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::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2438
2.06k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.06k
    (void)parentDs;
2440
2.06k
    return std::move(op);
2441
2.06k
}
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.58k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.58k
    (void)parentDs;
2440
3.58k
    return std::move(op);
2441
3.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) 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::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) 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::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2438
2.74k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.74k
    (void)parentDs;
2440
2.74k
    return std::move(op);
2441
2.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) 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::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const
Line
Count
Source
2438
3.36k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.36k
    (void)parentDs;
2440
3.36k
    return std::move(op);
2441
3.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2438
2.44k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.44k
    (void)parentDs;
2440
2.44k
    return std::move(op);
2441
2.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const
Line
Count
Source
2438
2.23k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.23k
    (void)parentDs;
2440
2.23k
    return std::move(op);
2441
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2438
2.53k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.53k
    (void)parentDs;
2440
2.53k
    return std::move(op);
2441
2.53k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2438
2.60k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.60k
    (void)parentDs;
2440
2.60k
    return std::move(op);
2441
2.60k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) 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<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2438
2.39k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.39k
    (void)parentDs;
2440
2.39k
    return std::move(op);
2441
2.39k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2438
1.67k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.67k
    (void)parentDs;
2440
1.67k
    return std::move(op);
2441
1.67k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) 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::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2438
2.78k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.78k
    (void)parentDs;
2440
2.78k
    return std::move(op);
2441
2.78k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2438
2.01k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.01k
    (void)parentDs;
2440
2.01k
    return std::move(op);
2441
2.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) 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<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2438
1.74k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.74k
    (void)parentDs;
2440
1.74k
    return std::move(op);
2441
1.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) 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::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) 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<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2438
1.80k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.80k
    (void)parentDs;
2440
1.80k
    return std::move(op);
2441
1.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) 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::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) 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::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2438
1.88k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.88k
    (void)parentDs;
2440
1.88k
    return std::move(op);
2441
1.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) 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::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) 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::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2438
1.74k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.74k
    (void)parentDs;
2440
1.74k
    return std::move(op);
2441
1.74k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2438
2.98k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.98k
    (void)parentDs;
2440
2.98k
    return std::move(op);
2441
2.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2438
2.21k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.21k
    (void)parentDs;
2440
2.21k
    return std::move(op);
2441
2.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) 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::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2438
8.91k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
8.91k
    (void)parentDs;
2440
8.91k
    return std::move(op);
2441
8.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2438
1.93k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.93k
    (void)parentDs;
2440
1.93k
    return std::move(op);
2441
1.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2438
3.28k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.28k
    (void)parentDs;
2440
3.28k
    return std::move(op);
2441
3.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2438
1.69k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.69k
    (void)parentDs;
2440
1.69k
    return std::move(op);
2441
1.69k
}
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.61k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.61k
    (void)parentDs;
2440
1.61k
    return std::move(op);
2441
1.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2438
1.95k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.95k
    (void)parentDs;
2440
1.95k
    return std::move(op);
2441
1.95k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) 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::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) 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<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2438
1.44k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.44k
    (void)parentDs;
2440
1.44k
    return std::move(op);
2441
1.44k
}
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.60k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.60k
    (void)parentDs;
2440
1.60k
    return std::move(op);
2441
1.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2438
1.78k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.78k
    (void)parentDs;
2440
1.78k
    return std::move(op);
2441
1.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2438
2.77k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.77k
    (void)parentDs;
2440
2.77k
    return std::move(op);
2441
2.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2438
1.64k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.64k
    (void)parentDs;
2440
1.64k
    return std::move(op);
2441
1.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2438
2.18k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.18k
    (void)parentDs;
2440
2.18k
    return std::move(op);
2441
2.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2438
2.13k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.13k
    (void)parentDs;
2440
2.13k
    return std::move(op);
2441
2.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2438
2.00k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.00k
    (void)parentDs;
2440
2.00k
    return std::move(op);
2441
2.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2438
1.97k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.97k
    (void)parentDs;
2440
1.97k
    return std::move(op);
2441
1.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2438
1.70k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.70k
    (void)parentDs;
2440
1.70k
    return std::move(op);
2441
1.70k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2438
1.78k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.78k
    (void)parentDs;
2440
1.78k
    return std::move(op);
2441
1.78k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2438
1.94k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.94k
    (void)parentDs;
2440
1.94k
    return std::move(op);
2441
1.94k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) 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::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) 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::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2438
1.97k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.97k
    (void)parentDs;
2440
1.97k
    return std::move(op);
2441
1.97k
}
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.50k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.50k
    (void)parentDs;
2440
1.50k
    return std::move(op);
2441
1.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2438
1.62k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.62k
    (void)parentDs;
2440
1.62k
    return std::move(op);
2441
1.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) 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::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2438
1.79k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.79k
    (void)parentDs;
2440
1.79k
    return std::move(op);
2441
1.79k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2438
2.74k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.74k
    (void)parentDs;
2440
2.74k
    return std::move(op);
2441
2.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2438
1.40k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.40k
    (void)parentDs;
2440
1.40k
    return std::move(op);
2441
1.40k
}
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.00k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.00k
    (void)parentDs;
2440
2.00k
    return std::move(op);
2441
2.00k
}
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.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<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2438
1.57k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.57k
    (void)parentDs;
2440
1.57k
    return std::move(op);
2441
1.57k
}
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.18k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
2.18k
    (void)parentDs;
2440
2.18k
    return std::move(op);
2441
2.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2438
1.34k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.34k
    (void)parentDs;
2440
1.34k
    return std::move(op);
2441
1.34k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2438
1.72k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
1.72k
    (void)parentDs;
2440
1.72k
    return std::move(op);
2441
1.72k
}
2442
2443
330
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2444
330
    (void)parentDs;
2445
330
    op.modulo = modulo;
2446
330
    return op;
2447
330
}
2448
2449
395
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2450
395
    (void)parentDs;
2451
395
    op.modulo = modulo;
2452
395
    return op;
2453
395
}
2454
2455
227
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2456
227
    (void)parentDs;
2457
227
    op.modulo = modulo;
2458
227
    return op;
2459
227
}
2460
2461
288
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2462
288
    (void)parentDs;
2463
288
    op.modulo = modulo;
2464
288
    return op;
2465
288
}
2466
2467
475
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2468
475
    (void)parentDs;
2469
475
    op.modulo = modulo;
2470
475
    return op;
2471
475
}
2472
2473
249
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2474
249
    (void)parentDs;
2475
249
    op.modulo = modulo;
2476
249
    return op;
2477
249
}
2478
2479
367
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2480
367
    (void)parentDs;
2481
367
    op.modulo = modulo;
2482
367
    return op;
2483
367
}
2484
2485
235
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2486
235
    (void)parentDs;
2487
235
    op.modulo = modulo;
2488
235
    return op;
2489
235
}
2490
2491
398
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2492
398
    (void)parentDs;
2493
398
    op.modulo = modulo;
2494
398
    return op;
2495
398
}
2496
2497
403
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2498
403
    (void)parentDs;
2499
403
    op.modulo = modulo;
2500
403
    return op;
2501
403
}
2502
2503
261
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2504
261
    (void)parentDs;
2505
261
    op.modulo = modulo;
2506
261
    return op;
2507
261
}
2508
2509
228
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2510
228
    (void)parentDs;
2511
228
    op.modulo = modulo;
2512
228
    return op;
2513
228
}
2514
2515
238
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2516
238
    (void)parentDs;
2517
238
    op.modulo = modulo;
2518
238
    return op;
2519
238
}
2520
2521
414
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2522
414
    (void)parentDs;
2523
414
    op.modulo = modulo;
2524
414
    return op;
2525
414
}
2526
2527
416
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2528
416
    (void)parentDs;
2529
416
    op.modulo = modulo;
2530
416
    return op;
2531
416
}
2532
2533
429
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2534
429
    (void)parentDs;
2535
429
    op.modulo = modulo;
2536
429
    return op;
2537
429
}
2538
2539
307
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2540
307
    (void)parentDs;
2541
307
    op.modulo = modulo;
2542
307
    return op;
2543
307
}
2544
2545
299
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2546
299
    (void)parentDs;
2547
299
    op.modulo = modulo;
2548
299
    return op;
2549
299
}
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
227k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
227k
    Datasource ds(data, size);
2560
227k
    if ( parentDs != nullptr ) {
2561
227k
        auto modifier = parentDs->GetData(0);
2562
227k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
227k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
227k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.40k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.40k
    Datasource ds(data, size);
2560
5.40k
    if ( parentDs != nullptr ) {
2561
5.40k
        auto modifier = parentDs->GetData(0);
2562
5.40k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.40k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.57k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.57k
    Datasource ds(data, size);
2560
3.57k
    if ( parentDs != nullptr ) {
2561
3.57k
        auto modifier = parentDs->GetData(0);
2562
3.57k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.57k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.03k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.03k
    Datasource ds(data, size);
2560
5.03k
    if ( parentDs != nullptr ) {
2561
5.03k
        auto modifier = parentDs->GetData(0);
2562
5.03k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.03k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.02k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.02k
    Datasource ds(data, size);
2560
4.02k
    if ( parentDs != nullptr ) {
2561
4.02k
        auto modifier = parentDs->GetData(0);
2562
4.02k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.02k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
14.7k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
14.7k
    Datasource ds(data, size);
2560
14.7k
    if ( parentDs != nullptr ) {
2561
14.7k
        auto modifier = parentDs->GetData(0);
2562
14.7k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
14.7k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
14.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
11.0k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
11.0k
    Datasource ds(data, size);
2560
11.0k
    if ( parentDs != nullptr ) {
2561
11.0k
        auto modifier = parentDs->GetData(0);
2562
11.0k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
11.0k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
11.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::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::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
6.01k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
6.01k
    Datasource ds(data, size);
2560
6.01k
    if ( parentDs != nullptr ) {
2561
6.01k
        auto modifier = parentDs->GetData(0);
2562
6.01k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
6.01k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
6.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::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_PBKDF>::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::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.06k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.06k
    Datasource ds(data, size);
2560
2.06k
    if ( parentDs != nullptr ) {
2561
2.06k
        auto modifier = parentDs->GetData(0);
2562
2.06k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.06k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.02k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.02k
    Datasource ds(data, size);
2560
4.02k
    if ( parentDs != nullptr ) {
2561
4.02k
        auto modifier = parentDs->GetData(0);
2562
4.02k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.02k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.63k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.63k
    Datasource ds(data, size);
2560
2.63k
    if ( parentDs != nullptr ) {
2561
2.63k
        auto modifier = parentDs->GetData(0);
2562
2.63k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.63k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.63k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.15k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.15k
    Datasource ds(data, size);
2560
2.15k
    if ( parentDs != nullptr ) {
2561
2.15k
        auto modifier = parentDs->GetData(0);
2562
2.15k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.15k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.07k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.07k
    Datasource ds(data, size);
2560
2.07k
    if ( parentDs != nullptr ) {
2561
2.07k
        auto modifier = parentDs->GetData(0);
2562
2.07k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.07k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.08k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.08k
    Datasource ds(data, size);
2560
2.08k
    if ( parentDs != nullptr ) {
2561
2.08k
        auto modifier = parentDs->GetData(0);
2562
2.08k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.08k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.08k
}
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.61k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.61k
    Datasource ds(data, size);
2560
3.61k
    if ( parentDs != nullptr ) {
2561
3.61k
        auto modifier = parentDs->GetData(0);
2562
3.61k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.61k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.29k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.29k
    Datasource ds(data, size);
2560
2.29k
    if ( parentDs != nullptr ) {
2561
2.29k
        auto modifier = parentDs->GetData(0);
2562
2.29k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.29k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.29k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::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::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.75k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.75k
    Datasource ds(data, size);
2560
2.75k
    if ( parentDs != nullptr ) {
2561
2.75k
        auto modifier = parentDs->GetData(0);
2562
2.75k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.75k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.75k
}
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.07k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.07k
    Datasource ds(data, size);
2560
2.07k
    if ( parentDs != nullptr ) {
2561
2.07k
        auto modifier = parentDs->GetData(0);
2562
2.07k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.07k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.07k
}
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.39k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.39k
    Datasource ds(data, size);
2560
3.39k
    if ( parentDs != nullptr ) {
2561
3.39k
        auto modifier = parentDs->GetData(0);
2562
3.39k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.39k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.39k
}
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.47k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.47k
    Datasource ds(data, size);
2560
2.47k
    if ( parentDs != nullptr ) {
2561
2.47k
        auto modifier = parentDs->GetData(0);
2562
2.47k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.47k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.47k
}
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.25k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.25k
    Datasource ds(data, size);
2560
2.25k
    if ( parentDs != nullptr ) {
2561
2.25k
        auto modifier = parentDs->GetData(0);
2562
2.25k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.25k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.25k
}
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.55k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.55k
    Datasource ds(data, size);
2560
2.55k
    if ( parentDs != nullptr ) {
2561
2.55k
        auto modifier = parentDs->GetData(0);
2562
2.55k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.55k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.55k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.63k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.63k
    Datasource ds(data, size);
2560
2.63k
    if ( parentDs != nullptr ) {
2561
2.63k
        auto modifier = parentDs->GetData(0);
2562
2.63k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.63k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.63k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::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<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.41k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.41k
    Datasource ds(data, size);
2560
2.41k
    if ( parentDs != nullptr ) {
2561
2.41k
        auto modifier = parentDs->GetData(0);
2562
2.41k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.41k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.41k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.70k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.70k
    Datasource ds(data, size);
2560
1.70k
    if ( parentDs != nullptr ) {
2561
1.70k
        auto modifier = parentDs->GetData(0);
2562
1.70k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.70k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.70k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::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::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.81k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.81k
    Datasource ds(data, size);
2560
2.81k
    if ( parentDs != nullptr ) {
2561
2.81k
        auto modifier = parentDs->GetData(0);
2562
2.81k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.81k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.81k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.04k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.04k
    Datasource ds(data, size);
2560
2.04k
    if ( parentDs != nullptr ) {
2561
2.04k
        auto modifier = parentDs->GetData(0);
2562
2.04k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.04k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.04k
}
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.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::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.76k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.76k
    Datasource ds(data, size);
2560
1.76k
    if ( parentDs != nullptr ) {
2561
1.76k
        auto modifier = parentDs->GetData(0);
2562
1.76k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.76k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::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::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.14k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.14k
    Datasource ds(data, size);
2560
2.14k
    if ( parentDs != nullptr ) {
2561
2.14k
        auto modifier = parentDs->GetData(0);
2562
2.14k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.14k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.83k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.83k
    Datasource ds(data, size);
2560
1.83k
    if ( parentDs != nullptr ) {
2561
1.83k
        auto modifier = parentDs->GetData(0);
2562
1.83k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.83k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::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::Buffer, cryptofuzz::operation::ECIES_Decrypt>::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::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.90k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.90k
    Datasource ds(data, size);
2560
1.90k
    if ( parentDs != nullptr ) {
2561
1.90k
        auto modifier = parentDs->GetData(0);
2562
1.90k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.90k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.90k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.89k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.89k
    Datasource ds(data, size);
2560
2.89k
    if ( parentDs != nullptr ) {
2561
2.89k
        auto modifier = parentDs->GetData(0);
2562
2.89k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.89k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.89k
}
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.94k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.94k
    Datasource ds(data, size);
2560
1.94k
    if ( parentDs != nullptr ) {
2561
1.94k
        auto modifier = parentDs->GetData(0);
2562
1.94k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.94k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.94k
}
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.76k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.76k
    Datasource ds(data, size);
2560
1.76k
    if ( parentDs != nullptr ) {
2561
1.76k
        auto modifier = parentDs->GetData(0);
2562
1.76k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.76k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.76k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.01k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.01k
    Datasource ds(data, size);
2560
3.01k
    if ( parentDs != nullptr ) {
2561
3.01k
        auto modifier = parentDs->GetData(0);
2562
3.01k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.01k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.23k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.23k
    Datasource ds(data, size);
2560
2.23k
    if ( parentDs != nullptr ) {
2561
2.23k
        auto modifier = parentDs->GetData(0);
2562
2.23k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.23k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::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::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
15.1k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
15.1k
    Datasource ds(data, size);
2560
15.1k
    if ( parentDs != nullptr ) {
2561
15.1k
        auto modifier = parentDs->GetData(0);
2562
15.1k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
15.1k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
15.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.95k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.95k
    Datasource ds(data, size);
2560
1.95k
    if ( parentDs != nullptr ) {
2561
1.95k
        auto modifier = parentDs->GetData(0);
2562
1.95k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.95k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.32k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.32k
    Datasource ds(data, size);
2560
3.32k
    if ( parentDs != nullptr ) {
2561
3.32k
        auto modifier = parentDs->GetData(0);
2562
3.32k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.32k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.72k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.72k
    Datasource ds(data, size);
2560
1.72k
    if ( parentDs != nullptr ) {
2561
1.72k
        auto modifier = parentDs->GetData(0);
2562
1.72k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.72k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.72k
}
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.62k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.62k
    Datasource ds(data, size);
2560
1.62k
    if ( parentDs != nullptr ) {
2561
1.62k
        auto modifier = parentDs->GetData(0);
2562
1.62k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.62k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.97k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.97k
    Datasource ds(data, size);
2560
1.97k
    if ( parentDs != nullptr ) {
2561
1.97k
        auto modifier = parentDs->GetData(0);
2562
1.97k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.97k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.97k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.32k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.32k
    Datasource ds(data, size);
2560
2.32k
    if ( parentDs != nullptr ) {
2561
2.32k
        auto modifier = parentDs->GetData(0);
2562
2.32k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.32k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.32k
}
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.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<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.49k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.49k
    Datasource ds(data, size);
2560
1.49k
    if ( parentDs != nullptr ) {
2561
1.49k
        auto modifier = parentDs->GetData(0);
2562
1.49k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.49k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.49k
}
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.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<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.83k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.83k
    Datasource ds(data, size);
2560
1.83k
    if ( parentDs != nullptr ) {
2561
1.83k
        auto modifier = parentDs->GetData(0);
2562
1.83k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.83k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.79k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.79k
    Datasource ds(data, size);
2560
2.79k
    if ( parentDs != nullptr ) {
2561
2.79k
        auto modifier = parentDs->GetData(0);
2562
2.79k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.79k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.66k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.66k
    Datasource ds(data, size);
2560
1.66k
    if ( parentDs != nullptr ) {
2561
1.66k
        auto modifier = parentDs->GetData(0);
2562
1.66k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.66k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::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::BignumPair, cryptofuzz::operation::BLS_HashToG1>::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::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.03k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.03k
    Datasource ds(data, size);
2560
2.03k
    if ( parentDs != nullptr ) {
2561
2.03k
        auto modifier = parentDs->GetData(0);
2562
2.03k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.03k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.99k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.99k
    Datasource ds(data, size);
2560
1.99k
    if ( parentDs != nullptr ) {
2561
1.99k
        auto modifier = parentDs->GetData(0);
2562
1.99k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.99k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.72k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.72k
    Datasource ds(data, size);
2560
1.72k
    if ( parentDs != nullptr ) {
2561
1.72k
        auto modifier = parentDs->GetData(0);
2562
1.72k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.72k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.72k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::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::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.96k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.96k
    Datasource ds(data, size);
2560
1.96k
    if ( parentDs != nullptr ) {
2561
1.96k
        auto modifier = parentDs->GetData(0);
2562
1.96k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.96k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.96k
}
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.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::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::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<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.99k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.99k
    Datasource ds(data, size);
2560
1.99k
    if ( parentDs != nullptr ) {
2561
1.99k
        auto modifier = parentDs->GetData(0);
2562
1.99k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.99k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.99k
}
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.52k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.52k
    Datasource ds(data, size);
2560
1.52k
    if ( parentDs != nullptr ) {
2561
1.52k
        auto modifier = parentDs->GetData(0);
2562
1.52k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.52k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.64k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.64k
    Datasource ds(data, size);
2560
1.64k
    if ( parentDs != nullptr ) {
2561
1.64k
        auto modifier = parentDs->GetData(0);
2562
1.64k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.64k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::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::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.80k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.80k
    Datasource ds(data, size);
2560
1.80k
    if ( parentDs != nullptr ) {
2561
1.80k
        auto modifier = parentDs->GetData(0);
2562
1.80k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.80k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.80k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
2.77k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.77k
    Datasource ds(data, size);
2560
2.77k
    if ( parentDs != nullptr ) {
2561
2.77k
        auto modifier = parentDs->GetData(0);
2562
2.77k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.77k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.41k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.41k
    Datasource ds(data, size);
2560
1.41k
    if ( parentDs != nullptr ) {
2561
1.41k
        auto modifier = parentDs->GetData(0);
2562
1.41k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.41k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.41k
}
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.02k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
2.02k
    Datasource ds(data, size);
2560
2.02k
    if ( parentDs != nullptr ) {
2561
2.02k
        auto modifier = parentDs->GetData(0);
2562
2.02k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
2.02k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
2.02k
}
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.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<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.59k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.59k
    Datasource ds(data, size);
2560
1.59k
    if ( parentDs != nullptr ) {
2561
1.59k
        auto modifier = parentDs->GetData(0);
2562
1.59k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.59k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.59k
}
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.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::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.36k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.36k
    Datasource ds(data, size);
2560
1.36k
    if ( parentDs != nullptr ) {
2561
1.36k
        auto modifier = parentDs->GetData(0);
2562
1.36k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.36k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.36k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
1.74k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
1.74k
    Datasource ds(data, size);
2560
1.74k
    if ( parentDs != nullptr ) {
2561
1.74k
        auto modifier = parentDs->GetData(0);
2562
1.74k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
1.74k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
1.74k
}
2567
2568
template <class ResultType, class OperationType>
2569
225k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
225k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
225k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
225k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
225k
    if ( modules.find(moduleID) == modules.end() ) {
2583
165k
        return nullptr;
2584
165k
    }
2585
2586
59.8k
    return modules.at(moduleID);
2587
225k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.38k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.38k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.38k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.38k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.38k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.21k
        return nullptr;
2584
2.21k
    }
2585
2586
3.16k
    return modules.at(moduleID);
2587
5.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.55k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.55k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.55k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.55k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.55k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.81k
        return nullptr;
2584
1.81k
    }
2585
2586
1.74k
    return modules.at(moduleID);
2587
3.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.01k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.01k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.01k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.01k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.01k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.47k
        return nullptr;
2584
2.47k
    }
2585
2586
2.53k
    return modules.at(moduleID);
2587
5.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.00k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.00k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.00k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.00k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.00k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.09k
        return nullptr;
2584
2.09k
    }
2585
2586
1.90k
    return modules.at(moduleID);
2587
4.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
14.7k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
14.7k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
14.7k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
14.7k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
14.7k
    if ( modules.find(moduleID) == modules.end() ) {
2583
5.11k
        return nullptr;
2584
5.11k
    }
2585
2586
9.60k
    return modules.at(moduleID);
2587
14.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
11.0k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
11.0k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
11.0k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
11.0k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
11.0k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.68k
        return nullptr;
2584
3.68k
    }
2585
2586
7.33k
    return modules.at(moduleID);
2587
11.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.88k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.88k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.88k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.88k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.88k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.06k
        return nullptr;
2584
2.06k
    }
2585
2586
819
    return modules.at(moduleID);
2587
2.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.98k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.98k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.98k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.98k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.98k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.47k
        return nullptr;
2584
2.47k
    }
2585
2586
3.51k
    return modules.at(moduleID);
2587
5.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.68k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.68k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.68k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.68k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.68k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.16k
        return nullptr;
2584
2.16k
    }
2585
2586
517
    return modules.at(moduleID);
2587
2.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::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
1.85k
        return nullptr;
2584
1.85k
    }
2585
2586
403
    return modules.at(moduleID);
2587
2.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.04k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.04k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.04k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.04k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.04k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.60k
        return nullptr;
2584
1.60k
    }
2585
2586
443
    return modules.at(moduleID);
2587
2.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.99k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.99k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.99k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.99k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.99k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.66k
        return nullptr;
2584
2.66k
    }
2585
2586
1.33k
    return modules.at(moduleID);
2587
3.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.61k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.61k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.61k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.61k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.61k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.21k
        return nullptr;
2584
2.21k
    }
2585
2586
397
    return modules.at(moduleID);
2587
2.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::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.61k
        return nullptr;
2584
1.61k
    }
2585
2586
503
    return modules.at(moduleID);
2587
2.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::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.51k
        return nullptr;
2584
1.51k
    }
2585
2586
539
    return modules.at(moduleID);
2587
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.06k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.06k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.06k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.06k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.06k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.94k
        return nullptr;
2584
1.94k
    }
2585
2586
111
    return modules.at(moduleID);
2587
2.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.58k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.58k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.58k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.58k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.58k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.24k
        return nullptr;
2584
2.24k
    }
2585
2586
1.34k
    return modules.at(moduleID);
2587
3.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::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.30k
        return nullptr;
2584
1.30k
    }
2585
2586
967
    return modules.at(moduleID);
2587
2.27k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::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.33k
        return nullptr;
2584
1.33k
    }
2585
2586
751
    return modules.at(moduleID);
2587
2.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.74k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.74k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.74k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.74k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.74k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.92k
        return nullptr;
2584
1.92k
    }
2585
2586
820
    return modules.at(moduleID);
2587
2.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::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.87k
        return nullptr;
2584
1.87k
    }
2585
2586
176
    return modules.at(moduleID);
2587
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.36k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.36k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.36k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.36k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.36k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.15k
        return nullptr;
2584
2.15k
    }
2585
2586
1.21k
    return modules.at(moduleID);
2587
3.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.44k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.44k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.44k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.44k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.44k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.07k
        return nullptr;
2584
2.07k
    }
2585
2586
378
    return modules.at(moduleID);
2587
2.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.23k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.23k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.23k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.23k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.23k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.06k
        return nullptr;
2584
2.06k
    }
2585
2586
168
    return modules.at(moduleID);
2587
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.53k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.53k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.53k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.53k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.53k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.40k
        return nullptr;
2584
2.40k
    }
2585
2586
124
    return modules.at(moduleID);
2587
2.53k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.60k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.60k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.60k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.60k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.60k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.47k
        return nullptr;
2584
2.47k
    }
2585
2586
132
    return modules.at(moduleID);
2587
2.60k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::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
1.77k
        return nullptr;
2584
1.77k
    }
2585
2586
571
    return modules.at(moduleID);
2587
2.34k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.39k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.39k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.39k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.39k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.39k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.07k
        return nullptr;
2584
2.07k
    }
2585
2586
321
    return modules.at(moduleID);
2587
2.39k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.67k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.67k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.67k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.67k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.67k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.55k
        return nullptr;
2584
1.55k
    }
2585
2586
125
    return modules.at(moduleID);
2587
1.67k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::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.37k
        return nullptr;
2584
2.37k
    }
2585
2586
137
    return modules.at(moduleID);
2587
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.78k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.78k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.78k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.78k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.78k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.04k
        return nullptr;
2584
2.04k
    }
2585
2586
741
    return modules.at(moduleID);
2587
2.78k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.01k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.01k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.01k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.01k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.01k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.84k
        return nullptr;
2584
1.84k
    }
2585
2586
167
    return modules.at(moduleID);
2587
2.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::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
188
    return modules.at(moduleID);
2587
2.33k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.74k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.74k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.74k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.74k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.74k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.59k
        return nullptr;
2584
1.59k
    }
2585
2586
155
    return modules.at(moduleID);
2587
1.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::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.37k
        return nullptr;
2584
2.37k
    }
2585
2586
125
    return modules.at(moduleID);
2587
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::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.94k
        return nullptr;
2584
1.94k
    }
2585
2586
173
    return modules.at(moduleID);
2587
2.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.80k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.80k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.80k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.80k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.80k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.63k
        return nullptr;
2584
1.63k
    }
2585
2586
169
    return modules.at(moduleID);
2587
1.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::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.88k
        return nullptr;
2584
1.88k
    }
2585
2586
148
    return modules.at(moduleID);
2587
2.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::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.22k
        return nullptr;
2584
2.22k
    }
2585
2586
137
    return modules.at(moduleID);
2587
2.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.88k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.88k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.88k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.88k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.88k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.67k
        return nullptr;
2584
1.67k
    }
2585
2586
216
    return modules.at(moduleID);
2587
1.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::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.31k
        return nullptr;
2584
2.31k
    }
2585
2586
545
    return modules.at(moduleID);
2587
2.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::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.67k
        return nullptr;
2584
1.67k
    }
2585
2586
239
    return modules.at(moduleID);
2587
1.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.74k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.74k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.74k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.74k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.74k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.54k
        return nullptr;
2584
1.54k
    }
2585
2586
194
    return modules.at(moduleID);
2587
1.74k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.98k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.98k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.98k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.98k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.98k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.72k
        return nullptr;
2584
2.72k
    }
2585
2586
268
    return modules.at(moduleID);
2587
2.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.21k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.21k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.21k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.21k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.21k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.06k
        return nullptr;
2584
2.06k
    }
2585
2586
148
    return modules.at(moduleID);
2587
2.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::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.22k
        return nullptr;
2584
2.22k
    }
2585
2586
445
    return modules.at(moduleID);
2587
2.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
15.1k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
15.1k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
15.1k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
15.1k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
15.1k
    if ( modules.find(moduleID) == modules.end() ) {
2583
7.19k
        return nullptr;
2584
7.19k
    }
2585
2586
7.91k
    return modules.at(moduleID);
2587
15.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.93k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.93k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.93k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.93k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.93k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.75k
        return nullptr;
2584
1.75k
    }
2585
2586
182
    return modules.at(moduleID);
2587
1.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.28k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.28k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.28k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.28k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.28k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.83k
        return nullptr;
2584
2.83k
    }
2585
2586
452
    return modules.at(moduleID);
2587
3.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.69k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.69k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.69k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.69k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.69k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.52k
        return nullptr;
2584
1.52k
    }
2585
2586
173
    return modules.at(moduleID);
2587
1.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.61k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.61k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.61k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.61k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.61k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.47k
        return nullptr;
2584
1.47k
    }
2585
2586
139
    return modules.at(moduleID);
2587
1.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.95k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.95k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.95k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.95k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.95k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.85k
        return nullptr;
2584
1.85k
    }
2585
2586
100
    return modules.at(moduleID);
2587
1.95k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::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.13k
        return nullptr;
2584
2.13k
    }
2585
2586
155
    return modules.at(moduleID);
2587
2.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::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.93k
        return nullptr;
2584
1.93k
    }
2585
2586
171
    return modules.at(moduleID);
2587
2.10k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.44k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.44k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.44k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.44k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.44k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.28k
        return nullptr;
2584
1.28k
    }
2585
2586
156
    return modules.at(moduleID);
2587
1.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.60k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.60k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.60k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.60k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.60k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.42k
        return nullptr;
2584
1.42k
    }
2585
2586
178
    return modules.at(moduleID);
2587
1.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.78k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.78k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.78k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.78k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.78k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.61k
        return nullptr;
2584
1.61k
    }
2585
2586
165
    return modules.at(moduleID);
2587
1.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.77k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.77k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.77k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.77k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.77k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.60k
        return nullptr;
2584
2.60k
    }
2585
2586
167
    return modules.at(moduleID);
2587
2.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.64k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.64k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.64k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.64k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.64k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.50k
        return nullptr;
2584
1.50k
    }
2585
2586
136
    return modules.at(moduleID);
2587
1.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.18k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.18k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.18k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.18k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.18k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.01k
        return nullptr;
2584
2.01k
    }
2585
2586
170
    return modules.at(moduleID);
2587
2.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.13k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.13k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.13k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.13k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.13k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.99k
        return nullptr;
2584
1.99k
    }
2585
2586
146
    return modules.at(moduleID);
2587
2.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.00k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.00k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.00k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.00k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.00k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.84k
        return nullptr;
2584
1.84k
    }
2585
2586
155
    return modules.at(moduleID);
2587
2.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.97k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.97k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.97k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.97k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.97k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.80k
        return nullptr;
2584
1.80k
    }
2585
2586
171
    return modules.at(moduleID);
2587
1.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.70k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.70k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.70k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.70k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.70k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.56k
        return nullptr;
2584
1.56k
    }
2585
2586
138
    return modules.at(moduleID);
2587
1.70k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.78k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.78k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.78k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.78k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.78k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.64k
        return nullptr;
2584
1.64k
    }
2585
2586
134
    return modules.at(moduleID);
2587
1.78k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.94k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.94k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.94k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.94k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.94k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.78k
        return nullptr;
2584
1.78k
    }
2585
2586
160
    return modules.at(moduleID);
2587
1.94k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::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.33k
        return nullptr;
2584
2.33k
    }
2585
2586
164
    return modules.at(moduleID);
2587
2.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::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.97k
        return nullptr;
2584
1.97k
    }
2585
2586
133
    return modules.at(moduleID);
2587
2.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.97k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.97k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.97k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.97k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.97k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.82k
        return nullptr;
2584
1.82k
    }
2585
2586
151
    return modules.at(moduleID);
2587
1.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.50k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.50k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.50k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.50k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.50k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.34k
        return nullptr;
2584
1.34k
    }
2585
2586
161
    return modules.at(moduleID);
2587
1.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.62k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.62k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.62k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.62k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.62k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.46k
        return nullptr;
2584
1.46k
    }
2585
2586
159
    return modules.at(moduleID);
2587
1.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::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.56k
        return nullptr;
2584
1.56k
    }
2585
2586
190
    return modules.at(moduleID);
2587
1.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.79k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.79k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.79k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.79k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.79k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.65k
        return nullptr;
2584
1.65k
    }
2585
2586
142
    return modules.at(moduleID);
2587
1.79k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.74k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.74k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.74k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.74k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.74k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.54k
        return nullptr;
2584
2.54k
    }
2585
2586
194
    return modules.at(moduleID);
2587
2.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.40k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.40k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.40k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.40k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.40k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.26k
        return nullptr;
2584
1.26k
    }
2585
2586
135
    return modules.at(moduleID);
2587
1.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.00k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.00k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.00k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.00k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.00k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.79k
        return nullptr;
2584
1.79k
    }
2585
2586
215
    return modules.at(moduleID);
2587
2.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::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.53k
        return nullptr;
2584
2.53k
    }
2585
2586
179
    return modules.at(moduleID);
2587
2.71k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.57k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.57k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.57k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.57k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.57k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.37k
        return nullptr;
2584
1.37k
    }
2585
2586
200
    return modules.at(moduleID);
2587
1.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
2.18k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
2.18k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
2.18k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
2.18k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
2.18k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.97k
        return nullptr;
2584
1.97k
    }
2585
2586
207
    return modules.at(moduleID);
2587
2.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.34k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.34k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.34k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.34k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.34k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.22k
        return nullptr;
2584
1.22k
    }
2585
2586
115
    return modules.at(moduleID);
2587
1.34k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
1.72k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
1.72k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
1.72k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
1.72k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
1.72k
    if ( modules.find(moduleID) == modules.end() ) {
2583
1.57k
        return nullptr;
2584
1.57k
    }
2585
2586
143
    return modules.at(moduleID);
2587
1.72k
}
2588
2589
template <class ResultType, class OperationType>
2590
29.4k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
29.4k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
29.4k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
227k
    do {
2596
227k
        auto op = getOp(&parentDs, data, size);
2597
227k
        auto module = getModule(parentDs);
2598
227k
        if ( module == nullptr ) {
2599
165k
            continue;
2600
165k
        }
2601
2602
61.9k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
61.9k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
817
            break;
2607
817
        }
2608
226k
    } while ( parentDs.Get<bool>() == true );
2609
2610
29.4k
    if ( operations.empty() == true ) {
2611
1.42k
        return;
2612
1.42k
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
28.0k
#if 1
2616
28.0k
    {
2617
28.0k
        std::set<uint64_t> moduleIDs;
2618
45.3k
        for (const auto& m : modules ) {
2619
45.3k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
45.3k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
45.3k
            moduleIDs.insert(moduleID);
2627
45.3k
        }
2628
2629
28.0k
        std::set<uint64_t> operationModuleIDs;
2630
54.6k
        for (const auto& op : operations) {
2631
54.6k
            operationModuleIDs.insert(op.first->ID);
2632
54.6k
        }
2633
2634
28.0k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
28.0k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
28.0k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
28.0k
        for (const auto& id : addModuleIDs) {
2639
21.4k
            operations.push_back({ modules.at(id), operations[0].second});
2640
21.4k
        }
2641
28.0k
    }
2642
28.0k
#endif
2643
2644
28.0k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
28.0k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
104k
    for (size_t i = 0; i < operations.size(); i++) {
2652
76.0k
        auto& operation = operations[i];
2653
2654
76.0k
        auto& module = operation.first;
2655
76.0k
        auto& op = operation.second;
2656
2657
76.0k
        if ( i > 0 ) {
2658
53.4k
            auto& prevModule = operations[i-1].first;
2659
53.4k
            auto& prevOp = operations[i].second;
2660
2661
53.4k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
29.6k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
29.6k
                if ( curModifier.size() == 0 ) {
2664
10.1M
                    for (size_t j = 0; j < 512; j++) {
2665
10.1M
                        curModifier.push_back(1);
2666
10.1M
                    }
2667
19.8k
                } else {
2668
172k
                    for (auto& c : curModifier) {
2669
172k
                        c++;
2670
172k
                    }
2671
9.78k
                }
2672
29.6k
            }
2673
53.4k
        }
2674
2675
76.0k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
76.0k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
76.0k
        const auto& result = results.back();
2682
2683
76.0k
        if ( result.second != std::nullopt ) {
2684
22.0k
            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
22.0k
        }
2691
2692
76.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
76.0k
        if ( options.disableTests == false ) {
2701
76.0k
            tests::test(op, result.second);
2702
76.0k
        }
2703
2704
76.0k
        postprocess(module, op, result);
2705
76.0k
    }
2706
2707
28.0k
    if ( options.noCompare == false ) {
2708
22.6k
        compare(operations, results, data, size);
2709
22.6k
    }
2710
28.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
1.68k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
1.68k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
1.68k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.40k
    do {
2596
5.40k
        auto op = getOp(&parentDs, data, size);
2597
5.40k
        auto module = getModule(parentDs);
2598
5.40k
        if ( module == nullptr ) {
2599
2.21k
            continue;
2600
2.21k
        }
2601
2602
3.19k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
3.19k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
5
            break;
2607
5
        }
2608
5.40k
    } while ( parentDs.Get<bool>() == true );
2609
2610
1.68k
    if ( operations.empty() == true ) {
2611
39
        return;
2612
39
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
1.64k
#if 1
2616
1.64k
    {
2617
1.64k
        std::set<uint64_t> moduleIDs;
2618
3.09k
        for (const auto& m : modules ) {
2619
3.09k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
3.09k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
3.09k
            moduleIDs.insert(moduleID);
2627
3.09k
        }
2628
2629
1.64k
        std::set<uint64_t> operationModuleIDs;
2630
3.07k
        for (const auto& op : operations) {
2631
3.07k
            operationModuleIDs.insert(op.first->ID);
2632
3.07k
        }
2633
2634
1.64k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
1.64k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
1.64k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
1.64k
        for (const auto& id : addModuleIDs) {
2639
1.51k
            operations.push_back({ modules.at(id), operations[0].second});
2640
1.51k
        }
2641
1.64k
    }
2642
1.64k
#endif
2643
2644
1.64k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
1.64k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
6.23k
    for (size_t i = 0; i < operations.size(); i++) {
2652
4.58k
        auto& operation = operations[i];
2653
2654
4.58k
        auto& module = operation.first;
2655
4.58k
        auto& op = operation.second;
2656
2657
4.58k
        if ( i > 0 ) {
2658
3.03k
            auto& prevModule = operations[i-1].first;
2659
3.03k
            auto& prevOp = operations[i].second;
2660
2661
3.03k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
1.44k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
1.44k
                if ( curModifier.size() == 0 ) {
2664
574k
                    for (size_t j = 0; j < 512; j++) {
2665
573k
                        curModifier.push_back(1);
2666
573k
                    }
2667
1.12k
                } else {
2668
1.29k
                    for (auto& c : curModifier) {
2669
1.29k
                        c++;
2670
1.29k
                    }
2671
328
                }
2672
1.44k
            }
2673
3.03k
        }
2674
2675
4.58k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
4.58k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
4.58k
        const auto& result = results.back();
2682
2683
4.58k
        if ( result.second != std::nullopt ) {
2684
2.09k
            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.09k
        }
2691
2692
4.58k
        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
4.58k
        if ( options.disableTests == false ) {
2701
4.58k
            tests::test(op, result.second);
2702
4.58k
        }
2703
2704
4.58k
        postprocess(module, op, result);
2705
4.58k
    }
2706
2707
1.64k
    if ( options.noCompare == false ) {
2708
1.54k
        compare(operations, results, data, size);
2709
1.54k
    }
2710
1.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
702
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
702
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
702
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.57k
    do {
2596
3.57k
        auto op = getOp(&parentDs, data, size);
2597
3.57k
        auto module = getModule(parentDs);
2598
3.57k
        if ( module == nullptr ) {
2599
1.81k
            continue;
2600
1.81k
        }
2601
2602
1.76k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.76k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
5
            break;
2607
5
        }
2608
3.57k
    } while ( parentDs.Get<bool>() == true );
2609
2610
702
    if ( operations.empty() == true ) {
2611
12
        return;
2612
12
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
690
#if 1
2616
690
    {
2617
690
        std::set<uint64_t> moduleIDs;
2618
1.27k
        for (const auto& m : modules ) {
2619
1.27k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.27k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.27k
            moduleIDs.insert(moduleID);
2627
1.27k
        }
2628
2629
690
        std::set<uint64_t> operationModuleIDs;
2630
1.67k
        for (const auto& op : operations) {
2631
1.67k
            operationModuleIDs.insert(op.first->ID);
2632
1.67k
        }
2633
2634
690
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
690
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
690
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
690
        for (const auto& id : addModuleIDs) {
2639
607
            operations.push_back({ modules.at(id), operations[0].second});
2640
607
        }
2641
690
    }
2642
690
#endif
2643
2644
690
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
690
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
2.97k
    for (size_t i = 0; i < operations.size(); i++) {
2652
2.28k
        auto& operation = operations[i];
2653
2654
2.28k
        auto& module = operation.first;
2655
2.28k
        auto& op = operation.second;
2656
2657
2.28k
        if ( i > 0 ) {
2658
1.64k
            auto& prevModule = operations[i-1].first;
2659
1.64k
            auto& prevOp = operations[i].second;
2660
2661
1.64k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
982
                auto& curModifier = op.modifier.GetVectorPtr();
2663
982
                if ( curModifier.size() == 0 ) {
2664
376k
                    for (size_t j = 0; j < 512; j++) {
2665
375k
                        curModifier.push_back(1);
2666
375k
                    }
2667
733
                } else {
2668
2.01k
                    for (auto& c : curModifier) {
2669
2.01k
                        c++;
2670
2.01k
                    }
2671
249
                }
2672
982
            }
2673
1.64k
        }
2674
2675
2.28k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
2.28k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
2.28k
        const auto& result = results.back();
2682
2683
2.28k
        if ( result.second != std::nullopt ) {
2684
1.06k
            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.06k
        }
2691
2692
2.28k
        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.28k
        if ( options.disableTests == false ) {
2701
2.28k
            tests::test(op, result.second);
2702
2.28k
        }
2703
2704
2.28k
        postprocess(module, op, result);
2705
2.28k
    }
2706
2707
690
    if ( options.noCompare == false ) {
2708
637
        compare(operations, results, data, size);
2709
637
    }
2710
690
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
584
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
584
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
584
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.03k
    do {
2596
5.03k
        auto op = getOp(&parentDs, data, size);
2597
5.03k
        auto module = getModule(parentDs);
2598
5.03k
        if ( module == nullptr ) {
2599
2.47k
            continue;
2600
2.47k
        }
2601
2602
2.55k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
2.55k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
10
            break;
2607
10
        }
2608
5.02k
    } while ( parentDs.Get<bool>() == true );
2609
2610
584
    if ( operations.empty() == true ) {
2611
22
        return;
2612
22
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
562
#if 1
2616
562
    {
2617
562
        std::set<uint64_t> moduleIDs;
2618
1.00k
        for (const auto& m : modules ) {
2619
1.00k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.00k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.00k
            moduleIDs.insert(moduleID);
2627
1.00k
        }
2628
2629
562
        std::set<uint64_t> operationModuleIDs;
2630
2.38k
        for (const auto& op : operations) {
2631
2.38k
            operationModuleIDs.insert(op.first->ID);
2632
2.38k
        }
2633
2634
562
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
562
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
562
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
562
        for (const auto& id : addModuleIDs) {
2639
486
            operations.push_back({ modules.at(id), operations[0].second});
2640
486
        }
2641
562
    }
2642
562
#endif
2643
2644
562
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
562
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
3.43k
    for (size_t i = 0; i < operations.size(); i++) {
2652
2.86k
        auto& operation = operations[i];
2653
2654
2.86k
        auto& module = operation.first;
2655
2.86k
        auto& op = operation.second;
2656
2657
2.86k
        if ( i > 0 ) {
2658
2.36k
            auto& prevModule = operations[i-1].first;
2659
2.36k
            auto& prevOp = operations[i].second;
2660
2661
2.36k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
1.81k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
1.81k
                if ( curModifier.size() == 0 ) {
2664
794k
                    for (size_t j = 0; j < 512; j++) {
2665
793k
                        curModifier.push_back(1);
2666
793k
                    }
2667
1.54k
                } else {
2668
1.45k
                    for (auto& c : curModifier) {
2669
1.45k
                        c++;
2670
1.45k
                    }
2671
267
                }
2672
1.81k
            }
2673
2.36k
        }
2674
2675
2.86k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
2.86k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
2.86k
        const auto& result = results.back();
2682
2683
2.86k
        if ( result.second != std::nullopt ) {
2684
1.39k
            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.39k
        }
2691
2692
2.86k
        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.86k
        if ( options.disableTests == false ) {
2701
2.86k
            tests::test(op, result.second);
2702
2.86k
        }
2703
2704
2.86k
        postprocess(module, op, result);
2705
2.86k
    }
2706
2707
562
    if ( options.noCompare == false ) {
2708
503
        compare(operations, results, data, size);
2709
503
    }
2710
562
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
724
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
724
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
724
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.02k
    do {
2596
4.02k
        auto op = getOp(&parentDs, data, size);
2597
4.02k
        auto module = getModule(parentDs);
2598
4.02k
        if ( module == nullptr ) {
2599
2.09k
            continue;
2600
2.09k
        }
2601
2602
1.92k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.92k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
4
            break;
2607
4
        }
2608
4.01k
    } while ( parentDs.Get<bool>() == true );
2609
2610
724
    if ( operations.empty() == true ) {
2611
9
        return;
2612
9
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
715
#if 1
2616
715
    {
2617
715
        std::set<uint64_t> moduleIDs;
2618
1.32k
        for (const auto& m : modules ) {
2619
1.32k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.32k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.32k
            moduleIDs.insert(moduleID);
2627
1.32k
        }
2628
2629
715
        std::set<uint64_t> operationModuleIDs;
2630
1.85k
        for (const auto& op : operations) {
2631
1.85k
            operationModuleIDs.insert(op.first->ID);
2632
1.85k
        }
2633
2634
715
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
715
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
715
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
715
        for (const auto& id : addModuleIDs) {
2639
629
            operations.push_back({ modules.at(id), operations[0].second});
2640
629
        }
2641
715
    }
2642
715
#endif
2643
2644
715
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
715
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
3.20k
    for (size_t i = 0; i < operations.size(); i++) {
2652
2.48k
        auto& operation = operations[i];
2653
2654
2.48k
        auto& module = operation.first;
2655
2.48k
        auto& op = operation.second;
2656
2657
2.48k
        if ( i > 0 ) {
2658
1.82k
            auto& prevModule = operations[i-1].first;
2659
1.82k
            auto& prevOp = operations[i].second;
2660
2661
1.82k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
1.09k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
1.09k
                if ( curModifier.size() == 0 ) {
2664
420k
                    for (size_t j = 0; j < 512; j++) {
2665
419k
                        curModifier.push_back(1);
2666
419k
                    }
2667
820
                } else {
2668
1.10k
                    for (auto& c : curModifier) {
2669
1.10k
                        c++;
2670
1.10k
                    }
2671
276
                }
2672
1.09k
            }
2673
1.82k
        }
2674
2675
2.48k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
2.48k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
2.48k
        const auto& result = results.back();
2682
2683
2.48k
        if ( result.second != std::nullopt ) {
2684
1.09k
            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.09k
        }
2691
2692
2.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
2.48k
        if ( options.disableTests == false ) {
2701
2.48k
            tests::test(op, result.second);
2702
2.48k
        }
2703
2704
2.48k
        postprocess(module, op, result);
2705
2.48k
    }
2706
2707
715
    if ( options.noCompare == false ) {
2708
661
        compare(operations, results, data, size);
2709
661
    }
2710
715
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
2.67k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
2.67k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
2.67k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
14.7k
    do {
2596
14.7k
        auto op = getOp(&parentDs, data, size);
2597
14.7k
        auto module = getModule(parentDs);
2598
14.7k
        if ( module == nullptr ) {
2599
5.11k
            continue;
2600
5.11k
        }
2601
2602
9.63k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
9.63k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
10
            break;
2607
10
        }
2608
14.7k
    } while ( parentDs.Get<bool>() == true );
2609
2610
2.67k
    if ( operations.empty() == true ) {
2611
21
        return;
2612
21
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
2.65k
#if 1
2616
2.65k
    {
2617
2.65k
        std::set<uint64_t> moduleIDs;
2618
5.19k
        for (const auto& m : modules ) {
2619
5.19k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
5.19k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
5.19k
            moduleIDs.insert(moduleID);
2627
5.19k
        }
2628
2629
2.65k
        std::set<uint64_t> operationModuleIDs;
2630
9.46k
        for (const auto& op : operations) {
2631
9.46k
            operationModuleIDs.insert(op.first->ID);
2632
9.46k
        }
2633
2634
2.65k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
2.65k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
2.65k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
2.65k
        for (const auto& id : addModuleIDs) {
2639
2.53k
            operations.push_back({ modules.at(id), operations[0].second});
2640
2.53k
        }
2641
2.65k
    }
2642
2.65k
#endif
2643
2644
2.65k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
2.65k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
14.6k
    for (size_t i = 0; i < operations.size(); i++) {
2652
11.9k
        auto& operation = operations[i];
2653
2654
11.9k
        auto& module = operation.first;
2655
11.9k
        auto& op = operation.second;
2656
2657
11.9k
        if ( i > 0 ) {
2658
9.39k
            auto& prevModule = operations[i-1].first;
2659
9.39k
            auto& prevOp = operations[i].second;
2660
2661
9.39k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
6.66k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
6.66k
                if ( curModifier.size() == 0 ) {
2664
2.44M
                    for (size_t j = 0; j < 512; j++) {
2665
2.43M
                        curModifier.push_back(1);
2666
2.43M
                    }
2667
4.76k
                } else {
2668
25.4k
                    for (auto& c : curModifier) {
2669
25.4k
                        c++;
2670
25.4k
                    }
2671
1.90k
                }
2672
6.66k
            }
2673
9.39k
        }
2674
2675
11.9k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
11.9k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
11.9k
        const auto& result = results.back();
2682
2683
11.9k
        if ( result.second != std::nullopt ) {
2684
3.91k
            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
3.91k
        }
2691
2692
11.9k
        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
11.9k
        if ( options.disableTests == false ) {
2701
11.9k
            tests::test(op, result.second);
2702
11.9k
        }
2703
2704
11.9k
        postprocess(module, op, result);
2705
11.9k
    }
2706
2707
2.65k
    if ( options.noCompare == false ) {
2708
2.59k
        compare(operations, results, data, size);
2709
2.59k
    }
2710
2.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
2.50k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
2.50k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
2.50k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
11.0k
    do {
2596
11.0k
        auto op = getOp(&parentDs, data, size);
2597
11.0k
        auto module = getModule(parentDs);
2598
11.0k
        if ( module == nullptr ) {
2599
3.68k
            continue;
2600
3.68k
        }
2601
2602
7.36k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
7.36k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
4
            break;
2607
4
        }
2608
11.0k
    } while ( parentDs.Get<bool>() == true );
2609
2610
2.50k
    if ( operations.empty() == true ) {
2611
17
        return;
2612
17
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
2.48k
#if 1
2616
2.48k
    {
2617
2.48k
        std::set<uint64_t> moduleIDs;
2618
4.84k
        for (const auto& m : modules ) {
2619
4.84k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
4.84k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
4.84k
            moduleIDs.insert(moduleID);
2627
4.84k
        }
2628
2629
2.48k
        std::set<uint64_t> operationModuleIDs;
2630
7.22k
        for (const auto& op : operations) {
2631
7.22k
            operationModuleIDs.insert(op.first->ID);
2632
7.22k
        }
2633
2634
2.48k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
2.48k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
2.48k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
2.48k
        for (const auto& id : addModuleIDs) {
2639
2.37k
            operations.push_back({ modules.at(id), operations[0].second});
2640
2.37k
        }
2641
2.48k
    }
2642
2.48k
#endif
2643
2644
2.48k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
2.48k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
12.0k
    for (size_t i = 0; i < operations.size(); i++) {
2652
9.60k
        auto& operation = operations[i];
2653
2654
9.60k
        auto& module = operation.first;
2655
9.60k
        auto& op = operation.second;
2656
2657
9.60k
        if ( i > 0 ) {
2658
7.18k
            auto& prevModule = operations[i-1].first;
2659
7.18k
            auto& prevOp = operations[i].second;
2660
2661
7.18k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
4.72k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
4.72k
                if ( curModifier.size() == 0 ) {
2664
1.51M
                    for (size_t j = 0; j < 512; j++) {
2665
1.51M
                        curModifier.push_back(1);
2666
1.51M
                    }
2667
2.96k
                } else {
2668
10.3k
                    for (auto& c : curModifier) {
2669
10.3k
                        c++;
2670
10.3k
                    }
2671
1.76k
                }
2672
4.72k
            }
2673
7.18k
        }
2674
2675
9.60k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
9.60k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
9.60k
        const auto& result = results.back();
2682
2683
9.60k
        if ( result.second != std::nullopt ) {
2684
869
            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
869
        }
2691
2692
9.60k
        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
9.60k
        if ( options.disableTests == false ) {
2701
9.60k
            tests::test(op, result.second);
2702
9.60k
        }
2703
2704
9.60k
        postprocess(module, op, result);
2705
9.60k
    }
2706
2707
2.48k
    if ( options.noCompare == false ) {
2708
2.42k
        compare(operations, results, data, size);
2709
2.42k
    }
2710
2.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
218
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
218
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
218
    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.06k
            continue;
2600
2.06k
        }
2601
2602
859
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
859
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
3
            break;
2607
3
        }
2608
2.92k
    } while ( parentDs.Get<bool>() == true );
2609
2610
218
    if ( operations.empty() == true ) {
2611
21
        return;
2612
21
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
197
#if 1
2616
197
    {
2617
197
        std::set<uint64_t> moduleIDs;
2618
238
        for (const auto& m : modules ) {
2619
238
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
238
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
238
            moduleIDs.insert(moduleID);
2627
238
        }
2628
2629
197
        std::set<uint64_t> operationModuleIDs;
2630
688
        for (const auto& op : operations) {
2631
688
            operationModuleIDs.insert(op.first->ID);
2632
688
        }
2633
2634
197
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
197
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
197
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
197
        for (const auto& id : addModuleIDs) {
2639
94
            operations.push_back({ modules.at(id), operations[0].second});
2640
94
        }
2641
197
    }
2642
197
#endif
2643
2644
197
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
197
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
979
    for (size_t i = 0; i < operations.size(); i++) {
2652
782
        auto& operation = operations[i];
2653
2654
782
        auto& module = operation.first;
2655
782
        auto& op = operation.second;
2656
2657
782
        if ( i > 0 ) {
2658
663
            auto& prevModule = operations[i-1].first;
2659
663
            auto& prevOp = operations[i].second;
2660
2661
663
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
506
                auto& curModifier = op.modifier.GetVectorPtr();
2663
506
                if ( curModifier.size() == 0 ) {
2664
202k
                    for (size_t j = 0; j < 512; j++) {
2665
201k
                        curModifier.push_back(1);
2666
201k
                    }
2667
394
                } else {
2668
542
                    for (auto& c : curModifier) {
2669
542
                        c++;
2670
542
                    }
2671
112
                }
2672
506
            }
2673
663
        }
2674
2675
782
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
782
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
782
        const auto& result = results.back();
2682
2683
782
        if ( result.second != std::nullopt ) {
2684
216
            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
216
        }
2691
2692
782
        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
782
        if ( options.disableTests == false ) {
2701
782
            tests::test(op, result.second);
2702
782
        }
2703
2704
782
        postprocess(module, op, result);
2705
782
    }
2706
2707
197
    if ( options.noCompare == false ) {
2708
119
        compare(operations, results, data, size);
2709
119
    }
2710
197
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
1.69k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
1.69k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
1.69k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
6.01k
    do {
2596
6.01k
        auto op = getOp(&parentDs, data, size);
2597
6.01k
        auto module = getModule(parentDs);
2598
6.01k
        if ( module == nullptr ) {
2599
2.47k
            continue;
2600
2.47k
        }
2601
2602
3.53k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
3.53k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
1
            break;
2607
1
        }
2608
6.01k
    } while ( parentDs.Get<bool>() == true );
2609
2610
1.69k
    if ( operations.empty() == true ) {
2611
48
        return;
2612
48
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
1.64k
#if 1
2616
1.64k
    {
2617
1.64k
        std::set<uint64_t> moduleIDs;
2618
3.12k
        for (const auto& m : modules ) {
2619
3.12k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
3.12k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
3.12k
            moduleIDs.insert(moduleID);
2627
3.12k
        }
2628
2629
1.64k
        std::set<uint64_t> operationModuleIDs;
2630
3.42k
        for (const auto& op : operations) {
2631
3.42k
            operationModuleIDs.insert(op.first->ID);
2632
3.42k
        }
2633
2634
1.64k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
1.64k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
1.64k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
1.64k
        for (const auto& id : addModuleIDs) {
2639
1.53k
            operations.push_back({ modules.at(id), operations[0].second});
2640
1.53k
        }
2641
1.64k
    }
2642
1.64k
#endif
2643
2644
1.64k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
1.64k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
6.60k
    for (size_t i = 0; i < operations.size(); i++) {
2652
4.96k
        auto& operation = operations[i];
2653
2654
4.96k
        auto& module = operation.first;
2655
4.96k
        auto& op = operation.second;
2656
2657
4.96k
        if ( i > 0 ) {
2658
3.40k
            auto& prevModule = operations[i-1].first;
2659
3.40k
            auto& prevOp = operations[i].second;
2660
2661
3.40k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
1.80k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
1.80k
                if ( curModifier.size() == 0 ) {
2664
720k
                    for (size_t j = 0; j < 512; j++) {
2665
719k
                        curModifier.push_back(1);
2666
719k
                    }
2667
1.40k
                } else {
2668
841
                    for (auto& c : curModifier) {
2669
841
                        c++;
2670
841
                    }
2671
403
                }
2672
1.80k
            }
2673
3.40k
        }
2674
2675
4.96k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
4.96k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
4.96k
        const auto& result = results.back();
2682
2683
4.96k
        if ( result.second != std::nullopt ) {
2684
2.11k
            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.11k
        }
2691
2692
4.96k
        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
4.96k
        if ( options.disableTests == false ) {
2701
4.96k
            tests::test(op, result.second);
2702
4.96k
        }
2703
2704
4.96k
        postprocess(module, op, result);
2705
4.96k
    }
2706
2707
1.64k
    if ( options.noCompare == false ) {
2708
1.56k
        compare(operations, results, data, size);
2709
1.56k
    }
2710
1.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
138
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
138
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
138
    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.16k
            continue;
2600
2.16k
        }
2601
2602
543
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
543
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
2
            break;
2607
2
        }
2608
2.71k
    } while ( parentDs.Get<bool>() == true );
2609
2610
138
    if ( operations.empty() == true ) {
2611
14
        return;
2612
14
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
124
#if 1
2616
124
    {
2617
124
        std::set<uint64_t> moduleIDs;
2618
124
        for (const auto& m : modules ) {
2619
116
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
116
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
116
            moduleIDs.insert(moduleID);
2627
116
        }
2628
2629
124
        std::set<uint64_t> operationModuleIDs;
2630
347
        for (const auto& op : operations) {
2631
347
            operationModuleIDs.insert(op.first->ID);
2632
347
        }
2633
2634
124
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
124
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
124
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
124
        for (const auto& id : addModuleIDs) {
2639
41
            operations.push_back({ modules.at(id), operations[0].second});
2640
41
        }
2641
124
    }
2642
124
#endif
2643
2644
124
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
124
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
512
    for (size_t i = 0; i < operations.size(); i++) {
2652
388
        auto& operation = operations[i];
2653
2654
388
        auto& module = operation.first;
2655
388
        auto& op = operation.second;
2656
2657
388
        if ( i > 0 ) {
2658
330
            auto& prevModule = operations[i-1].first;
2659
330
            auto& prevOp = operations[i].second;
2660
2661
330
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
231
                auto& curModifier = op.modifier.GetVectorPtr();
2663
231
                if ( curModifier.size() == 0 ) {
2664
79.5k
                    for (size_t j = 0; j < 512; j++) {
2665
79.3k
                        curModifier.push_back(1);
2666
79.3k
                    }
2667
155
                } else {
2668
674
                    for (auto& c : curModifier) {
2669
674
                        c++;
2670
674
                    }
2671
76
                }
2672
231
            }
2673
330
        }
2674
2675
388
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
388
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
388
        const auto& result = results.back();
2682
2683
388
        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
388
        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
388
        if ( options.disableTests == false ) {
2701
388
            tests::test(op, result.second);
2702
388
        }
2703
2704
388
        postprocess(module, op, result);
2705
388
    }
2706
2707
124
    if ( options.noCompare == false ) {
2708
58
        compare(operations, results, data, size);
2709
58
    }
2710
124
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::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
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
1.85k
            continue;
2600
1.85k
        }
2601
2602
422
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
422
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
3
            break;
2607
3
        }
2608
2.27k
    } while ( parentDs.Get<bool>() == true );
2609
2610
106
    if ( operations.empty() == true ) {
2611
17
        return;
2612
17
    }
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
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
89
        std::set<uint64_t> operationModuleIDs;
2630
289
        for (const auto& op : operations) {
2631
289
            operationModuleIDs.insert(op.first->ID);
2632
289
        }
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
24
            operations.push_back({ modules.at(id), operations[0].second});
2640
24
        }
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
402
    for (size_t i = 0; i < operations.size(); i++) {
2652
313
        auto& operation = operations[i];
2653
2654
313
        auto& module = operation.first;
2655
313
        auto& op = operation.second;
2656
2657
313
        if ( i > 0 ) {
2658
273
            auto& prevModule = operations[i-1].first;
2659
273
            auto& prevOp = operations[i].second;
2660
2661
273
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
217
                auto& curModifier = op.modifier.GetVectorPtr();
2663
217
                if ( curModifier.size() == 0 ) {
2664
68.7k
                    for (size_t j = 0; j < 512; j++) {
2665
68.6k
                        curModifier.push_back(1);
2666
68.6k
                    }
2667
134
                } else {
2668
767
                    for (auto& c : curModifier) {
2669
767
                        c++;
2670
767
                    }
2671
83
                }
2672
217
            }
2673
273
        }
2674
2675
313
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
313
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
313
        const auto& result = results.back();
2682
2683
313
        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
313
        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
313
        if ( options.disableTests == false ) {
2701
313
            tests::test(op, result.second);
2702
313
        }
2703
2704
313
        postprocess(module, op, result);
2705
313
    }
2706
2707
89
    if ( options.noCompare == false ) {
2708
40
        compare(operations, results, data, size);
2709
40
    }
2710
89
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::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.06k
    do {
2596
2.06k
        auto op = getOp(&parentDs, data, size);
2597
2.06k
        auto module = getModule(parentDs);
2598
2.06k
        if ( module == nullptr ) {
2599
1.60k
            continue;
2600
1.60k
        }
2601
2602
459
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
459
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
1
            break;
2607
1
        }
2608
2.06k
    } while ( parentDs.Get<bool>() == true );
2609
2610
117
    if ( operations.empty() == true ) {
2611
12
        return;
2612
12
    }
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
108
        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
105
        std::set<uint64_t> operationModuleIDs;
2630
338
        for (const auto& op : operations) {
2631
338
            operationModuleIDs.insert(op.first->ID);
2632
338
        }
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
38
            operations.push_back({ modules.at(id), operations[0].second});
2640
38
        }
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
481
    for (size_t i = 0; i < operations.size(); i++) {
2652
376
        auto& operation = operations[i];
2653
2654
376
        auto& module = operation.first;
2655
376
        auto& op = operation.second;
2656
2657
376
        if ( i > 0 ) {
2658
322
            auto& prevModule = operations[i-1].first;
2659
322
            auto& prevOp = operations[i].second;
2660
2661
322
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
250
                auto& curModifier = op.modifier.GetVectorPtr();
2663
250
                if ( curModifier.size() == 0 ) {
2664
58.9k
                    for (size_t j = 0; j < 512; j++) {
2665
58.8k
                        curModifier.push_back(1);
2666
58.8k
                    }
2667
135
                } else {
2668
401
                    for (auto& c : curModifier) {
2669
401
                        c++;
2670
401
                    }
2671
135
                }
2672
250
            }
2673
322
        }
2674
2675
376
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
376
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
376
        const auto& result = results.back();
2682
2683
376
        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
376
        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
376
        if ( options.disableTests == false ) {
2701
376
            tests::test(op, result.second);
2702
376
        }
2703
2704
376
        postprocess(module, op, result);
2705
376
    }
2706
2707
105
    if ( options.noCompare == false ) {
2708
54
        compare(operations, results, data, size);
2709
54
    }
2710
105
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
463
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
463
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
463
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.02k
    do {
2596
4.02k
        auto op = getOp(&parentDs, data, size);
2597
4.02k
        auto module = getModule(parentDs);
2598
4.02k
        if ( module == nullptr ) {
2599
2.66k
            continue;
2600
2.66k
        }
2601
2602
1.36k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.36k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
3
            break;
2607
3
        }
2608
4.02k
    } while ( parentDs.Get<bool>() == true );
2609
2610
463
    if ( operations.empty() == true ) {
2611
13
        return;
2612
13
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
450
#if 1
2616
450
    {
2617
450
        std::set<uint64_t> moduleIDs;
2618
782
        for (const auto& m : modules ) {
2619
782
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
782
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
782
            moduleIDs.insert(moduleID);
2627
782
        }
2628
2629
450
        std::set<uint64_t> operationModuleIDs;
2630
1.18k
        for (const auto& op : operations) {
2631
1.18k
            operationModuleIDs.insert(op.first->ID);
2632
1.18k
        }
2633
2634
450
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
450
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
450
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
450
        for (const auto& id : addModuleIDs) {
2639
369
            operations.push_back({ modules.at(id), operations[0].second});
2640
369
        }
2641
450
    }
2642
450
#endif
2643
2644
450
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
450
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
2.00k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.55k
        auto& operation = operations[i];
2653
2654
1.55k
        auto& module = operation.first;
2655
1.55k
        auto& op = operation.second;
2656
2657
1.55k
        if ( i > 0 ) {
2658
1.16k
            auto& prevModule = operations[i-1].first;
2659
1.16k
            auto& prevOp = operations[i].second;
2660
2661
1.16k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
753
                auto& curModifier = op.modifier.GetVectorPtr();
2663
753
                if ( curModifier.size() == 0 ) {
2664
286k
                    for (size_t j = 0; j < 512; j++) {
2665
286k
                        curModifier.push_back(1);
2666
286k
                    }
2667
559
                } else {
2668
749
                    for (auto& c : curModifier) {
2669
749
                        c++;
2670
749
                    }
2671
194
                }
2672
753
            }
2673
1.16k
        }
2674
2675
1.55k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.55k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.55k
        const auto& result = results.back();
2682
2683
1.55k
        if ( result.second != std::nullopt ) {
2684
771
            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
771
        }
2691
2692
1.55k
        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.55k
        if ( options.disableTests == false ) {
2701
1.55k
            tests::test(op, result.second);
2702
1.55k
        }
2703
2704
1.55k
        postprocess(module, op, result);
2705
1.55k
    }
2706
2707
450
    if ( options.noCompare == false ) {
2708
391
        compare(operations, results, data, size);
2709
391
    }
2710
450
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
316
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
316
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
316
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.63k
    do {
2596
2.63k
        auto op = getOp(&parentDs, data, size);
2597
2.63k
        auto module = getModule(parentDs);
2598
2.63k
        if ( module == nullptr ) {
2599
2.21k
            continue;
2600
2.21k
        }
2601
2602
421
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
421
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
34
            break;
2607
34
        }
2608
2.60k
    } while ( parentDs.Get<bool>() == true );
2609
2610
316
    if ( operations.empty() == true ) {
2611
19
        return;
2612
19
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
297
#if 1
2616
297
    {
2617
297
        std::set<uint64_t> moduleIDs;
2618
476
        for (const auto& m : modules ) {
2619
476
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
476
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
476
            moduleIDs.insert(moduleID);
2627
476
        }
2628
2629
297
        std::set<uint64_t> operationModuleIDs;
2630
339
        for (const auto& op : operations) {
2631
339
            operationModuleIDs.insert(op.first->ID);
2632
339
        }
2633
2634
297
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
297
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
297
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
297
        for (const auto& id : addModuleIDs) {
2639
231
            operations.push_back({ modules.at(id), operations[0].second});
2640
231
        }
2641
297
    }
2642
297
#endif
2643
2644
297
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
297
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
867
    for (size_t i = 0; i < operations.size(); i++) {
2652
570
        auto& operation = operations[i];
2653
2654
570
        auto& module = operation.first;
2655
570
        auto& op = operation.second;
2656
2657
570
        if ( i > 0 ) {
2658
332
            auto& prevModule = operations[i-1].first;
2659
332
            auto& prevOp = operations[i].second;
2660
2661
332
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
93
                auto& curModifier = op.modifier.GetVectorPtr();
2663
93
                if ( curModifier.size() == 0 ) {
2664
38.4k
                    for (size_t j = 0; j < 512; j++) {
2665
38.4k
                        curModifier.push_back(1);
2666
38.4k
                    }
2667
75
                } else {
2668
374
                    for (auto& c : curModifier) {
2669
374
                        c++;
2670
374
                    }
2671
18
                }
2672
93
            }
2673
332
        }
2674
2675
570
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
570
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
570
        const auto& result = results.back();
2682
2683
570
        if ( result.second != std::nullopt ) {
2684
261
            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
261
        }
2691
2692
570
        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
570
        if ( options.disableTests == false ) {
2701
570
            tests::test(op, result.second);
2702
570
        }
2703
2704
570
        postprocess(module, op, result);
2705
570
    }
2706
2707
297
    if ( options.noCompare == false ) {
2708
238
        compare(operations, results, data, size);
2709
238
    }
2710
297
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::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.15k
    do {
2596
2.15k
        auto op = getOp(&parentDs, data, size);
2597
2.15k
        auto module = getModule(parentDs);
2598
2.15k
        if ( module == nullptr ) {
2599
1.61k
            continue;
2600
1.61k
        }
2601
2602
539
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
539
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
2
            break;
2607
2
        }
2608
2.15k
    } while ( parentDs.Get<bool>() == true );
2609
2610
151
    if ( operations.empty() == true ) {
2611
16
        return;
2612
16
    }
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
114
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
114
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
114
            moduleIDs.insert(moduleID);
2627
114
        }
2628
2629
135
        std::set<uint64_t> operationModuleIDs;
2630
378
        for (const auto& op : operations) {
2631
378
            operationModuleIDs.insert(op.first->ID);
2632
378
        }
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
32
            operations.push_back({ modules.at(id), operations[0].second});
2640
32
        }
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
545
    for (size_t i = 0; i < operations.size(); i++) {
2652
410
        auto& operation = operations[i];
2653
2654
410
        auto& module = operation.first;
2655
410
        auto& op = operation.second;
2656
2657
410
        if ( i > 0 ) {
2658
353
            auto& prevModule = operations[i-1].first;
2659
353
            auto& prevOp = operations[i].second;
2660
2661
353
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
262
                auto& curModifier = op.modifier.GetVectorPtr();
2663
262
                if ( curModifier.size() == 0 ) {
2664
95.4k
                    for (size_t j = 0; j < 512; j++) {
2665
95.2k
                        curModifier.push_back(1);
2666
95.2k
                    }
2667
186
                } else {
2668
656
                    for (auto& c : curModifier) {
2669
656
                        c++;
2670
656
                    }
2671
76
                }
2672
262
            }
2673
353
        }
2674
2675
410
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
410
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
410
        const auto& result = results.back();
2682
2683
410
        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
410
        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
410
        if ( options.disableTests == false ) {
2701
410
            tests::test(op, result.second);
2702
410
        }
2703
2704
410
        postprocess(module, op, result);
2705
410
    }
2706
2707
135
    if ( options.noCompare == false ) {
2708
57
        compare(operations, results, data, size);
2709
57
    }
2710
135
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::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.07k
    do {
2596
2.07k
        auto op = getOp(&parentDs, data, size);
2597
2.07k
        auto module = getModule(parentDs);
2598
2.07k
        if ( module == nullptr ) {
2599
1.51k
            continue;
2600
1.51k
        }
2601
2602
564
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
564
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
3
            break;
2607
3
        }
2608
2.07k
    } while ( parentDs.Get<bool>() == true );
2609
2610
123
    if ( operations.empty() == true ) {
2611
9
        return;
2612
9
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
114
#if 1
2616
114
    {
2617
114
        std::set<uint64_t> moduleIDs;
2618
114
        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
114
        std::set<uint64_t> operationModuleIDs;
2630
387
        for (const auto& op : operations) {
2631
387
            operationModuleIDs.insert(op.first->ID);
2632
387
        }
2633
2634
114
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
114
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
114
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
114
        for (const auto& id : addModuleIDs) {
2639
27
            operations.push_back({ modules.at(id), operations[0].second});
2640
27
        }
2641
114
    }
2642
114
#endif
2643
2644
114
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
114
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
528
    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
365
            auto& prevModule = operations[i-1].first;
2659
365
            auto& prevOp = operations[i].second;
2660
2661
365
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
269
                auto& curModifier = op.modifier.GetVectorPtr();
2663
269
                if ( curModifier.size() == 0 ) {
2664
94.3k
                    for (size_t j = 0; j < 512; j++) {
2665
94.2k
                        curModifier.push_back(1);
2666
94.2k
                    }
2667
184
                } else {
2668
852
                    for (auto& c : curModifier) {
2669
852
                        c++;
2670
852
                    }
2671
85
                }
2672
269
            }
2673
365
        }
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
114
    if ( options.noCompare == false ) {
2708
49
        compare(operations, results, data, size);
2709
49
    }
2710
114
}
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.08k
    do {
2596
2.08k
        auto op = getOp(&parentDs, data, size);
2597
2.08k
        auto module = getModule(parentDs);
2598
2.08k
        if ( module == nullptr ) {
2599
1.94k
            continue;
2600
1.94k
        }
2601
2602
139
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
139
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
20
            break;
2607
20
        }
2608
2.06k
    } while ( parentDs.Get<bool>() == true );
2609
2610
149
    if ( operations.empty() == true ) {
2611
25
        return;
2612
25
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
124
#if 1
2616
124
    {
2617
124
        std::set<uint64_t> moduleIDs;
2618
134
        for (const auto& m : modules ) {
2619
134
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
134
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
134
            moduleIDs.insert(moduleID);
2627
134
        }
2628
2629
124
        std::set<uint64_t> operationModuleIDs;
2630
124
        for (const auto& op : operations) {
2631
87
            operationModuleIDs.insert(op.first->ID);
2632
87
        }
2633
2634
124
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
124
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
124
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
124
        for (const auto& id : addModuleIDs) {
2639
65
            operations.push_back({ modules.at(id), operations[0].second});
2640
65
        }
2641
124
    }
2642
124
#endif
2643
2644
124
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
124
    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
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
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
18
                auto& curModifier = op.modifier.GetVectorPtr();
2663
18
                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
12
                } else {
2668
221
                    for (auto& c : curModifier) {
2669
221
                        c++;
2670
221
                    }
2671
6
                }
2672
18
            }
2673
85
        }
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
40
            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
40
        }
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
124
    if ( options.noCompare == false ) {
2708
67
        compare(operations, results, data, size);
2709
67
    }
2710
124
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
382
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
382
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
382
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.61k
    do {
2596
3.61k
        auto op = getOp(&parentDs, data, size);
2597
3.61k
        auto module = getModule(parentDs);
2598
3.61k
        if ( module == nullptr ) {
2599
2.24k
            continue;
2600
2.24k
        }
2601
2602
1.36k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.36k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
2
            break;
2607
2
        }
2608
3.61k
    } while ( parentDs.Get<bool>() == true );
2609
2610
382
    if ( operations.empty() == true ) {
2611
12
        return;
2612
12
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
370
#if 1
2616
370
    {
2617
370
        std::set<uint64_t> moduleIDs;
2618
608
        for (const auto& m : modules ) {
2619
608
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
608
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
608
            moduleIDs.insert(moduleID);
2627
608
        }
2628
2629
370
        std::set<uint64_t> operationModuleIDs;
2630
1.16k
        for (const auto& op : operations) {
2631
1.16k
            operationModuleIDs.insert(op.first->ID);
2632
1.16k
        }
2633
2634
370
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
370
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
370
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
370
        for (const auto& id : addModuleIDs) {
2639
279
            operations.push_back({ modules.at(id), operations[0].second});
2640
279
        }
2641
370
    }
2642
370
#endif
2643
2644
370
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
370
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.80k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.43k
        auto& operation = operations[i];
2653
2654
1.43k
        auto& module = operation.first;
2655
1.43k
        auto& op = operation.second;
2656
2657
1.43k
        if ( i > 0 ) {
2658
1.13k
            auto& prevModule = operations[i-1].first;
2659
1.13k
            auto& prevOp = operations[i].second;
2660
2661
1.13k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
814
                auto& curModifier = op.modifier.GetVectorPtr();
2663
814
                if ( curModifier.size() == 0 ) {
2664
353k
                    for (size_t j = 0; j < 512; j++) {
2665
353k
                        curModifier.push_back(1);
2666
353k
                    }
2667
690
                } else {
2668
404
                    for (auto& c : curModifier) {
2669
404
                        c++;
2670
404
                    }
2671
124
                }
2672
814
            }
2673
1.13k
        }
2674
2675
1.43k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.43k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.43k
        const auto& result = results.back();
2682
2683
1.43k
        if ( result.second != std::nullopt ) {
2684
527
            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
527
        }
2691
2692
1.43k
        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.43k
        if ( options.disableTests == false ) {
2701
1.43k
            tests::test(op, result.second);
2702
1.43k
        }
2703
2704
1.43k
        postprocess(module, op, result);
2705
1.43k
    }
2706
2707
370
    if ( options.noCompare == false ) {
2708
304
        compare(operations, results, data, size);
2709
304
    }
2710
370
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
747
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
747
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
747
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.29k
    do {
2596
2.29k
        auto op = getOp(&parentDs, data, size);
2597
2.29k
        auto module = getModule(parentDs);
2598
2.29k
        if ( module == nullptr ) {
2599
1.30k
            continue;
2600
1.30k
        }
2601
2602
985
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
985
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
18
            break;
2607
18
        }
2608
2.27k
    } while ( parentDs.Get<bool>() == true );
2609
2610
747
    if ( operations.empty() == true ) {
2611
25
        return;
2612
25
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
722
#if 1
2616
722
    {
2617
722
        std::set<uint64_t> moduleIDs;
2618
1.34k
        for (const auto& m : modules ) {
2619
1.34k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.34k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.34k
            moduleIDs.insert(moduleID);
2627
1.34k
        }
2628
2629
722
        std::set<uint64_t> operationModuleIDs;
2630
922
        for (const auto& op : operations) {
2631
922
            operationModuleIDs.insert(op.first->ID);
2632
922
        }
2633
2634
722
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
722
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
722
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
722
        for (const auto& id : addModuleIDs) {
2639
654
            operations.push_back({ modules.at(id), operations[0].second});
2640
654
        }
2641
722
    }
2642
722
#endif
2643
2644
722
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
722
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
2.29k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.57k
        auto& operation = operations[i];
2653
2654
1.57k
        auto& module = operation.first;
2655
1.57k
        auto& op = operation.second;
2656
2657
1.57k
        if ( i > 0 ) {
2658
906
            auto& prevModule = operations[i-1].first;
2659
906
            auto& prevOp = operations[i].second;
2660
2661
906
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
229
                auto& curModifier = op.modifier.GetVectorPtr();
2663
229
                if ( curModifier.size() == 0 ) {
2664
76.4k
                    for (size_t j = 0; j < 512; j++) {
2665
76.2k
                        curModifier.push_back(1);
2666
76.2k
                    }
2667
149
                } else {
2668
1.10k
                    for (auto& c : curModifier) {
2669
1.10k
                        c++;
2670
1.10k
                    }
2671
80
                }
2672
229
            }
2673
906
        }
2674
2675
1.57k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.57k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.57k
        const auto& result = results.back();
2682
2683
1.57k
        if ( result.second != std::nullopt ) {
2684
577
            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
577
        }
2691
2692
1.57k
        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.57k
        if ( options.disableTests == false ) {
2701
1.57k
            tests::test(op, result.second);
2702
1.57k
        }
2703
2704
1.57k
        postprocess(module, op, result);
2705
1.57k
    }
2706
2707
722
    if ( options.noCompare == false ) {
2708
670
        compare(operations, results, data, size);
2709
670
    }
2710
722
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
603
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
603
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
603
    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.33k
            continue;
2600
1.33k
        }
2601
2602
768
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
768
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
10
            break;
2607
10
        }
2608
2.09k
    } while ( parentDs.Get<bool>() == true );
2609
2610
603
    if ( operations.empty() == true ) {
2611
21
        return;
2612
21
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
582
#if 1
2616
582
    {
2617
582
        std::set<uint64_t> moduleIDs;
2618
1.02k
        for (const auto& m : modules ) {
2619
1.02k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.02k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.02k
            moduleIDs.insert(moduleID);
2627
1.02k
        }
2628
2629
582
        std::set<uint64_t> operationModuleIDs;
2630
705
        for (const auto& op : operations) {
2631
705
            operationModuleIDs.insert(op.first->ID);
2632
705
        }
2633
2634
582
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
582
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
582
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
582
        for (const auto& id : addModuleIDs) {
2639
493
            operations.push_back({ modules.at(id), operations[0].second});
2640
493
        }
2641
582
    }
2642
582
#endif
2643
2644
582
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
582
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.78k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.19k
        auto& operation = operations[i];
2653
2654
1.19k
        auto& module = operation.first;
2655
1.19k
        auto& op = operation.second;
2656
2657
1.19k
        if ( i > 0 ) {
2658
688
            auto& prevModule = operations[i-1].first;
2659
688
            auto& prevOp = operations[i].second;
2660
2661
688
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
169
                auto& curModifier = op.modifier.GetVectorPtr();
2663
169
                if ( curModifier.size() == 0 ) {
2664
55.4k
                    for (size_t j = 0; j < 512; j++) {
2665
55.2k
                        curModifier.push_back(1);
2666
55.2k
                    }
2667
108
                } else {
2668
357
                    for (auto& c : curModifier) {
2669
357
                        c++;
2670
357
                    }
2671
61
                }
2672
169
            }
2673
688
        }
2674
2675
1.19k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.19k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.19k
        const auto& result = results.back();
2682
2683
1.19k
        if ( result.second != std::nullopt ) {
2684
938
            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
938
        }
2691
2692
1.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
1.19k
        if ( options.disableTests == false ) {
2701
1.19k
            tests::test(op, result.second);
2702
1.19k
        }
2703
2704
1.19k
        postprocess(module, op, result);
2705
1.19k
    }
2706
2707
582
    if ( options.noCompare == false ) {
2708
510
        compare(operations, results, data, size);
2709
510
    }
2710
582
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
782
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
782
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
782
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.75k
    do {
2596
2.75k
        auto op = getOp(&parentDs, data, size);
2597
2.75k
        auto module = getModule(parentDs);
2598
2.75k
        if ( module == nullptr ) {
2599
1.92k
            continue;
2600
1.92k
        }
2601
2602
835
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
835
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
11
            break;
2607
11
        }
2608
2.74k
    } while ( parentDs.Get<bool>() == true );
2609
2610
782
    if ( operations.empty() == true ) {
2611
44
        return;
2612
44
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
738
#if 1
2616
738
    {
2617
738
        std::set<uint64_t> moduleIDs;
2618
1.32k
        for (const auto& m : modules ) {
2619
1.32k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.32k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.32k
            moduleIDs.insert(moduleID);
2627
1.32k
        }
2628
2629
738
        std::set<uint64_t> operationModuleIDs;
2630
793
        for (const auto& op : operations) {
2631
793
            operationModuleIDs.insert(op.first->ID);
2632
793
        }
2633
2634
738
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
738
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
738
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
738
        for (const auto& id : addModuleIDs) {
2639
647
            operations.push_back({ modules.at(id), operations[0].second});
2640
647
        }
2641
738
    }
2642
738
#endif
2643
2644
738
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
738
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
2.17k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.44k
        auto& operation = operations[i];
2653
2654
1.44k
        auto& module = operation.first;
2655
1.44k
        auto& op = operation.second;
2656
2657
1.44k
        if ( i > 0 ) {
2658
780
            auto& prevModule = operations[i-1].first;
2659
780
            auto& prevOp = operations[i].second;
2660
2661
780
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
111
                auto& curModifier = op.modifier.GetVectorPtr();
2663
111
                if ( curModifier.size() == 0 ) {
2664
38.9k
                    for (size_t j = 0; j < 512; j++) {
2665
38.9k
                        curModifier.push_back(1);
2666
38.9k
                    }
2667
76
                } else {
2668
301
                    for (auto& c : curModifier) {
2669
301
                        c++;
2670
301
                    }
2671
35
                }
2672
111
            }
2673
780
        }
2674
2675
1.44k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.44k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.44k
        const auto& result = results.back();
2682
2683
1.44k
        if ( result.second != std::nullopt ) {
2684
433
            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
433
        }
2691
2692
1.44k
        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.44k
        if ( options.disableTests == false ) {
2701
1.44k
            tests::test(op, result.second);
2702
1.44k
        }
2703
2704
1.44k
        postprocess(module, op, result);
2705
1.44k
    }
2706
2707
738
    if ( options.noCompare == false ) {
2708
660
        compare(operations, results, data, size);
2709
660
    }
2710
738
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
101
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
101
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
101
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.07k
    do {
2596
2.07k
        auto op = getOp(&parentDs, data, size);
2597
2.07k
        auto module = getModule(parentDs);
2598
2.07k
        if ( module == nullptr ) {
2599
1.87k
            continue;
2600
1.87k
        }
2601
2602
197
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
197
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
2.07k
    } while ( parentDs.Get<bool>() == true );
2609
2610
101
    if ( operations.empty() == true ) {
2611
9
        return;
2612
9
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
92
#if 1
2616
92
    {
2617
92
        std::set<uint64_t> moduleIDs;
2618
92
        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
92
        std::set<uint64_t> operationModuleIDs;
2630
118
        for (const auto& op : operations) {
2631
118
            operationModuleIDs.insert(op.first->ID);
2632
118
        }
2633
2634
92
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
92
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
92
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
92
        for (const auto& id : addModuleIDs) {
2639
31
            operations.push_back({ modules.at(id), operations[0].second});
2640
31
        }
2641
92
    }
2642
92
#endif
2643
2644
92
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
92
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
241
    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
14.8k
                    for (size_t j = 0; j < 512; j++) {
2665
14.8k
                        curModifier.push_back(1);
2666
14.8k
                    }
2667
29
                } else {
2668
410
                    for (auto& c : curModifier) {
2669
410
                        c++;
2670
410
                    }
2671
28
                }
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
92
    if ( options.noCompare == false ) {
2708
43
        compare(operations, results, data, size);
2709
43
    }
2710
92
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
686
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
686
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
686
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.39k
    do {
2596
3.39k
        auto op = getOp(&parentDs, data, size);
2597
3.39k
        auto module = getModule(parentDs);
2598
3.39k
        if ( module == nullptr ) {
2599
2.15k
            continue;
2600
2.15k
        }
2601
2602
1.24k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.24k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
52
            break;
2607
52
        }
2608
3.34k
    } while ( parentDs.Get<bool>() == true );
2609
2610
686
    if ( operations.empty() == true ) {
2611
9
        return;
2612
9
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
677
#if 1
2616
677
    {
2617
677
        std::set<uint64_t> moduleIDs;
2618
1.25k
        for (const auto& m : modules ) {
2619
1.25k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.25k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.25k
            moduleIDs.insert(moduleID);
2627
1.25k
        }
2628
2629
677
        std::set<uint64_t> operationModuleIDs;
2630
1.16k
        for (const auto& op : operations) {
2631
1.16k
            operationModuleIDs.insert(op.first->ID);
2632
1.16k
        }
2633
2634
677
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
677
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
677
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
677
        for (const auto& id : addModuleIDs) {
2639
612
            operations.push_back({ modules.at(id), operations[0].second});
2640
612
        }
2641
677
    }
2642
677
#endif
2643
2644
677
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
677
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
2.45k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.77k
        auto& operation = operations[i];
2653
2654
1.77k
        auto& module = operation.first;
2655
1.77k
        auto& op = operation.second;
2656
2657
1.77k
        if ( i > 0 ) {
2658
1.15k
            auto& prevModule = operations[i-1].first;
2659
1.15k
            auto& prevOp = operations[i].second;
2660
2661
1.15k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
523
                auto& curModifier = op.modifier.GetVectorPtr();
2663
523
                if ( curModifier.size() == 0 ) {
2664
187k
                    for (size_t j = 0; j < 512; j++) {
2665
187k
                        curModifier.push_back(1);
2666
187k
                    }
2667
366
                } else {
2668
17.7k
                    for (auto& c : curModifier) {
2669
17.7k
                        c++;
2670
17.7k
                    }
2671
157
                }
2672
523
            }
2673
1.15k
        }
2674
2675
1.77k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.77k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.77k
        const auto& result = results.back();
2682
2683
1.77k
        if ( result.second != std::nullopt ) {
2684
845
            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
845
        }
2691
2692
1.77k
        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.77k
        if ( options.disableTests == false ) {
2701
1.77k
            tests::test(op, result.second);
2702
1.77k
        }
2703
2704
1.77k
        postprocess(module, op, result);
2705
1.77k
    }
2706
2707
677
    if ( options.noCompare == false ) {
2708
625
        compare(operations, results, data, size);
2709
625
    }
2710
677
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
187
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
187
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
187
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.47k
    do {
2596
2.47k
        auto op = getOp(&parentDs, data, size);
2597
2.47k
        auto module = getModule(parentDs);
2598
2.47k
        if ( module == nullptr ) {
2599
2.07k
            continue;
2600
2.07k
        }
2601
2602
402
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
402
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
24
            break;
2607
24
        }
2608
2.44k
    } while ( parentDs.Get<bool>() == true );
2609
2610
187
    if ( operations.empty() == true ) {
2611
8
        return;
2612
8
    }
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
266
        for (const auto& m : modules ) {
2619
266
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
266
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
266
            moduleIDs.insert(moduleID);
2627
266
        }
2628
2629
179
        std::set<uint64_t> operationModuleIDs;
2630
338
        for (const auto& op : operations) {
2631
338
            operationModuleIDs.insert(op.first->ID);
2632
338
        }
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
122
            operations.push_back({ modules.at(id), operations[0].second});
2640
122
        }
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
639
    for (size_t i = 0; i < operations.size(); i++) {
2652
460
        auto& operation = operations[i];
2653
2654
460
        auto& module = operation.first;
2655
460
        auto& op = operation.second;
2656
2657
460
        if ( i > 0 ) {
2658
327
            auto& prevModule = operations[i-1].first;
2659
327
            auto& prevOp = operations[i].second;
2660
2661
327
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
186
                auto& curModifier = op.modifier.GetVectorPtr();
2663
186
                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
125
                } else {
2668
12.0k
                    for (auto& c : curModifier) {
2669
12.0k
                        c++;
2670
12.0k
                    }
2671
125
                }
2672
186
            }
2673
327
        }
2674
2675
460
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
460
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
460
        const auto& result = results.back();
2682
2683
460
        if ( result.second != std::nullopt ) {
2684
65
            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
65
        }
2691
2692
460
        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
460
        if ( options.disableTests == false ) {
2701
460
            tests::test(op, result.second);
2702
460
        }
2703
2704
460
        postprocess(module, op, result);
2705
460
    }
2706
2707
179
    if ( options.noCompare == false ) {
2708
133
        compare(operations, results, data, size);
2709
133
    }
2710
179
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
104
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
104
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
104
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.25k
    do {
2596
2.25k
        auto op = getOp(&parentDs, data, size);
2597
2.25k
        auto module = getModule(parentDs);
2598
2.25k
        if ( module == nullptr ) {
2599
2.06k
            continue;
2600
2.06k
        }
2601
2602
190
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
190
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
2.24k
    } while ( parentDs.Get<bool>() == true );
2609
2610
104
    if ( operations.empty() == true ) {
2611
15
        return;
2612
15
    }
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
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
89
        std::set<uint64_t> operationModuleIDs;
2630
126
        for (const auto& op : operations) {
2631
126
            operationModuleIDs.insert(op.first->ID);
2632
126
        }
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
32
            operations.push_back({ modules.at(id), operations[0].second});
2640
32
        }
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
247
    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
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
9.74k
                    for (size_t j = 0; j < 512; j++) {
2665
9.72k
                        curModifier.push_back(1);
2666
9.72k
                    }
2667
44
                } else {
2668
375
                    for (auto& c : curModifier) {
2669
375
                        c++;
2670
375
                    }
2671
44
                }
2672
63
            }
2673
114
        }
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
89
    if ( options.noCompare == false ) {
2708
44
        compare(operations, results, data, size);
2709
44
    }
2710
89
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
89
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
89
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
89
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.55k
    do {
2596
2.55k
        auto op = getOp(&parentDs, data, size);
2597
2.55k
        auto module = getModule(parentDs);
2598
2.55k
        if ( module == nullptr ) {
2599
2.40k
            continue;
2600
2.40k
        }
2601
2602
149
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
149
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
2.54k
    } while ( parentDs.Get<bool>() == true );
2609
2610
89
    if ( operations.empty() == true ) {
2611
11
        return;
2612
11
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
78
#if 1
2616
78
    {
2617
78
        std::set<uint64_t> moduleIDs;
2618
78
        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
78
        std::set<uint64_t> operationModuleIDs;
2630
90
        for (const auto& op : operations) {
2631
90
            operationModuleIDs.insert(op.first->ID);
2632
90
        }
2633
2634
78
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
78
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
78
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
78
        for (const auto& id : addModuleIDs) {
2639
21
            operations.push_back({ modules.at(id), operations[0].second});
2640
21
        }
2641
78
    }
2642
78
#endif
2643
2644
78
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
78
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
189
    for (size_t i = 0; i < operations.size(); i++) {
2652
111
        auto& operation = operations[i];
2653
2654
111
        auto& module = operation.first;
2655
111
        auto& op = operation.second;
2656
2657
111
        if ( i > 0 ) {
2658
81
            auto& prevModule = operations[i-1].first;
2659
81
            auto& prevOp = operations[i].second;
2660
2661
81
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
43
                auto& curModifier = op.modifier.GetVectorPtr();
2663
43
                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
355
                    for (auto& c : curModifier) {
2669
355
                        c++;
2670
355
                    }
2671
16
                }
2672
43
            }
2673
81
        }
2674
2675
111
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
111
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
111
        const auto& result = results.back();
2682
2683
111
        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
111
        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
111
        if ( options.disableTests == false ) {
2701
111
            tests::test(op, result.second);
2702
111
        }
2703
2704
111
        postprocess(module, op, result);
2705
111
    }
2706
2707
78
    if ( options.noCompare == false ) {
2708
30
        compare(operations, results, data, size);
2709
30
    }
2710
78
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
82
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
82
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
82
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.63k
    do {
2596
2.63k
        auto op = getOp(&parentDs, data, size);
2597
2.63k
        auto module = getModule(parentDs);
2598
2.63k
        if ( module == nullptr ) {
2599
2.47k
            continue;
2600
2.47k
        }
2601
2602
160
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
160
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
2.62k
    } while ( parentDs.Get<bool>() == true );
2609
2610
82
    if ( operations.empty() == true ) {
2611
4
        return;
2612
4
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
78
#if 1
2616
78
    {
2617
78
        std::set<uint64_t> moduleIDs;
2618
78
        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
78
        std::set<uint64_t> operationModuleIDs;
2630
93
        for (const auto& op : operations) {
2631
93
            operationModuleIDs.insert(op.first->ID);
2632
93
        }
2633
2634
78
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
78
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
78
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
78
        for (const auto& id : addModuleIDs) {
2639
20
            operations.push_back({ modules.at(id), operations[0].second});
2640
20
        }
2641
78
    }
2642
78
#endif
2643
2644
78
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
78
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
191
    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
84
            auto& prevModule = operations[i-1].first;
2659
84
            auto& prevOp = operations[i].second;
2660
2661
84
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
47
                auto& curModifier = op.modifier.GetVectorPtr();
2663
47
                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
27
                } else {
2668
619
                    for (auto& c : curModifier) {
2669
619
                        c++;
2670
619
                    }
2671
27
                }
2672
47
            }
2673
84
        }
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
78
    if ( options.noCompare == false ) {
2708
29
        compare(operations, results, data, size);
2709
29
    }
2710
78
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
350
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
350
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
350
    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
1.77k
            continue;
2600
1.77k
        }
2601
2602
595
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
595
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
12
            break;
2607
12
        }
2608
2.35k
    } while ( parentDs.Get<bool>() == true );
2609
2610
350
    if ( operations.empty() == true ) {
2611
31
        return;
2612
31
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
319
#if 1
2616
319
    {
2617
319
        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
319
        std::set<uint64_t> operationModuleIDs;
2630
530
        for (const auto& op : operations) {
2631
530
            operationModuleIDs.insert(op.first->ID);
2632
530
        }
2633
2634
319
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
319
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
319
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
319
        for (const auto& id : addModuleIDs) {
2639
249
            operations.push_back({ modules.at(id), operations[0].second});
2640
249
        }
2641
319
    }
2642
319
#endif
2643
2644
319
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
319
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.09k
    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
520
            auto& prevModule = operations[i-1].first;
2659
520
            auto& prevOp = operations[i].second;
2660
2661
520
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
255
                auto& curModifier = op.modifier.GetVectorPtr();
2663
255
                if ( curModifier.size() == 0 ) {
2664
80.5k
                    for (size_t j = 0; j < 512; j++) {
2665
80.3k
                        curModifier.push_back(1);
2666
80.3k
                    }
2667
157
                } else {
2668
648
                    for (auto& c : curModifier) {
2669
648
                        c++;
2670
648
                    }
2671
98
                }
2672
255
            }
2673
520
        }
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
392
            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
392
        }
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
319
    if ( options.noCompare == false ) {
2708
259
        compare(operations, results, data, size);
2709
259
    }
2710
319
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::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.41k
    do {
2596
2.41k
        auto op = getOp(&parentDs, data, size);
2597
2.41k
        auto module = getModule(parentDs);
2598
2.41k
        if ( module == nullptr ) {
2599
2.07k
            continue;
2600
2.07k
        }
2601
2602
339
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
339
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
12
            break;
2607
12
        }
2608
2.40k
    } while ( parentDs.Get<bool>() == true );
2609
2610
189
    if ( operations.empty() == true ) {
2611
22
        return;
2612
22
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
167
#if 1
2616
167
    {
2617
167
        std::set<uint64_t> moduleIDs;
2618
248
        for (const auto& m : modules ) {
2619
248
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
248
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
248
            moduleIDs.insert(moduleID);
2627
248
        }
2628
2629
167
        std::set<uint64_t> operationModuleIDs;
2630
293
        for (const auto& op : operations) {
2631
293
            operationModuleIDs.insert(op.first->ID);
2632
293
        }
2633
2634
167
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
167
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
167
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
167
        for (const auto& id : addModuleIDs) {
2639
113
            operations.push_back({ modules.at(id), operations[0].second});
2640
113
        }
2641
167
    }
2642
167
#endif
2643
2644
167
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
167
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
573
    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
282
            auto& prevModule = operations[i-1].first;
2659
282
            auto& prevOp = operations[i].second;
2660
2661
282
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
155
                auto& curModifier = op.modifier.GetVectorPtr();
2663
155
                if ( curModifier.size() == 0 ) {
2664
47.1k
                    for (size_t j = 0; j < 512; j++) {
2665
47.1k
                        curModifier.push_back(1);
2666
47.1k
                    }
2667
92
                } else {
2668
390
                    for (auto& c : curModifier) {
2669
390
                        c++;
2670
390
                    }
2671
63
                }
2672
155
            }
2673
282
        }
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
157
            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
157
        }
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
167
    if ( options.noCompare == false ) {
2708
124
        compare(operations, results, data, size);
2709
124
    }
2710
167
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
83
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
83
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
83
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.70k
    do {
2596
1.70k
        auto op = getOp(&parentDs, data, size);
2597
1.70k
        auto module = getModule(parentDs);
2598
1.70k
        if ( module == nullptr ) {
2599
1.55k
            continue;
2600
1.55k
        }
2601
2602
148
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
148
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
5
            break;
2607
5
        }
2608
1.69k
    } while ( parentDs.Get<bool>() == true );
2609
2610
83
    if ( operations.empty() == true ) {
2611
10
        return;
2612
10
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
73
#if 1
2616
73
    {
2617
73
        std::set<uint64_t> moduleIDs;
2618
73
        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
73
        std::set<uint64_t> operationModuleIDs;
2630
88
        for (const auto& op : operations) {
2631
88
            operationModuleIDs.insert(op.first->ID);
2632
88
        }
2633
2634
73
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
73
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
73
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
73
        for (const auto& id : addModuleIDs) {
2639
19
            operations.push_back({ modules.at(id), operations[0].second});
2640
19
        }
2641
73
    }
2642
73
#endif
2643
2644
73
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
73
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
180
    for (size_t i = 0; i < operations.size(); i++) {
2652
107
        auto& operation = operations[i];
2653
2654
107
        auto& module = operation.first;
2655
107
        auto& op = operation.second;
2656
2657
107
        if ( i > 0 ) {
2658
78
            auto& prevModule = operations[i-1].first;
2659
78
            auto& prevOp = operations[i].second;
2660
2661
78
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
43
                auto& curModifier = op.modifier.GetVectorPtr();
2663
43
                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
94
                    for (auto& c : curModifier) {
2669
94
                        c++;
2670
94
                    }
2671
17
                }
2672
43
            }
2673
78
        }
2674
2675
107
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
107
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
107
        const auto& result = results.back();
2682
2683
107
        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
107
        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
107
        if ( options.disableTests == false ) {
2701
107
            tests::test(op, result.second);
2702
107
        }
2703
2704
107
        postprocess(module, op, result);
2705
107
    }
2706
2707
73
    if ( options.noCompare == false ) {
2708
29
        compare(operations, results, data, size);
2709
29
    }
2710
73
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
88
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
88
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
88
    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.37k
            continue;
2600
2.37k
        }
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
8
            break;
2607
8
        }
2608
2.52k
    } while ( parentDs.Get<bool>() == true );
2609
2610
88
    if ( operations.empty() == true ) {
2611
10
        return;
2612
10
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
78
#if 1
2616
78
    {
2617
78
        std::set<uint64_t> moduleIDs;
2618
78
        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
78
        std::set<uint64_t> operationModuleIDs;
2630
97
        for (const auto& op : operations) {
2631
97
            operationModuleIDs.insert(op.first->ID);
2632
97
        }
2633
2634
78
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
78
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
78
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
78
        for (const auto& id : addModuleIDs) {
2639
19
            operations.push_back({ modules.at(id), operations[0].second});
2640
19
        }
2641
78
    }
2642
78
#endif
2643
2644
78
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
78
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
194
    for (size_t i = 0; i < operations.size(); i++) {
2652
116
        auto& operation = operations[i];
2653
2654
116
        auto& module = operation.first;
2655
116
        auto& op = operation.second;
2656
2657
116
        if ( i > 0 ) {
2658
86
            auto& prevModule = operations[i-1].first;
2659
86
            auto& prevOp = operations[i].second;
2660
2661
86
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
48
                auto& curModifier = op.modifier.GetVectorPtr();
2663
48
                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
268
                    for (auto& c : curModifier) {
2669
268
                        c++;
2670
268
                    }
2671
23
                }
2672
48
            }
2673
86
        }
2674
2675
116
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
116
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
116
        const auto& result = results.back();
2682
2683
116
        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
116
        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
116
        if ( options.disableTests == false ) {
2701
116
            tests::test(op, result.second);
2702
116
        }
2703
2704
116
        postprocess(module, op, result);
2705
116
    }
2706
2707
78
    if ( options.noCompare == false ) {
2708
30
        compare(operations, results, data, size);
2709
30
    }
2710
78
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
509
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
509
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
509
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.81k
    do {
2596
2.81k
        auto op = getOp(&parentDs, data, size);
2597
2.81k
        auto module = getModule(parentDs);
2598
2.81k
        if ( module == nullptr ) {
2599
2.04k
            continue;
2600
2.04k
        }
2601
2602
765
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
765
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
13
            break;
2607
13
        }
2608
2.79k
    } while ( parentDs.Get<bool>() == true );
2609
2610
509
    if ( operations.empty() == true ) {
2611
21
        return;
2612
21
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
488
#if 1
2616
488
    {
2617
488
        std::set<uint64_t> moduleIDs;
2618
874
        for (const auto& m : modules ) {
2619
874
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
874
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
874
            moduleIDs.insert(moduleID);
2627
874
        }
2628
2629
488
        std::set<uint64_t> operationModuleIDs;
2630
683
        for (const auto& op : operations) {
2631
683
            operationModuleIDs.insert(op.first->ID);
2632
683
        }
2633
2634
488
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
488
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
488
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
488
        for (const auto& id : addModuleIDs) {
2639
419
            operations.push_back({ modules.at(id), operations[0].second});
2640
419
        }
2641
488
    }
2642
488
#endif
2643
2644
488
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
488
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.59k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.10k
        auto& operation = operations[i];
2653
2654
1.10k
        auto& module = operation.first;
2655
1.10k
        auto& op = operation.second;
2656
2657
1.10k
        if ( i > 0 ) {
2658
665
            auto& prevModule = operations[i-1].first;
2659
665
            auto& prevOp = operations[i].second;
2660
2661
665
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
219
                auto& curModifier = op.modifier.GetVectorPtr();
2663
219
                if ( curModifier.size() == 0 ) {
2664
65.1k
                    for (size_t j = 0; j < 512; j++) {
2665
65.0k
                        curModifier.push_back(1);
2666
65.0k
                    }
2667
127
                } else {
2668
404
                    for (auto& c : curModifier) {
2669
404
                        c++;
2670
404
                    }
2671
92
                }
2672
219
            }
2673
665
        }
2674
2675
1.10k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.10k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.10k
        const auto& result = results.back();
2682
2683
1.10k
        if ( result.second != std::nullopt ) {
2684
403
            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
403
        }
2691
2692
1.10k
        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.10k
        if ( options.disableTests == false ) {
2701
1.10k
            tests::test(op, result.second);
2702
1.10k
        }
2703
2704
1.10k
        postprocess(module, op, result);
2705
1.10k
    }
2706
2707
488
    if ( options.noCompare == false ) {
2708
437
        compare(operations, results, data, size);
2709
437
    }
2710
488
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::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.04k
    do {
2596
2.04k
        auto op = getOp(&parentDs, data, size);
2597
2.04k
        auto module = getModule(parentDs);
2598
2.04k
        if ( module == nullptr ) {
2599
1.84k
            continue;
2600
1.84k
        }
2601
2602
196
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
196
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
2.03k
    } while ( parentDs.Get<bool>() == true );
2609
2610
123
    if ( operations.empty() == true ) {
2611
16
        return;
2612
16
    }
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
112
        for (const auto& op : operations) {
2631
112
            operationModuleIDs.insert(op.first->ID);
2632
112
        }
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
36
            operations.push_back({ modules.at(id), operations[0].second});
2640
36
        }
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
255
    for (size_t i = 0; i < operations.size(); i++) {
2652
148
        auto& operation = operations[i];
2653
2654
148
        auto& module = operation.first;
2655
148
        auto& op = operation.second;
2656
2657
148
        if ( i > 0 ) {
2658
102
            auto& prevModule = operations[i-1].first;
2659
102
            auto& prevOp = operations[i].second;
2660
2661
102
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
51
                auto& curModifier = op.modifier.GetVectorPtr();
2663
51
                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
34
                } else {
2668
209
                    for (auto& c : curModifier) {
2669
209
                        c++;
2670
209
                    }
2671
34
                }
2672
51
            }
2673
102
        }
2674
2675
148
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
148
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
148
        const auto& result = results.back();
2682
2683
148
        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
148
        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
148
        if ( options.disableTests == false ) {
2701
148
            tests::test(op, result.second);
2702
148
        }
2703
2704
148
        postprocess(module, op, result);
2705
148
    }
2706
2707
107
    if ( options.noCompare == false ) {
2708
46
        compare(operations, results, data, size);
2709
46
    }
2710
107
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::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
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
214
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
214
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
10
            break;
2607
10
        }
2608
2.34k
    } while ( parentDs.Get<bool>() == true );
2609
2610
125
    if ( operations.empty() == true ) {
2611
13
        return;
2612
13
    }
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
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
112
        std::set<uint64_t> operationModuleIDs;
2630
149
        for (const auto& op : operations) {
2631
149
            operationModuleIDs.insert(op.first->ID);
2632
149
        }
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
37
            operations.push_back({ modules.at(id), operations[0].second});
2640
37
        }
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
298
    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
20.0k
                    for (size_t j = 0; j < 512; j++) {
2665
19.9k
                        curModifier.push_back(1);
2666
19.9k
                    }
2667
40
                } else {
2668
446
                    for (auto& c : curModifier) {
2669
446
                        c++;
2670
446
                    }
2671
40
                }
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
112
    if ( options.noCompare == false ) {
2708
50
        compare(operations, results, data, size);
2709
50
    }
2710
112
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
142
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
142
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
142
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.76k
    do {
2596
1.76k
        auto op = getOp(&parentDs, data, size);
2597
1.76k
        auto module = getModule(parentDs);
2598
1.76k
        if ( module == nullptr ) {
2599
1.59k
            continue;
2600
1.59k
        }
2601
2602
175
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
175
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
1.76k
    } while ( parentDs.Get<bool>() == true );
2609
2610
142
    if ( operations.empty() == true ) {
2611
20
        return;
2612
20
    }
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
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
122
        std::set<uint64_t> operationModuleIDs;
2630
122
        for (const auto& op : operations) {
2631
94
            operationModuleIDs.insert(op.first->ID);
2632
94
        }
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
22
            operations.push_back({ modules.at(id), operations[0].second});
2640
22
        }
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
238
    for (size_t i = 0; i < operations.size(); i++) {
2652
116
        auto& operation = operations[i];
2653
2654
116
        auto& module = operation.first;
2655
116
        auto& op = operation.second;
2656
2657
116
        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
48
                auto& curModifier = op.modifier.GetVectorPtr();
2663
48
                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
29
                } else {
2668
234
                    for (auto& c : curModifier) {
2669
234
                        c++;
2670
234
                    }
2671
29
                }
2672
48
            }
2673
85
        }
2674
2675
116
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
116
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
116
        const auto& result = results.back();
2682
2683
116
        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
116
        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
116
        if ( options.disableTests == false ) {
2701
116
            tests::test(op, result.second);
2702
116
        }
2703
2704
116
        postprocess(module, op, result);
2705
116
    }
2706
2707
122
    if ( options.noCompare == false ) {
2708
31
        compare(operations, results, data, size);
2709
31
    }
2710
122
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
124
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
124
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
124
    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.37k
            continue;
2600
2.37k
        }
2601
2602
153
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
153
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
2.52k
    } while ( parentDs.Get<bool>() == true );
2609
2610
124
    if ( operations.empty() == true ) {
2611
24
        return;
2612
24
    }
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
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
100
        std::set<uint64_t> operationModuleIDs;
2630
100
        for (const auto& op : operations) {
2631
78
            operationModuleIDs.insert(op.first->ID);
2632
78
        }
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
18
            operations.push_back({ modules.at(id), operations[0].second});
2640
18
        }
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
196
    for (size_t i = 0; i < operations.size(); i++) {
2652
96
        auto& operation = operations[i];
2653
2654
96
        auto& module = operation.first;
2655
96
        auto& op = operation.second;
2656
2657
96
        if ( i > 0 ) {
2658
69
            auto& prevModule = operations[i-1].first;
2659
69
            auto& prevOp = operations[i].second;
2660
2661
69
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
36
                auto& curModifier = op.modifier.GetVectorPtr();
2663
36
                if ( curModifier.size() == 0 ) {
2664
8.20k
                    for (size_t j = 0; j < 512; j++) {
2665
8.19k
                        curModifier.push_back(1);
2666
8.19k
                    }
2667
20
                } else {
2668
356
                    for (auto& c : curModifier) {
2669
356
                        c++;
2670
356
                    }
2671
20
                }
2672
36
            }
2673
69
        }
2674
2675
96
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
96
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
96
        const auto& result = results.back();
2682
2683
96
        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
96
        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
96
        if ( options.disableTests == false ) {
2701
96
            tests::test(op, result.second);
2702
96
        }
2703
2704
96
        postprocess(module, op, result);
2705
96
    }
2706
2707
100
    if ( options.noCompare == false ) {
2708
27
        compare(operations, results, data, size);
2709
27
    }
2710
100
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
137
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
137
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
137
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.14k
    do {
2596
2.14k
        auto op = getOp(&parentDs, data, size);
2597
2.14k
        auto module = getModule(parentDs);
2598
2.14k
        if ( module == nullptr ) {
2599
1.94k
            continue;
2600
1.94k
        }
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
8
            break;
2607
8
        }
2608
2.14k
    } while ( parentDs.Get<bool>() == true );
2609
2610
137
    if ( operations.empty() == true ) {
2611
21
        return;
2612
21
    }
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
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
116
        std::set<uint64_t> operationModuleIDs;
2630
116
        for (const auto& op : operations) {
2631
113
            operationModuleIDs.insert(op.first->ID);
2632
113
        }
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
32
            operations.push_back({ modules.at(id), operations[0].second});
2640
32
        }
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
261
    for (size_t i = 0; i < operations.size(); i++) {
2652
145
        auto& operation = operations[i];
2653
2654
145
        auto& module = operation.first;
2655
145
        auto& op = operation.second;
2656
2657
145
        if ( i > 0 ) {
2658
102
            auto& prevModule = operations[i-1].first;
2659
102
            auto& prevOp = operations[i].second;
2660
2661
102
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
51
                auto& curModifier = op.modifier.GetVectorPtr();
2663
51
                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
28
                } else {
2668
301
                    for (auto& c : curModifier) {
2669
301
                        c++;
2670
301
                    }
2671
28
                }
2672
51
            }
2673
102
        }
2674
2675
145
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
145
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
145
        const auto& result = results.back();
2682
2683
145
        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
145
        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
145
        if ( options.disableTests == false ) {
2701
145
            tests::test(op, result.second);
2702
145
        }
2703
2704
145
        postprocess(module, op, result);
2705
145
    }
2706
2707
116
    if ( options.noCompare == false ) {
2708
43
        compare(operations, results, data, size);
2709
43
    }
2710
116
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
147
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
147
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
147
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.83k
    do {
2596
1.83k
        auto op = getOp(&parentDs, data, size);
2597
1.83k
        auto module = getModule(parentDs);
2598
1.83k
        if ( module == nullptr ) {
2599
1.63k
            continue;
2600
1.63k
        }
2601
2602
202
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
202
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
10
            break;
2607
10
        }
2608
1.82k
    } while ( parentDs.Get<bool>() == true );
2609
2610
147
    if ( operations.empty() == true ) {
2611
24
        return;
2612
24
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
123
#if 1
2616
123
    {
2617
123
        std::set<uint64_t> moduleIDs;
2618
123
        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
123
        std::set<uint64_t> operationModuleIDs;
2630
123
        for (const auto& op : operations) {
2631
113
            operationModuleIDs.insert(op.first->ID);
2632
113
        }
2633
2634
123
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
123
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
123
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
123
        for (const auto& id : addModuleIDs) {
2639
24
            operations.push_back({ modules.at(id), operations[0].second});
2640
24
        }
2641
123
    }
2642
123
#endif
2643
2644
123
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
123
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
260
    for (size_t i = 0; i < operations.size(); i++) {
2652
137
        auto& operation = operations[i];
2653
2654
137
        auto& module = operation.first;
2655
137
        auto& op = operation.second;
2656
2657
137
        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
53
                auto& curModifier = op.modifier.GetVectorPtr();
2663
53
                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
278
                    for (auto& c : curModifier) {
2669
278
                        c++;
2670
278
                    }
2671
26
                }
2672
53
            }
2673
101
        }
2674
2675
137
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
137
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
137
        const auto& result = results.back();
2682
2683
137
        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
137
        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
137
        if ( options.disableTests == false ) {
2701
137
            tests::test(op, result.second);
2702
137
        }
2703
2704
137
        postprocess(module, op, result);
2705
137
    }
2706
2707
123
    if ( options.noCompare == false ) {
2708
36
        compare(operations, results, data, size);
2709
36
    }
2710
123
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::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.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.88k
            continue;
2600
1.88k
        }
2601
2602
174
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
174
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
2.04k
    } while ( parentDs.Get<bool>() == true );
2609
2610
96
    if ( operations.empty() == true ) {
2611
5
        return;
2612
5
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
91
#if 1
2616
91
    {
2617
91
        std::set<uint64_t> moduleIDs;
2618
91
        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
91
        std::set<uint64_t> operationModuleIDs;
2630
94
        for (const auto& op : operations) {
2631
94
            operationModuleIDs.insert(op.first->ID);
2632
94
        }
2633
2634
91
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
91
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
91
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
91
        for (const auto& id : addModuleIDs) {
2639
20
            operations.push_back({ modules.at(id), operations[0].second});
2640
20
        }
2641
91
    }
2642
91
#endif
2643
2644
91
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
91
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
205
    for (size_t i = 0; i < operations.size(); i++) {
2652
114
        auto& operation = operations[i];
2653
2654
114
        auto& module = operation.first;
2655
114
        auto& op = operation.second;
2656
2657
114
        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
43
                auto& curModifier = op.modifier.GetVectorPtr();
2663
43
                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
24
                } else {
2668
892
                    for (auto& c : curModifier) {
2669
892
                        c++;
2670
892
                    }
2671
24
                }
2672
43
            }
2673
83
        }
2674
2675
114
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
114
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
114
        const auto& result = results.back();
2682
2683
114
        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
114
        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
114
        if ( options.disableTests == false ) {
2701
114
            tests::test(op, result.second);
2702
114
        }
2703
2704
114
        postprocess(module, op, result);
2705
114
    }
2706
2707
91
    if ( options.noCompare == false ) {
2708
31
        compare(operations, results, data, size);
2709
31
    }
2710
91
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::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.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
2.22k
            continue;
2600
2.22k
        }
2601
2602
158
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
158
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
9
            break;
2607
9
        }
2608
2.37k
    } while ( parentDs.Get<bool>() == true );
2609
2610
96
    if ( operations.empty() == true ) {
2611
14
        return;
2612
14
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
82
#if 1
2616
82
    {
2617
82
        std::set<uint64_t> moduleIDs;
2618
82
        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
82
        std::set<uint64_t> operationModuleIDs;
2630
101
        for (const auto& op : operations) {
2631
101
            operationModuleIDs.insert(op.first->ID);
2632
101
        }
2633
2634
82
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
82
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
82
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
82
        for (const auto& id : addModuleIDs) {
2639
23
            operations.push_back({ modules.at(id), operations[0].second});
2640
23
        }
2641
82
    }
2642
82
#endif
2643
2644
82
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
82
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
206
    for (size_t i = 0; i < operations.size(); i++) {
2652
124
        auto& operation = operations[i];
2653
2654
124
        auto& module = operation.first;
2655
124
        auto& op = operation.second;
2656
2657
124
        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
50
                auto& curModifier = op.modifier.GetVectorPtr();
2663
50
                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
28
                } else {
2668
131
                    for (auto& c : curModifier) {
2669
131
                        c++;
2670
131
                    }
2671
28
                }
2672
50
            }
2673
91
        }
2674
2675
124
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
124
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
124
        const auto& result = results.back();
2682
2683
124
        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
124
        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
124
        if ( options.disableTests == false ) {
2701
124
            tests::test(op, result.second);
2702
124
        }
2703
2704
124
        postprocess(module, op, result);
2705
124
    }
2706
2707
82
    if ( options.noCompare == false ) {
2708
33
        compare(operations, results, data, size);
2709
33
    }
2710
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
139
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
139
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
139
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.90k
    do {
2596
1.90k
        auto op = getOp(&parentDs, data, size);
2597
1.90k
        auto module = getModule(parentDs);
2598
1.90k
        if ( module == nullptr ) {
2599
1.67k
            continue;
2600
1.67k
        }
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.89k
    } while ( parentDs.Get<bool>() == true );
2609
2610
139
    if ( operations.empty() == true ) {
2611
22
        return;
2612
22
    }
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
134
        for (const auto& m : modules ) {
2619
134
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
134
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
134
            moduleIDs.insert(moduleID);
2627
134
        }
2628
2629
117
        std::set<uint64_t> operationModuleIDs;
2630
179
        for (const auto& op : operations) {
2631
179
            operationModuleIDs.insert(op.first->ID);
2632
179
        }
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
57
            operations.push_back({ modules.at(id), operations[0].second});
2640
57
        }
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
353
    for (size_t i = 0; i < operations.size(); i++) {
2652
236
        auto& operation = operations[i];
2653
2654
236
        auto& module = operation.first;
2655
236
        auto& op = operation.second;
2656
2657
236
        if ( i > 0 ) {
2658
169
            auto& prevModule = operations[i-1].first;
2659
169
            auto& prevOp = operations[i].second;
2660
2661
169
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
95
                auto& curModifier = op.modifier.GetVectorPtr();
2663
95
                if ( curModifier.size() == 0 ) {
2664
29.7k
                    for (size_t j = 0; j < 512; j++) {
2665
29.6k
                        curModifier.push_back(1);
2666
29.6k
                    }
2667
58
                } else {
2668
302
                    for (auto& c : curModifier) {
2669
302
                        c++;
2670
302
                    }
2671
37
                }
2672
95
            }
2673
169
        }
2674
2675
236
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
236
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
236
        const auto& result = results.back();
2682
2683
236
        if ( result.second != std::nullopt ) {
2684
48
            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
48
        }
2691
2692
236
        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
236
        if ( options.disableTests == false ) {
2701
236
            tests::test(op, result.second);
2702
236
        }
2703
2704
236
        postprocess(module, op, result);
2705
236
    }
2706
2707
117
    if ( options.noCompare == false ) {
2708
67
        compare(operations, results, data, size);
2709
67
    }
2710
117
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
443
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
443
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
443
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.89k
    do {
2596
2.89k
        auto op = getOp(&parentDs, data, size);
2597
2.89k
        auto module = getModule(parentDs);
2598
2.89k
        if ( module == nullptr ) {
2599
2.31k
            continue;
2600
2.31k
        }
2601
2602
577
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
577
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
15
            break;
2607
15
        }
2608
2.87k
    } while ( parentDs.Get<bool>() == true );
2609
2610
443
    if ( operations.empty() == true ) {
2611
46
        return;
2612
46
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
397
#if 1
2616
397
    {
2617
397
        std::set<uint64_t> moduleIDs;
2618
648
        for (const auto& m : modules ) {
2619
648
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
648
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
648
            moduleIDs.insert(moduleID);
2627
648
        }
2628
2629
397
        std::set<uint64_t> operationModuleIDs;
2630
490
        for (const auto& op : operations) {
2631
490
            operationModuleIDs.insert(op.first->ID);
2632
490
        }
2633
2634
397
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
397
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
397
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
397
        for (const auto& id : addModuleIDs) {
2639
309
            operations.push_back({ modules.at(id), operations[0].second});
2640
309
        }
2641
397
    }
2642
397
#endif
2643
2644
397
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
397
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.19k
    for (size_t i = 0; i < operations.size(); i++) {
2652
799
        auto& operation = operations[i];
2653
2654
799
        auto& module = operation.first;
2655
799
        auto& op = operation.second;
2656
2657
799
        if ( i > 0 ) {
2658
475
            auto& prevModule = operations[i-1].first;
2659
475
            auto& prevOp = operations[i].second;
2660
2661
475
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
138
                auto& curModifier = op.modifier.GetVectorPtr();
2663
138
                if ( curModifier.size() == 0 ) {
2664
40.5k
                    for (size_t j = 0; j < 512; j++) {
2665
40.4k
                        curModifier.push_back(1);
2666
40.4k
                    }
2667
79
                } else {
2668
461
                    for (auto& c : curModifier) {
2669
461
                        c++;
2670
461
                    }
2671
59
                }
2672
138
            }
2673
475
        }
2674
2675
799
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
799
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
799
        const auto& result = results.back();
2682
2683
799
        if ( result.second != std::nullopt ) {
2684
130
            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
130
        }
2691
2692
799
        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
799
        if ( options.disableTests == false ) {
2701
799
            tests::test(op, result.second);
2702
799
        }
2703
2704
799
        postprocess(module, op, result);
2705
799
    }
2706
2707
397
    if ( options.noCompare == false ) {
2708
324
        compare(operations, results, data, size);
2709
324
    }
2710
397
}
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.94k
    do {
2596
1.94k
        auto op = getOp(&parentDs, data, size);
2597
1.94k
        auto module = getModule(parentDs);
2598
1.94k
        if ( module == nullptr ) {
2599
1.67k
            continue;
2600
1.67k
        }
2601
2602
268
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
268
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
1.93k
    } while ( parentDs.Get<bool>() == true );
2609
2610
193
    if ( operations.empty() == true ) {
2611
35
        return;
2612
35
    }
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
150
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
150
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
150
            moduleIDs.insert(moduleID);
2627
150
        }
2628
2629
158
        std::set<uint64_t> operationModuleIDs;
2630
181
        for (const auto& op : operations) {
2631
181
            operationModuleIDs.insert(op.first->ID);
2632
181
        }
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
63
            operations.push_back({ modules.at(id), operations[0].second});
2640
63
        }
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
402
    for (size_t i = 0; i < operations.size(); i++) {
2652
244
        auto& operation = operations[i];
2653
2654
244
        auto& module = operation.first;
2655
244
        auto& op = operation.second;
2656
2657
244
        if ( i > 0 ) {
2658
169
            auto& prevModule = operations[i-1].first;
2659
169
            auto& prevOp = operations[i].second;
2660
2661
169
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
88
                auto& curModifier = op.modifier.GetVectorPtr();
2663
88
                if ( curModifier.size() == 0 ) {
2664
29.7k
                    for (size_t j = 0; j < 512; j++) {
2665
29.6k
                        curModifier.push_back(1);
2666
29.6k
                    }
2667
58
                } else {
2668
321
                    for (auto& c : curModifier) {
2669
321
                        c++;
2670
321
                    }
2671
30
                }
2672
88
            }
2673
169
        }
2674
2675
244
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
244
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
244
        const auto& result = results.back();
2682
2683
244
        if ( result.second != std::nullopt ) {
2684
41
            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
41
        }
2691
2692
244
        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
244
        if ( options.disableTests == false ) {
2701
244
            tests::test(op, result.second);
2702
244
        }
2703
2704
244
        postprocess(module, op, result);
2705
244
    }
2706
2707
158
    if ( options.noCompare == false ) {
2708
75
        compare(operations, results, data, size);
2709
75
    }
2710
158
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::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
1.76k
    do {
2596
1.76k
        auto op = getOp(&parentDs, data, size);
2597
1.76k
        auto module = getModule(parentDs);
2598
1.76k
        if ( module == nullptr ) {
2599
1.54k
            continue;
2600
1.54k
        }
2601
2602
219
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
219
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
9
            break;
2607
9
        }
2608
1.75k
    } while ( parentDs.Get<bool>() == true );
2609
2610
145
    if ( operations.empty() == true ) {
2611
19
        return;
2612
19
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
126
#if 1
2616
126
    {
2617
126
        std::set<uint64_t> moduleIDs;
2618
126
        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
126
        std::set<uint64_t> operationModuleIDs;
2630
153
        for (const auto& op : operations) {
2631
153
            operationModuleIDs.insert(op.first->ID);
2632
153
        }
2633
2634
126
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
126
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
126
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
126
        for (const auto& id : addModuleIDs) {
2639
48
            operations.push_back({ modules.at(id), operations[0].second});
2640
48
        }
2641
126
    }
2642
126
#endif
2643
2644
126
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
126
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
327
    for (size_t i = 0; i < operations.size(); i++) {
2652
201
        auto& operation = operations[i];
2653
2654
201
        auto& module = operation.first;
2655
201
        auto& op = operation.second;
2656
2657
201
        if ( i > 0 ) {
2658
140
            auto& prevModule = operations[i-1].first;
2659
140
            auto& prevOp = operations[i].second;
2660
2661
140
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
73
                auto& curModifier = op.modifier.GetVectorPtr();
2663
73
                if ( curModifier.size() == 0 ) {
2664
22.5k
                    for (size_t j = 0; j < 512; j++) {
2665
22.5k
                        curModifier.push_back(1);
2666
22.5k
                    }
2667
44
                } else {
2668
244
                    for (auto& c : curModifier) {
2669
244
                        c++;
2670
244
                    }
2671
29
                }
2672
73
            }
2673
140
        }
2674
2675
201
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
201
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
201
        const auto& result = results.back();
2682
2683
201
        if ( result.second != std::nullopt ) {
2684
19
            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
19
        }
2691
2692
201
        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
201
        if ( options.disableTests == false ) {
2701
201
            tests::test(op, result.second);
2702
201
        }
2703
2704
201
        postprocess(module, op, result);
2705
201
    }
2706
2707
126
    if ( options.noCompare == false ) {
2708
61
        compare(operations, results, data, size);
2709
61
    }
2710
126
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
169
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
169
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
169
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.01k
    do {
2596
3.01k
        auto op = getOp(&parentDs, data, size);
2597
3.01k
        auto module = getModule(parentDs);
2598
3.01k
        if ( module == nullptr ) {
2599
2.72k
            continue;
2600
2.72k
        }
2601
2602
293
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
293
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
12
            break;
2607
12
        }
2608
3.00k
    } while ( parentDs.Get<bool>() == true );
2609
2610
169
    if ( operations.empty() == true ) {
2611
26
        return;
2612
26
    }
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
156
        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
143
        std::set<uint64_t> operationModuleIDs;
2630
209
        for (const auto& op : operations) {
2631
209
            operationModuleIDs.insert(op.first->ID);
2632
209
        }
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
64
            operations.push_back({ modules.at(id), operations[0].second});
2640
64
        }
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
416
    for (size_t i = 0; i < operations.size(); i++) {
2652
273
        auto& operation = operations[i];
2653
2654
273
        auto& module = operation.first;
2655
273
        auto& op = operation.second;
2656
2657
273
        if ( i > 0 ) {
2658
195
            auto& prevModule = operations[i-1].first;
2659
195
            auto& prevOp = operations[i].second;
2660
2661
195
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
109
                auto& curModifier = op.modifier.GetVectorPtr();
2663
109
                if ( curModifier.size() == 0 ) {
2664
30.2k
                    for (size_t j = 0; j < 512; j++) {
2665
30.2k
                        curModifier.push_back(1);
2666
30.2k
                    }
2667
59
                } else {
2668
355
                    for (auto& c : curModifier) {
2669
355
                        c++;
2670
355
                    }
2671
50
                }
2672
109
            }
2673
195
        }
2674
2675
273
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
273
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
273
        const auto& result = results.back();
2682
2683
273
        if ( result.second != std::nullopt ) {
2684
19
            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
19
        }
2691
2692
273
        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
273
        if ( options.disableTests == false ) {
2701
273
            tests::test(op, result.second);
2702
273
        }
2703
2704
273
        postprocess(module, op, result);
2705
273
    }
2706
2707
143
    if ( options.noCompare == false ) {
2708
78
        compare(operations, results, data, size);
2709
78
    }
2710
143
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
142
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
142
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
142
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.23k
    do {
2596
2.23k
        auto op = getOp(&parentDs, data, size);
2597
2.23k
        auto module = getModule(parentDs);
2598
2.23k
        if ( module == nullptr ) {
2599
2.06k
            continue;
2600
2.06k
        }
2601
2602
170
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
170
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.22k
    } while ( parentDs.Get<bool>() == true );
2609
2610
142
    if ( operations.empty() == true ) {
2611
16
        return;
2612
16
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
126
#if 1
2616
126
    {
2617
126
        std::set<uint64_t> moduleIDs;
2618
126
        for (const auto& m : modules ) {
2619
64
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
64
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
64
            moduleIDs.insert(moduleID);
2627
64
        }
2628
2629
126
        std::set<uint64_t> operationModuleIDs;
2630
126
        for (const auto& op : operations) {
2631
92
            operationModuleIDs.insert(op.first->ID);
2632
92
        }
2633
2634
126
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
126
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
126
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
126
        for (const auto& id : addModuleIDs) {
2639
22
            operations.push_back({ modules.at(id), operations[0].second});
2640
22
        }
2641
126
    }
2642
126
#endif
2643
2644
126
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
126
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
240
    for (size_t i = 0; i < operations.size(); i++) {
2652
114
        auto& operation = operations[i];
2653
2654
114
        auto& module = operation.first;
2655
114
        auto& op = operation.second;
2656
2657
114
        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
44
                auto& curModifier = op.modifier.GetVectorPtr();
2663
44
                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
23
                } else {
2668
291
                    for (auto& c : curModifier) {
2669
291
                        c++;
2670
291
                    }
2671
23
                }
2672
44
            }
2673
82
        }
2674
2675
114
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
114
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
114
        const auto& result = results.back();
2682
2683
114
        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
114
        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
114
        if ( options.disableTests == false ) {
2701
114
            tests::test(op, result.second);
2702
114
        }
2703
2704
114
        postprocess(module, op, result);
2705
114
    }
2706
2707
126
    if ( options.noCompare == false ) {
2708
32
        compare(operations, results, data, size);
2709
32
    }
2710
126
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
268
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
268
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
268
    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.22k
            continue;
2600
2.22k
        }
2601
2602
467
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
467
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
16
            break;
2607
16
        }
2608
2.67k
    } while ( parentDs.Get<bool>() == true );
2609
2610
268
    if ( operations.empty() == true ) {
2611
12
        return;
2612
12
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
256
#if 1
2616
256
    {
2617
256
        std::set<uint64_t> moduleIDs;
2618
394
        for (const auto& m : modules ) {
2619
394
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
394
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
394
            moduleIDs.insert(moduleID);
2627
394
        }
2628
2629
256
        std::set<uint64_t> operationModuleIDs;
2630
407
        for (const auto& op : operations) {
2631
407
            operationModuleIDs.insert(op.first->ID);
2632
407
        }
2633
2634
256
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
256
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
256
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
256
        for (const auto& id : addModuleIDs) {
2639
181
            operations.push_back({ modules.at(id), operations[0].second});
2640
181
        }
2641
256
    }
2642
256
#endif
2643
2644
256
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
256
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
844
    for (size_t i = 0; i < operations.size(); i++) {
2652
588
        auto& operation = operations[i];
2653
2654
588
        auto& module = operation.first;
2655
588
        auto& op = operation.second;
2656
2657
588
        if ( i > 0 ) {
2658
391
            auto& prevModule = operations[i-1].first;
2659
391
            auto& prevOp = operations[i].second;
2660
2661
391
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
185
                auto& curModifier = op.modifier.GetVectorPtr();
2663
185
                if ( curModifier.size() == 0 ) {
2664
50.2k
                    for (size_t j = 0; j < 512; j++) {
2665
50.1k
                        curModifier.push_back(1);
2666
50.1k
                    }
2667
98
                } else {
2668
2.11k
                    for (auto& c : curModifier) {
2669
2.11k
                        c++;
2670
2.11k
                    }
2671
87
                }
2672
185
            }
2673
391
        }
2674
2675
588
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
588
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
588
        const auto& result = results.back();
2682
2683
588
        if ( result.second != std::nullopt ) {
2684
45
            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
45
        }
2691
2692
588
        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
588
        if ( options.disableTests == false ) {
2701
588
            tests::test(op, result.second);
2702
588
        }
2703
2704
588
        postprocess(module, op, result);
2705
588
    }
2706
2707
256
    if ( options.noCompare == false ) {
2708
197
        compare(operations, results, data, size);
2709
197
    }
2710
256
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
5.33k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
5.33k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
5.33k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
15.1k
    do {
2596
15.1k
        auto op = getOp(&parentDs, data, size);
2597
15.1k
        auto module = getModule(parentDs);
2598
15.1k
        if ( module == nullptr ) {
2599
7.19k
            continue;
2600
7.19k
        }
2601
2602
7.98k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
7.98k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
136
            break;
2607
136
        }
2608
15.0k
    } while ( parentDs.Get<bool>() == true );
2609
2610
5.33k
    if ( operations.empty() == true ) {
2611
68
        return;
2612
68
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
5.26k
#if 1
2616
5.26k
    {
2617
5.26k
        std::set<uint64_t> moduleIDs;
2618
10.0k
        for (const auto& m : modules ) {
2619
10.0k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
10.0k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
10.0k
            moduleIDs.insert(moduleID);
2627
10.0k
        }
2628
2629
5.26k
        std::set<uint64_t> operationModuleIDs;
2630
7.72k
        for (const auto& op : operations) {
2631
7.72k
            operationModuleIDs.insert(op.first->ID);
2632
7.72k
        }
2633
2634
5.26k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
5.26k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
5.26k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
5.26k
        for (const auto& id : addModuleIDs) {
2639
5.01k
            operations.push_back({ modules.at(id), operations[0].second});
2640
5.01k
        }
2641
5.26k
    }
2642
5.26k
#endif
2643
2644
5.26k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
5.26k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
18.0k
    for (size_t i = 0; i < operations.size(); i++) {
2652
12.7k
        auto& operation = operations[i];
2653
2654
12.7k
        auto& module = operation.first;
2655
12.7k
        auto& op = operation.second;
2656
2657
12.7k
        if ( i > 0 ) {
2658
7.69k
            auto& prevModule = operations[i-1].first;
2659
7.69k
            auto& prevOp = operations[i].second;
2660
2661
7.69k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
2.63k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
2.63k
                if ( curModifier.size() == 0 ) {
2664
695k
                    for (size_t j = 0; j < 512; j++) {
2665
694k
                        curModifier.push_back(1);
2666
694k
                    }
2667
1.35k
                } else {
2668
62.3k
                    for (auto& c : curModifier) {
2669
62.3k
                        c++;
2670
62.3k
                    }
2671
1.27k
                }
2672
2.63k
            }
2673
7.69k
        }
2674
2675
12.7k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
12.7k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
12.7k
        const auto& result = results.back();
2682
2683
12.7k
        if ( result.second != std::nullopt ) {
2684
3.59k
            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
3.59k
        }
2691
2692
12.7k
        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.7k
        if ( options.disableTests == false ) {
2701
12.7k
            tests::test(op, result.second);
2702
12.7k
        }
2703
2704
12.7k
        postprocess(module, op, result);
2705
12.7k
    }
2706
2707
5.26k
    if ( options.noCompare == false ) {
2708
5.04k
        compare(operations, results, data, size);
2709
5.04k
    }
2710
5.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
114
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
114
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
114
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.95k
    do {
2596
1.95k
        auto op = getOp(&parentDs, data, size);
2597
1.95k
        auto module = getModule(parentDs);
2598
1.95k
        if ( module == nullptr ) {
2599
1.75k
            continue;
2600
1.75k
        }
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
10
            break;
2607
10
        }
2608
1.94k
    } while ( parentDs.Get<bool>() == true );
2609
2610
114
    if ( operations.empty() == true ) {
2611
9
        return;
2612
9
    }
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
124
        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
105
        std::set<uint64_t> operationModuleIDs;
2630
146
        for (const auto& op : operations) {
2631
146
            operationModuleIDs.insert(op.first->ID);
2632
146
        }
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
51
            operations.push_back({ modules.at(id), operations[0].second});
2640
51
        }
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
302
    for (size_t i = 0; i < operations.size(); i++) {
2652
197
        auto& operation = operations[i];
2653
2654
197
        auto& module = operation.first;
2655
197
        auto& op = operation.second;
2656
2657
197
        if ( i > 0 ) {
2658
135
            auto& prevModule = operations[i-1].first;
2659
135
            auto& prevOp = operations[i].second;
2660
2661
135
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
66
                auto& curModifier = op.modifier.GetVectorPtr();
2663
66
                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
42
                } else {
2668
312
                    for (auto& c : curModifier) {
2669
312
                        c++;
2670
312
                    }
2671
42
                }
2672
66
            }
2673
135
        }
2674
2675
197
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
197
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
197
        const auto& result = results.back();
2682
2683
197
        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
197
        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
197
        if ( options.disableTests == false ) {
2701
197
            tests::test(op, result.second);
2702
197
        }
2703
2704
197
        postprocess(module, op, result);
2705
197
    }
2706
2707
105
    if ( options.noCompare == false ) {
2708
62
        compare(operations, results, data, size);
2709
62
    }
2710
105
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
288
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
288
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
288
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.32k
    do {
2596
3.32k
        auto op = getOp(&parentDs, data, size);
2597
3.32k
        auto module = getModule(parentDs);
2598
3.32k
        if ( module == nullptr ) {
2599
2.83k
            continue;
2600
2.83k
        }
2601
2602
495
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
495
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
5
            break;
2607
5
        }
2608
3.32k
    } while ( parentDs.Get<bool>() == true );
2609
2610
288
    if ( operations.empty() == true ) {
2611
12
        return;
2612
12
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
276
#if 1
2616
276
    {
2617
276
        std::set<uint64_t> moduleIDs;
2618
440
        for (const auto& m : modules ) {
2619
440
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
440
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
440
            moduleIDs.insert(moduleID);
2627
440
        }
2628
2629
276
        std::set<uint64_t> operationModuleIDs;
2630
422
        for (const auto& op : operations) {
2631
422
            operationModuleIDs.insert(op.first->ID);
2632
422
        }
2633
2634
276
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
276
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
276
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
276
        for (const auto& id : addModuleIDs) {
2639
214
            operations.push_back({ modules.at(id), operations[0].second});
2640
214
        }
2641
276
    }
2642
276
#endif
2643
2644
276
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
276
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
912
    for (size_t i = 0; i < operations.size(); i++) {
2652
636
        auto& operation = operations[i];
2653
2654
636
        auto& module = operation.first;
2655
636
        auto& op = operation.second;
2656
2657
636
        if ( i > 0 ) {
2658
416
            auto& prevModule = operations[i-1].first;
2659
416
            auto& prevOp = operations[i].second;
2660
2661
416
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
194
                auto& curModifier = op.modifier.GetVectorPtr();
2663
194
                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
177
                } else {
2668
785
                    for (auto& c : curModifier) {
2669
785
                        c++;
2670
785
                    }
2671
177
                }
2672
194
            }
2673
416
        }
2674
2675
636
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
636
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
636
        const auto& result = results.back();
2682
2683
636
        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
636
        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
636
        if ( options.disableTests == false ) {
2701
636
            tests::test(op, result.second);
2702
636
        }
2703
2704
636
        postprocess(module, op, result);
2705
636
    }
2706
2707
276
    if ( options.noCompare == false ) {
2708
220
        compare(operations, results, data, size);
2709
220
    }
2710
276
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
139
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
139
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
139
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.72k
    do {
2596
1.72k
        auto op = getOp(&parentDs, data, size);
2597
1.72k
        auto module = getModule(parentDs);
2598
1.72k
        if ( module == nullptr ) {
2599
1.52k
            continue;
2600
1.52k
        }
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
11
            break;
2607
11
        }
2608
1.71k
    } while ( parentDs.Get<bool>() == true );
2609
2610
139
    if ( operations.empty() == true ) {
2611
23
        return;
2612
23
    }
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
124
        for (const auto& op : operations) {
2631
124
            operationModuleIDs.insert(op.first->ID);
2632
124
        }
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
29
            operations.push_back({ modules.at(id), operations[0].second});
2640
29
        }
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
269
    for (size_t i = 0; i < operations.size(); i++) {
2652
153
        auto& operation = operations[i];
2653
2654
153
        auto& module = operation.first;
2655
153
        auto& op = operation.second;
2656
2657
153
        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
61
                auto& curModifier = op.modifier.GetVectorPtr();
2663
61
                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
412
                    for (auto& c : curModifier) {
2669
412
                        c++;
2670
412
                    }
2671
27
                }
2672
61
            }
2673
112
        }
2674
2675
153
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
153
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
153
        const auto& result = results.back();
2682
2683
153
        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
153
        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
153
        if ( options.disableTests == false ) {
2701
153
            tests::test(op, result.second);
2702
153
        }
2703
2704
153
        postprocess(module, op, result);
2705
153
    }
2706
2707
116
    if ( options.noCompare == false ) {
2708
41
        compare(operations, results, data, size);
2709
41
    }
2710
116
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
107
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
107
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
107
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.62k
    do {
2596
1.62k
        auto op = getOp(&parentDs, data, size);
2597
1.62k
        auto module = getModule(parentDs);
2598
1.62k
        if ( module == nullptr ) {
2599
1.47k
            continue;
2600
1.47k
        }
2601
2602
153
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
153
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
1.62k
    } while ( parentDs.Get<bool>() == true );
2609
2610
107
    if ( operations.empty() == true ) {
2611
20
        return;
2612
20
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
87
#if 1
2616
87
    {
2617
87
        std::set<uint64_t> moduleIDs;
2618
87
        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
87
        std::set<uint64_t> operationModuleIDs;
2630
102
        for (const auto& op : operations) {
2631
102
            operationModuleIDs.insert(op.first->ID);
2632
102
        }
2633
2634
87
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
87
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
87
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
87
        for (const auto& id : addModuleIDs) {
2639
26
            operations.push_back({ modules.at(id), operations[0].second});
2640
26
        }
2641
87
    }
2642
87
#endif
2643
2644
87
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
87
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
215
    for (size_t i = 0; i < operations.size(); i++) {
2652
128
        auto& operation = operations[i];
2653
2654
128
        auto& module = operation.first;
2655
128
        auto& op = operation.second;
2656
2657
128
        if ( i > 0 ) {
2658
90
            auto& prevModule = operations[i-1].first;
2659
90
            auto& prevOp = operations[i].second;
2660
2661
90
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
44
                auto& curModifier = op.modifier.GetVectorPtr();
2663
44
                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
24
                } else {
2668
278
                    for (auto& c : curModifier) {
2669
278
                        c++;
2670
278
                    }
2671
24
                }
2672
44
            }
2673
90
        }
2674
2675
128
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
128
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
128
        const auto& result = results.back();
2682
2683
128
        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
128
        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
128
        if ( options.disableTests == false ) {
2701
128
            tests::test(op, result.second);
2702
128
        }
2703
2704
128
        postprocess(module, op, result);
2705
128
    }
2706
2707
87
    if ( options.noCompare == false ) {
2708
38
        compare(operations, results, data, size);
2709
38
    }
2710
87
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
85
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
85
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
85
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.97k
    do {
2596
1.97k
        auto op = getOp(&parentDs, data, size);
2597
1.97k
        auto module = getModule(parentDs);
2598
1.97k
        if ( module == nullptr ) {
2599
1.85k
            continue;
2600
1.85k
        }
2601
2602
119
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
119
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
1.97k
    } while ( parentDs.Get<bool>() == true );
2609
2610
85
    if ( operations.empty() == true ) {
2611
7
        return;
2612
7
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
78
#if 1
2616
78
    {
2617
78
        std::set<uint64_t> moduleIDs;
2618
78
        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
78
        std::set<uint64_t> operationModuleIDs;
2630
80
        for (const auto& op : operations) {
2631
80
            operationModuleIDs.insert(op.first->ID);
2632
80
        }
2633
2634
78
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
78
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
78
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
78
        for (const auto& id : addModuleIDs) {
2639
18
            operations.push_back({ modules.at(id), operations[0].second});
2640
18
        }
2641
78
    }
2642
78
#endif
2643
2644
78
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
78
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
176
    for (size_t i = 0; i < operations.size(); i++) {
2652
98
        auto& operation = operations[i];
2653
2654
98
        auto& module = operation.first;
2655
98
        auto& op = operation.second;
2656
2657
98
        if ( i > 0 ) {
2658
70
            auto& prevModule = operations[i-1].first;
2659
70
            auto& prevOp = operations[i].second;
2660
2661
70
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
36
                auto& curModifier = op.modifier.GetVectorPtr();
2663
36
                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
21
                } else {
2668
344
                    for (auto& c : curModifier) {
2669
344
                        c++;
2670
344
                    }
2671
15
                }
2672
36
            }
2673
70
        }
2674
2675
98
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
98
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
98
        const auto& result = results.back();
2682
2683
98
        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
98
        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
98
        if ( options.disableTests == false ) {
2701
98
            tests::test(op, result.second);
2702
98
        }
2703
2704
98
        postprocess(module, op, result);
2705
98
    }
2706
2707
78
    if ( options.noCompare == false ) {
2708
28
        compare(operations, results, data, size);
2709
28
    }
2710
78
}
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.32k
    do {
2596
2.32k
        auto op = getOp(&parentDs, data, size);
2597
2.32k
        auto module = getModule(parentDs);
2598
2.32k
        if ( module == nullptr ) {
2599
2.13k
            continue;
2600
2.13k
        }
2601
2602
189
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
189
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
2.31k
    } while ( parentDs.Get<bool>() == true );
2609
2610
121
    if ( operations.empty() == true ) {
2611
18
        return;
2612
18
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
103
#if 1
2616
103
    {
2617
103
        std::set<uint64_t> moduleIDs;
2618
103
        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
103
        std::set<uint64_t> operationModuleIDs;
2630
105
        for (const auto& op : operations) {
2631
105
            operationModuleIDs.insert(op.first->ID);
2632
105
        }
2633
2634
103
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
103
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
103
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
103
        for (const auto& id : addModuleIDs) {
2639
21
            operations.push_back({ modules.at(id), operations[0].second});
2640
21
        }
2641
103
    }
2642
103
#endif
2643
2644
103
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
103
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
229
    for (size_t i = 0; i < operations.size(); i++) {
2652
126
        auto& operation = operations[i];
2653
2654
126
        auto& module = operation.first;
2655
126
        auto& op = operation.second;
2656
2657
126
        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
46
                auto& curModifier = op.modifier.GetVectorPtr();
2663
46
                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
29
                } else {
2668
813
                    for (auto& c : curModifier) {
2669
813
                        c++;
2670
813
                    }
2671
29
                }
2672
46
            }
2673
91
        }
2674
2675
126
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
126
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
126
        const auto& result = results.back();
2682
2683
126
        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
126
        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
126
        if ( options.disableTests == false ) {
2701
126
            tests::test(op, result.second);
2702
126
        }
2703
2704
126
        postprocess(module, op, result);
2705
126
    }
2706
2707
103
    if ( options.noCompare == false ) {
2708
35
        compare(operations, results, data, size);
2709
35
    }
2710
103
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
160
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
160
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
160
    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.93k
            continue;
2600
1.93k
        }
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.16k
    } while ( parentDs.Get<bool>() == true );
2609
2610
160
    if ( operations.empty() == true ) {
2611
11
        return;
2612
11
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
149
#if 1
2616
149
    {
2617
149
        std::set<uint64_t> moduleIDs;
2618
149
        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
149
        std::set<uint64_t> operationModuleIDs;
2630
149
        for (const auto& op : operations) {
2631
118
            operationModuleIDs.insert(op.first->ID);
2632
118
        }
2633
2634
149
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
149
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
149
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
149
        for (const auto& id : addModuleIDs) {
2639
33
            operations.push_back({ modules.at(id), operations[0].second});
2640
33
        }
2641
149
    }
2642
149
#endif
2643
2644
149
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
149
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
300
    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
14.3k
                    for (size_t j = 0; j < 512; j++) {
2665
14.3k
                        curModifier.push_back(1);
2666
14.3k
                    }
2667
29
                } else {
2668
4.97k
                    for (auto& c : curModifier) {
2669
4.97k
                        c++;
2670
4.97k
                    }
2671
29
                }
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
149
    if ( options.noCompare == false ) {
2708
44
        compare(operations, results, data, size);
2709
44
    }
2710
149
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
177
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
177
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
177
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.49k
    do {
2596
1.49k
        auto op = getOp(&parentDs, data, size);
2597
1.49k
        auto module = getModule(parentDs);
2598
1.49k
        if ( module == nullptr ) {
2599
1.28k
            continue;
2600
1.28k
        }
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
5
            break;
2607
5
        }
2608
1.49k
    } while ( parentDs.Get<bool>() == true );
2609
2610
177
    if ( operations.empty() == true ) {
2611
14
        return;
2612
14
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
163
#if 1
2616
163
    {
2617
163
        std::set<uint64_t> moduleIDs;
2618
163
        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
163
        std::set<uint64_t> operationModuleIDs;
2630
163
        for (const auto& op : operations) {
2631
98
            operationModuleIDs.insert(op.first->ID);
2632
98
        }
2633
2634
163
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
163
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
163
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
163
        for (const auto& id : addModuleIDs) {
2639
28
            operations.push_back({ modules.at(id), operations[0].second});
2640
28
        }
2641
163
    }
2642
163
#endif
2643
2644
163
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
163
    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
126
        auto& operation = operations[i];
2653
2654
126
        auto& module = operation.first;
2655
126
        auto& op = operation.second;
2656
2657
126
        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
44
                auto& curModifier = op.modifier.GetVectorPtr();
2663
44
                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
25
                } else {
2668
665
                    for (auto& c : curModifier) {
2669
665
                        c++;
2670
665
                    }
2671
25
                }
2672
44
            }
2673
88
        }
2674
2675
126
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
126
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
126
        const auto& result = results.back();
2682
2683
126
        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
126
        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
126
        if ( options.disableTests == false ) {
2701
126
            tests::test(op, result.second);
2702
126
        }
2703
2704
126
        postprocess(module, op, result);
2705
126
    }
2706
2707
163
    if ( options.noCompare == false ) {
2708
38
        compare(operations, results, data, size);
2709
38
    }
2710
163
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
150
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
150
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
150
    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.42k
            continue;
2600
1.42k
        }
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
1.66k
    } while ( parentDs.Get<bool>() == true );
2609
2610
150
    if ( operations.empty() == true ) {
2611
6
        return;
2612
6
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
144
#if 1
2616
144
    {
2617
144
        std::set<uint64_t> moduleIDs;
2618
144
        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
144
        std::set<uint64_t> operationModuleIDs;
2630
144
        for (const auto& op : operations) {
2631
93
            operationModuleIDs.insert(op.first->ID);
2632
93
        }
2633
2634
144
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
144
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
144
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
144
        for (const auto& id : addModuleIDs) {
2639
21
            operations.push_back({ modules.at(id), operations[0].second});
2640
21
        }
2641
144
    }
2642
144
#endif
2643
2644
144
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
144
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
258
    for (size_t i = 0; i < operations.size(); i++) {
2652
114
        auto& operation = operations[i];
2653
2654
114
        auto& module = operation.first;
2655
114
        auto& op = operation.second;
2656
2657
114
        if ( i > 0 ) {
2658
81
            auto& prevModule = operations[i-1].first;
2659
81
            auto& prevOp = operations[i].second;
2660
2661
81
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
41
                auto& curModifier = op.modifier.GetVectorPtr();
2663
41
                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
21
                } else {
2668
589
                    for (auto& c : curModifier) {
2669
589
                        c++;
2670
589
                    }
2671
20
                }
2672
41
            }
2673
81
        }
2674
2675
114
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
114
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
114
        const auto& result = results.back();
2682
2683
114
        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
114
        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
114
        if ( options.disableTests == false ) {
2701
114
            tests::test(op, result.second);
2702
114
        }
2703
2704
114
        postprocess(module, op, result);
2705
114
    }
2706
2707
144
    if ( options.noCompare == false ) {
2708
33
        compare(operations, results, data, size);
2709
33
    }
2710
144
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_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.83k
    do {
2596
1.83k
        auto op = getOp(&parentDs, data, size);
2597
1.83k
        auto module = getModule(parentDs);
2598
1.83k
        if ( module == nullptr ) {
2599
1.61k
            continue;
2600
1.61k
        }
2601
2602
220
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
220
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
1.83k
    } while ( parentDs.Get<bool>() == true );
2609
2610
143
    if ( operations.empty() == true ) {
2611
9
        return;
2612
9
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
134
#if 1
2616
134
    {
2617
134
        std::set<uint64_t> moduleIDs;
2618
134
        for (const auto& m : modules ) {
2619
64
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
64
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
64
            moduleIDs.insert(moduleID);
2627
64
        }
2628
2629
134
        std::set<uint64_t> operationModuleIDs;
2630
134
        for (const auto& op : operations) {
2631
96
            operationModuleIDs.insert(op.first->ID);
2632
96
        }
2633
2634
134
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
134
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
134
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
134
        for (const auto& id : addModuleIDs) {
2639
21
            operations.push_back({ modules.at(id), operations[0].second});
2640
21
        }
2641
134
    }
2642
134
#endif
2643
2644
134
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
134
    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
117
        auto& operation = operations[i];
2653
2654
117
        auto& module = operation.first;
2655
117
        auto& op = operation.second;
2656
2657
117
        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
47
                auto& curModifier = op.modifier.GetVectorPtr();
2663
47
                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
25
                } else {
2668
650
                    for (auto& c : curModifier) {
2669
650
                        c++;
2670
650
                    }
2671
25
                }
2672
47
            }
2673
85
        }
2674
2675
117
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
117
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
117
        const auto& result = results.back();
2682
2683
117
        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
117
        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
117
        if ( options.disableTests == false ) {
2701
117
            tests::test(op, result.second);
2702
117
        }
2703
2704
117
        postprocess(module, op, result);
2705
117
    }
2706
2707
134
    if ( options.noCompare == false ) {
2708
32
        compare(operations, results, data, size);
2709
32
    }
2710
134
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
115
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
115
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
115
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.79k
    do {
2596
2.79k
        auto op = getOp(&parentDs, data, size);
2597
2.79k
        auto module = getModule(parentDs);
2598
2.79k
        if ( module == nullptr ) {
2599
2.60k
            continue;
2600
2.60k
        }
2601
2602
192
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
192
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.79k
    } while ( parentDs.Get<bool>() == true );
2609
2610
115
    if ( operations.empty() == true ) {
2611
13
        return;
2612
13
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
102
#if 1
2616
102
    {
2617
102
        std::set<uint64_t> moduleIDs;
2618
102
        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
102
        std::set<uint64_t> operationModuleIDs;
2630
102
        for (const auto& op : operations) {
2631
93
            operationModuleIDs.insert(op.first->ID);
2632
93
        }
2633
2634
102
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
102
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
102
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
102
        for (const auto& id : addModuleIDs) {
2639
15
            operations.push_back({ modules.at(id), operations[0].second});
2640
15
        }
2641
102
    }
2642
102
#endif
2643
2644
102
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
102
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
210
    for (size_t i = 0; i < operations.size(); i++) {
2652
108
        auto& operation = operations[i];
2653
2654
108
        auto& module = operation.first;
2655
108
        auto& op = operation.second;
2656
2657
108
        if ( i > 0 ) {
2658
79
            auto& prevModule = operations[i-1].first;
2659
79
            auto& prevOp = operations[i].second;
2660
2661
79
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
39
                auto& curModifier = op.modifier.GetVectorPtr();
2663
39
                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
21
                } else {
2668
250
                    for (auto& c : curModifier) {
2669
250
                        c++;
2670
250
                    }
2671
21
                }
2672
39
            }
2673
79
        }
2674
2675
108
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
108
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
108
        const auto& result = results.back();
2682
2683
108
        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
108
        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
108
        if ( options.disableTests == false ) {
2701
108
            tests::test(op, result.second);
2702
108
        }
2703
2704
108
        postprocess(module, op, result);
2705
108
    }
2706
2707
102
    if ( options.noCompare == false ) {
2708
29
        compare(operations, results, data, size);
2709
29
    }
2710
102
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
89
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
89
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
89
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.66k
    do {
2596
1.66k
        auto op = getOp(&parentDs, data, size);
2597
1.66k
        auto module = getModule(parentDs);
2598
1.66k
        if ( module == nullptr ) {
2599
1.50k
            continue;
2600
1.50k
        }
2601
2602
158
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
158
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
5
            break;
2607
5
        }
2608
1.65k
    } while ( parentDs.Get<bool>() == true );
2609
2610
89
    if ( operations.empty() == true ) {
2611
4
        return;
2612
4
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
85
#if 1
2616
85
    {
2617
85
        std::set<uint64_t> moduleIDs;
2618
85
        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
85
        std::set<uint64_t> operationModuleIDs;
2630
85
        for (const auto& op : operations) {
2631
85
            operationModuleIDs.insert(op.first->ID);
2632
85
        }
2633
2634
85
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
85
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
85
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
85
        for (const auto& id : addModuleIDs) {
2639
18
            operations.push_back({ modules.at(id), operations[0].second});
2640
18
        }
2641
85
    }
2642
85
#endif
2643
2644
85
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
85
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
188
    for (size_t i = 0; i < operations.size(); i++) {
2652
103
        auto& operation = operations[i];
2653
2654
103
        auto& module = operation.first;
2655
103
        auto& op = operation.second;
2656
2657
103
        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
39
                auto& curModifier = op.modifier.GetVectorPtr();
2663
39
                if ( curModifier.size() == 0 ) {
2664
7.69k
                    for (size_t j = 0; j < 512; j++) {
2665
7.68k
                        curModifier.push_back(1);
2666
7.68k
                    }
2667
24
                } else {
2668
1.41k
                    for (auto& c : curModifier) {
2669
1.41k
                        c++;
2670
1.41k
                    }
2671
24
                }
2672
39
            }
2673
75
        }
2674
2675
103
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
103
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
103
        const auto& result = results.back();
2682
2683
103
        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
103
        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
103
        if ( options.disableTests == false ) {
2701
103
            tests::test(op, result.second);
2702
103
        }
2703
2704
103
        postprocess(module, op, result);
2705
103
    }
2706
2707
85
    if ( options.noCompare == false ) {
2708
28
        compare(operations, results, data, size);
2709
28
    }
2710
85
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
120
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
120
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
120
    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
2.01k
            continue;
2600
2.01k
        }
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
5
            break;
2607
5
        }
2608
2.20k
    } while ( parentDs.Get<bool>() == true );
2609
2610
120
    if ( operations.empty() == true ) {
2611
5
        return;
2612
5
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
115
#if 1
2616
115
    {
2617
115
        std::set<uint64_t> moduleIDs;
2618
115
        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
115
        std::set<uint64_t> operationModuleIDs;
2630
115
        for (const auto& op : operations) {
2631
106
            operationModuleIDs.insert(op.first->ID);
2632
106
        }
2633
2634
115
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
115
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
115
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
115
        for (const auto& id : addModuleIDs) {
2639
34
            operations.push_back({ modules.at(id), operations[0].second});
2640
34
        }
2641
115
    }
2642
115
#endif
2643
2644
115
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
115
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
255
    for (size_t i = 0; i < operations.size(); i++) {
2652
140
        auto& operation = operations[i];
2653
2654
140
        auto& module = operation.first;
2655
140
        auto& op = operation.second;
2656
2657
140
        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
48
                auto& curModifier = op.modifier.GetVectorPtr();
2663
48
                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
25
                } else {
2668
858
                    for (auto& c : curModifier) {
2669
858
                        c++;
2670
858
                    }
2671
25
                }
2672
48
            }
2673
97
        }
2674
2675
140
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
140
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
140
        const auto& result = results.back();
2682
2683
140
        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
140
        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
140
        if ( options.disableTests == false ) {
2701
140
            tests::test(op, result.second);
2702
140
        }
2703
2704
140
        postprocess(module, op, result);
2705
140
    }
2706
2707
115
    if ( options.noCompare == false ) {
2708
43
        compare(operations, results, data, size);
2709
43
    }
2710
115
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
112
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
112
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
112
    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.99k
            continue;
2600
1.99k
        }
2601
2602
172
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
172
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
2.15k
    } while ( parentDs.Get<bool>() == true );
2609
2610
112
    if ( operations.empty() == true ) {
2611
18
        return;
2612
18
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
94
#if 1
2616
94
    {
2617
94
        std::set<uint64_t> moduleIDs;
2618
94
        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
94
        std::set<uint64_t> operationModuleIDs;
2630
95
        for (const auto& op : operations) {
2631
95
            operationModuleIDs.insert(op.first->ID);
2632
95
        }
2633
2634
94
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
94
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
94
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
94
        for (const auto& id : addModuleIDs) {
2639
27
            operations.push_back({ modules.at(id), operations[0].second});
2640
27
        }
2641
94
    }
2642
94
#endif
2643
2644
94
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
94
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
216
    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
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
48
                auto& curModifier = op.modifier.GetVectorPtr();
2663
48
                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
30
                } else {
2668
906
                    for (auto& c : curModifier) {
2669
906
                        c++;
2670
906
                    }
2671
30
                }
2672
48
            }
2673
88
        }
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
94
    if ( options.noCompare == false ) {
2708
34
        compare(operations, results, data, size);
2709
34
    }
2710
94
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::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.03k
    do {
2596
2.03k
        auto op = getOp(&parentDs, data, size);
2597
2.03k
        auto module = getModule(parentDs);
2598
2.03k
        if ( module == nullptr ) {
2599
1.84k
            continue;
2600
1.84k
        }
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
6
            break;
2607
6
        }
2608
2.03k
    } while ( parentDs.Get<bool>() == true );
2609
2610
140
    if ( operations.empty() == true ) {
2611
22
        return;
2612
22
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
118
#if 1
2616
118
    {
2617
118
        std::set<uint64_t> moduleIDs;
2618
118
        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
118
        std::set<uint64_t> operationModuleIDs;
2630
118
        for (const auto& op : operations) {
2631
95
            operationModuleIDs.insert(op.first->ID);
2632
95
        }
2633
2634
118
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
118
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
118
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
118
        for (const auto& id : addModuleIDs) {
2639
21
            operations.push_back({ modules.at(id), operations[0].second});
2640
21
        }
2641
118
    }
2642
118
#endif
2643
2644
118
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
118
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
234
    for (size_t i = 0; i < operations.size(); i++) {
2652
116
        auto& operation = operations[i];
2653
2654
116
        auto& module = operation.first;
2655
116
        auto& op = operation.second;
2656
2657
116
        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
11.7k
                    for (size_t j = 0; j < 512; j++) {
2665
11.7k
                        curModifier.push_back(1);
2666
11.7k
                    }
2667
23
                } else {
2668
369
                    for (auto& c : curModifier) {
2669
369
                        c++;
2670
369
                    }
2671
21
                }
2672
44
            }
2673
83
        }
2674
2675
116
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
116
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
116
        const auto& result = results.back();
2682
2683
116
        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
116
        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
116
        if ( options.disableTests == false ) {
2701
116
            tests::test(op, result.second);
2702
116
        }
2703
2704
116
        postprocess(module, op, result);
2705
116
    }
2706
2707
118
    if ( options.noCompare == false ) {
2708
33
        compare(operations, results, data, size);
2709
33
    }
2710
118
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
131
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
131
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
131
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.99k
    do {
2596
1.99k
        auto op = getOp(&parentDs, data, size);
2597
1.99k
        auto module = getModule(parentDs);
2598
1.99k
        if ( module == nullptr ) {
2599
1.80k
            continue;
2600
1.80k
        }
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
1.98k
    } while ( parentDs.Get<bool>() == true );
2609
2610
131
    if ( operations.empty() == true ) {
2611
25
        return;
2612
25
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
106
#if 1
2616
106
    {
2617
106
        std::set<uint64_t> moduleIDs;
2618
106
        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
106
        std::set<uint64_t> operationModuleIDs;
2630
117
        for (const auto& op : operations) {
2631
117
            operationModuleIDs.insert(op.first->ID);
2632
117
        }
2633
2634
106
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
106
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
106
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
106
        for (const auto& id : addModuleIDs) {
2639
32
            operations.push_back({ modules.at(id), operations[0].second});
2640
32
        }
2641
106
    }
2642
106
#endif
2643
2644
106
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
106
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
255
    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
104
            auto& prevModule = operations[i-1].first;
2659
104
            auto& prevOp = operations[i].second;
2660
2661
104
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
53
                auto& curModifier = op.modifier.GetVectorPtr();
2663
53
                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
28
                } else {
2668
678
                    for (auto& c : curModifier) {
2669
678
                        c++;
2670
678
                    }
2671
25
                }
2672
53
            }
2673
104
        }
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
106
    if ( options.noCompare == false ) {
2708
45
        compare(operations, results, data, size);
2709
45
    }
2710
106
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
91
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
91
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
91
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.72k
    do {
2596
1.72k
        auto op = getOp(&parentDs, data, size);
2597
1.72k
        auto module = getModule(parentDs);
2598
1.72k
        if ( module == nullptr ) {
2599
1.56k
            continue;
2600
1.56k
        }
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
7
            break;
2607
7
        }
2608
1.71k
    } while ( parentDs.Get<bool>() == true );
2609
2610
91
    if ( operations.empty() == true ) {
2611
8
        return;
2612
8
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
83
#if 1
2616
83
    {
2617
83
        std::set<uint64_t> moduleIDs;
2618
83
        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
83
        std::set<uint64_t> operationModuleIDs;
2630
98
        for (const auto& op : operations) {
2631
98
            operationModuleIDs.insert(op.first->ID);
2632
98
        }
2633
2634
83
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
83
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
83
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
83
        for (const auto& id : addModuleIDs) {
2639
15
            operations.push_back({ modules.at(id), operations[0].second});
2640
15
        }
2641
83
    }
2642
83
#endif
2643
2644
83
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
83
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
196
    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
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
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
280
                    for (auto& c : curModifier) {
2669
280
                        c++;
2670
280
                    }
2671
26
                }
2672
44
            }
2673
82
        }
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
83
    if ( options.noCompare == false ) {
2708
31
        compare(operations, results, data, size);
2709
31
    }
2710
83
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
95
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
95
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
95
    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.64k
            continue;
2600
1.64k
        }
2601
2602
146
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
146
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
5
            break;
2607
5
        }
2608
1.79k
    } while ( parentDs.Get<bool>() == true );
2609
2610
95
    if ( operations.empty() == true ) {
2611
14
        return;
2612
14
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
81
#if 1
2616
81
    {
2617
81
        std::set<uint64_t> moduleIDs;
2618
81
        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
81
        std::set<uint64_t> operationModuleIDs;
2630
90
        for (const auto& op : operations) {
2631
90
            operationModuleIDs.insert(op.first->ID);
2632
90
        }
2633
2634
81
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
81
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
81
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
81
        for (const auto& id : addModuleIDs) {
2639
21
            operations.push_back({ modules.at(id), operations[0].second});
2640
21
        }
2641
81
    }
2642
81
#endif
2643
2644
81
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
81
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
192
    for (size_t i = 0; i < operations.size(); i++) {
2652
111
        auto& operation = operations[i];
2653
2654
111
        auto& module = operation.first;
2655
111
        auto& op = operation.second;
2656
2657
111
        if ( i > 0 ) {
2658
78
            auto& prevModule = operations[i-1].first;
2659
78
            auto& prevOp = operations[i].second;
2660
2661
78
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
39
                auto& curModifier = op.modifier.GetVectorPtr();
2663
39
                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
21
                } else {
2668
522
                    for (auto& c : curModifier) {
2669
522
                        c++;
2670
522
                    }
2671
21
                }
2672
39
            }
2673
78
        }
2674
2675
111
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
111
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
111
        const auto& result = results.back();
2682
2683
111
        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
111
        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
111
        if ( options.disableTests == false ) {
2701
111
            tests::test(op, result.second);
2702
111
        }
2703
2704
111
        postprocess(module, op, result);
2705
111
    }
2706
2707
81
    if ( options.noCompare == false ) {
2708
33
        compare(operations, results, data, size);
2709
33
    }
2710
81
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
111
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
111
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
111
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.96k
    do {
2596
1.96k
        auto op = getOp(&parentDs, data, size);
2597
1.96k
        auto module = getModule(parentDs);
2598
1.96k
        if ( module == nullptr ) {
2599
1.78k
            continue;
2600
1.78k
        }
2601
2602
175
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
175
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
1.95k
    } while ( parentDs.Get<bool>() == true );
2609
2610
111
    if ( operations.empty() == true ) {
2611
13
        return;
2612
13
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
98
#if 1
2616
98
    {
2617
98
        std::set<uint64_t> moduleIDs;
2618
98
        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
98
        std::set<uint64_t> operationModuleIDs;
2630
98
        for (const auto& op : operations) {
2631
97
            operationModuleIDs.insert(op.first->ID);
2632
97
        }
2633
2634
98
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
98
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
98
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
98
        for (const auto& id : addModuleIDs) {
2639
33
            operations.push_back({ modules.at(id), operations[0].second});
2640
33
        }
2641
98
    }
2642
98
#endif
2643
2644
98
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
98
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
228
    for (size_t i = 0; i < operations.size(); i++) {
2652
130
        auto& operation = operations[i];
2653
2654
130
        auto& module = operation.first;
2655
130
        auto& op = operation.second;
2656
2657
130
        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
37
                auto& curModifier = op.modifier.GetVectorPtr();
2663
37
                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
22
                } else {
2668
275
                    for (auto& c : curModifier) {
2669
275
                        c++;
2670
275
                    }
2671
15
                }
2672
37
            }
2673
87
        }
2674
2675
130
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
130
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
130
        const auto& result = results.back();
2682
2683
130
        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
130
        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
130
        if ( options.disableTests == false ) {
2701
130
            tests::test(op, result.second);
2702
130
        }
2703
2704
130
        postprocess(module, op, result);
2705
130
    }
2706
2707
98
    if ( options.noCompare == false ) {
2708
43
        compare(operations, results, data, size);
2709
43
    }
2710
98
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
115
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
115
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
115
    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.33k
            continue;
2600
2.33k
        }
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
7
            break;
2607
7
        }
2608
2.50k
    } while ( parentDs.Get<bool>() == true );
2609
2610
115
    if ( operations.empty() == true ) {
2611
19
        return;
2612
19
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
96
#if 1
2616
96
    {
2617
96
        std::set<uint64_t> moduleIDs;
2618
96
        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
96
        std::set<uint64_t> operationModuleIDs;
2630
119
        for (const auto& op : operations) {
2631
119
            operationModuleIDs.insert(op.first->ID);
2632
119
        }
2633
2634
96
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
96
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
96
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
96
        for (const auto& id : addModuleIDs) {
2639
34
            operations.push_back({ modules.at(id), operations[0].second});
2640
34
        }
2641
96
    }
2642
96
#endif
2643
2644
96
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
96
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
249
    for (size_t i = 0; i < operations.size(); i++) {
2652
153
        auto& operation = operations[i];
2653
2654
153
        auto& module = operation.first;
2655
153
        auto& op = operation.second;
2656
2657
153
        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
59
                auto& curModifier = op.modifier.GetVectorPtr();
2663
59
                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
35
                } else {
2668
293
                    for (auto& c : curModifier) {
2669
293
                        c++;
2670
293
                    }
2671
35
                }
2672
59
            }
2673
109
        }
2674
2675
153
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
153
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
153
        const auto& result = results.back();
2682
2683
153
        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
153
        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
153
        if ( options.disableTests == false ) {
2701
153
            tests::test(op, result.second);
2702
153
        }
2703
2704
153
        postprocess(module, op, result);
2705
153
    }
2706
2707
96
    if ( options.noCompare == false ) {
2708
44
        compare(operations, results, data, size);
2709
44
    }
2710
96
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::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.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.97k
            continue;
2600
1.97k
        }
2601
2602
153
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
153
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
9
            break;
2607
9
        }
2608
2.12k
    } while ( parentDs.Get<bool>() == true );
2609
2610
119
    if ( operations.empty() == true ) {
2611
12
        return;
2612
12
    }
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
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
107
        std::set<uint64_t> operationModuleIDs;
2630
107
        for (const auto& op : operations) {
2631
91
            operationModuleIDs.insert(op.first->ID);
2632
91
        }
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
18
            operations.push_back({ modules.at(id), operations[0].second});
2640
18
        }
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
216
    for (size_t i = 0; i < operations.size(); i++) {
2652
109
        auto& operation = operations[i];
2653
2654
109
        auto& module = operation.first;
2655
109
        auto& op = operation.second;
2656
2657
109
        if ( i > 0 ) {
2658
79
            auto& prevModule = operations[i-1].first;
2659
79
            auto& prevOp = operations[i].second;
2660
2661
79
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
42
                auto& curModifier = op.modifier.GetVectorPtr();
2663
42
                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
258
                    for (auto& c : curModifier) {
2669
258
                        c++;
2670
258
                    }
2671
18
                }
2672
42
            }
2673
79
        }
2674
2675
109
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
109
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
109
        const auto& result = results.back();
2682
2683
109
        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
109
        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
109
        if ( options.disableTests == false ) {
2701
109
            tests::test(op, result.second);
2702
109
        }
2703
2704
109
        postprocess(module, op, result);
2705
109
    }
2706
2707
107
    if ( options.noCompare == false ) {
2708
30
        compare(operations, results, data, size);
2709
30
    }
2710
107
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::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
1.99k
    do {
2596
1.99k
        auto op = getOp(&parentDs, data, size);
2597
1.99k
        auto module = getModule(parentDs);
2598
1.99k
        if ( module == nullptr ) {
2599
1.82k
            continue;
2600
1.82k
        }
2601
2602
176
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
176
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
1.99k
    } while ( parentDs.Get<bool>() == true );
2609
2610
149
    if ( operations.empty() == true ) {
2611
35
        return;
2612
35
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
114
#if 1
2616
114
    {
2617
114
        std::set<uint64_t> moduleIDs;
2618
114
        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
114
        std::set<uint64_t> operationModuleIDs;
2630
114
        for (const auto& op : operations) {
2631
98
            operationModuleIDs.insert(op.first->ID);
2632
98
        }
2633
2634
114
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
114
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
114
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
114
        for (const auto& id : addModuleIDs) {
2639
23
            operations.push_back({ modules.at(id), operations[0].second});
2640
23
        }
2641
114
    }
2642
114
#endif
2643
2644
114
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
114
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
235
    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
86
            auto& prevModule = operations[i-1].first;
2659
86
            auto& prevOp = operations[i].second;
2660
2661
86
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
44
                auto& curModifier = op.modifier.GetVectorPtr();
2663
44
                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
27
                } else {
2668
310
                    for (auto& c : curModifier) {
2669
310
                        c++;
2670
310
                    }
2671
27
                }
2672
44
            }
2673
86
        }
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
114
    if ( options.noCompare == false ) {
2708
35
        compare(operations, results, data, size);
2709
35
    }
2710
114
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
124
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
124
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
124
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.52k
    do {
2596
1.52k
        auto op = getOp(&parentDs, data, size);
2597
1.52k
        auto module = getModule(parentDs);
2598
1.52k
        if ( module == nullptr ) {
2599
1.34k
            continue;
2600
1.34k
        }
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
1.51k
    } while ( parentDs.Get<bool>() == true );
2609
2610
124
    if ( operations.empty() == true ) {
2611
26
        return;
2612
26
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
98
#if 1
2616
98
    {
2617
98
        std::set<uint64_t> moduleIDs;
2618
98
        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
98
        std::set<uint64_t> operationModuleIDs;
2630
99
        for (const auto& op : operations) {
2631
99
            operationModuleIDs.insert(op.first->ID);
2632
99
        }
2633
2634
98
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
98
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
98
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
98
        for (const auto& id : addModuleIDs) {
2639
22
            operations.push_back({ modules.at(id), operations[0].second});
2640
22
        }
2641
98
    }
2642
98
#endif
2643
2644
98
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
98
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
219
    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
10.2k
                    for (size_t j = 0; j < 512; j++) {
2665
10.2k
                        curModifier.push_back(1);
2666
10.2k
                    }
2667
25
                } else {
2668
544
                    for (auto& c : curModifier) {
2669
544
                        c++;
2670
544
                    }
2671
25
                }
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
98
    if ( options.noCompare == false ) {
2708
34
        compare(operations, results, data, size);
2709
34
    }
2710
98
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
89
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
89
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
89
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.64k
    do {
2596
1.64k
        auto op = getOp(&parentDs, data, size);
2597
1.64k
        auto module = getModule(parentDs);
2598
1.64k
        if ( module == nullptr ) {
2599
1.46k
            continue;
2600
1.46k
        }
2601
2602
179
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
179
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
1.63k
    } while ( parentDs.Get<bool>() == true );
2609
2610
89
    if ( operations.empty() == true ) {
2611
5
        return;
2612
5
    }
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
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
84
        std::set<uint64_t> operationModuleIDs;
2630
102
        for (const auto& op : operations) {
2631
102
            operationModuleIDs.insert(op.first->ID);
2632
102
        }
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
18
            operations.push_back({ modules.at(id), operations[0].second});
2640
18
        }
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
204
    for (size_t i = 0; i < operations.size(); i++) {
2652
120
        auto& operation = operations[i];
2653
2654
120
        auto& module = operation.first;
2655
120
        auto& op = operation.second;
2656
2657
120
        if ( i > 0 ) {
2658
89
            auto& prevModule = operations[i-1].first;
2659
89
            auto& prevOp = operations[i].second;
2660
2661
89
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
43
                auto& curModifier = op.modifier.GetVectorPtr();
2663
43
                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
486
                    for (auto& c : curModifier) {
2669
486
                        c++;
2670
486
                    }
2671
17
                }
2672
43
            }
2673
89
        }
2674
2675
120
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
120
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
120
        const auto& result = results.back();
2682
2683
120
        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
120
        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
120
        if ( options.disableTests == false ) {
2701
120
            tests::test(op, result.second);
2702
120
        }
2703
2704
120
        postprocess(module, op, result);
2705
120
    }
2706
2707
84
    if ( options.noCompare == false ) {
2708
31
        compare(operations, results, data, size);
2709
31
    }
2710
84
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
118
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
118
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
118
    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.56k
            continue;
2600
1.56k
        }
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
5
            break;
2607
5
        }
2608
1.76k
    } while ( parentDs.Get<bool>() == true );
2609
2610
118
    if ( operations.empty() == true ) {
2611
6
        return;
2612
6
    }
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
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
112
        std::set<uint64_t> operationModuleIDs;
2630
128
        for (const auto& op : operations) {
2631
128
            operationModuleIDs.insert(op.first->ID);
2632
128
        }
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
40
            operations.push_back({ modules.at(id), operations[0].second});
2640
40
        }
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
280
    for (size_t i = 0; i < operations.size(); i++) {
2652
168
        auto& operation = operations[i];
2653
2654
168
        auto& module = operation.first;
2655
168
        auto& op = operation.second;
2656
2657
168
        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
50
                auto& curModifier = op.modifier.GetVectorPtr();
2663
50
                if ( curModifier.size() == 0 ) {
2664
16.4k
                    for (size_t j = 0; j < 512; j++) {
2665
16.3k
                        curModifier.push_back(1);
2666
16.3k
                    }
2667
32
                } else {
2668
257
                    for (auto& c : curModifier) {
2669
257
                        c++;
2670
257
                    }
2671
18
                }
2672
50
            }
2673
114
        }
2674
2675
168
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
168
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
168
        const auto& result = results.back();
2682
2683
168
        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
168
        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
168
        if ( options.disableTests == false ) {
2701
168
            tests::test(op, result.second);
2702
168
        }
2703
2704
168
        postprocess(module, op, result);
2705
168
    }
2706
2707
112
    if ( options.noCompare == false ) {
2708
54
        compare(operations, results, data, size);
2709
54
    }
2710
112
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
101
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
101
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
101
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.80k
    do {
2596
1.80k
        auto op = getOp(&parentDs, data, size);
2597
1.80k
        auto module = getModule(parentDs);
2598
1.80k
        if ( module == nullptr ) {
2599
1.65k
            continue;
2600
1.65k
        }
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
8
            break;
2607
8
        }
2608
1.80k
    } while ( parentDs.Get<bool>() == true );
2609
2610
101
    if ( operations.empty() == true ) {
2611
18
        return;
2612
18
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
83
#if 1
2616
83
    {
2617
83
        std::set<uint64_t> moduleIDs;
2618
83
        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
83
        std::set<uint64_t> operationModuleIDs;
2630
100
        for (const auto& op : operations) {
2631
100
            operationModuleIDs.insert(op.first->ID);
2632
100
        }
2633
2634
83
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
83
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
83
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
83
        for (const auto& id : addModuleIDs) {
2639
24
            operations.push_back({ modules.at(id), operations[0].second});
2640
24
        }
2641
83
    }
2642
83
#endif
2643
2644
83
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
83
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
207
    for (size_t i = 0; i < operations.size(); i++) {
2652
124
        auto& operation = operations[i];
2653
2654
124
        auto& module = operation.first;
2655
124
        auto& op = operation.second;
2656
2657
124
        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
44
                auto& curModifier = op.modifier.GetVectorPtr();
2663
44
                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
359
                    for (auto& c : curModifier) {
2669
359
                        c++;
2670
359
                    }
2671
21
                }
2672
44
            }
2673
88
        }
2674
2675
124
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
124
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
124
        const auto& result = results.back();
2682
2683
124
        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
124
        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
124
        if ( options.disableTests == false ) {
2701
124
            tests::test(op, result.second);
2702
124
        }
2703
2704
124
        postprocess(module, op, result);
2705
124
    }
2706
2707
83
    if ( options.noCompare == false ) {
2708
36
        compare(operations, results, data, size);
2709
36
    }
2710
83
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
147
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
147
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
147
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.77k
    do {
2596
2.77k
        auto op = getOp(&parentDs, data, size);
2597
2.77k
        auto module = getModule(parentDs);
2598
2.77k
        if ( module == nullptr ) {
2599
2.54k
            continue;
2600
2.54k
        }
2601
2602
230
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
230
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
9
            break;
2607
9
        }
2608
2.76k
    } while ( parentDs.Get<bool>() == true );
2609
2610
147
    if ( operations.empty() == true ) {
2611
20
        return;
2612
20
    }
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
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
127
        std::set<uint64_t> operationModuleIDs;
2630
127
        for (const auto& op : operations) {
2631
125
            operationModuleIDs.insert(op.first->ID);
2632
125
        }
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
34
            operations.push_back({ modules.at(id), operations[0].second});
2640
34
        }
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
286
    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
13.3k
                    for (size_t j = 0; j < 512; j++) {
2665
13.3k
                        curModifier.push_back(1);
2666
13.3k
                    }
2667
31
                } else {
2668
275
                    for (auto& c : curModifier) {
2669
275
                        c++;
2670
275
                    }
2671
31
                }
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
127
    if ( options.noCompare == false ) {
2708
48
        compare(operations, results, data, size);
2709
48
    }
2710
127
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
102
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
102
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
102
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.41k
    do {
2596
1.41k
        auto op = getOp(&parentDs, data, size);
2597
1.41k
        auto module = getModule(parentDs);
2598
1.41k
        if ( module == nullptr ) {
2599
1.26k
            continue;
2600
1.26k
        }
2601
2602
150
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
150
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
6
            break;
2607
6
        }
2608
1.41k
    } while ( parentDs.Get<bool>() == true );
2609
2610
102
    if ( operations.empty() == true ) {
2611
15
        return;
2612
15
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
87
#if 1
2616
87
    {
2617
87
        std::set<uint64_t> moduleIDs;
2618
87
        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
87
        std::set<uint64_t> operationModuleIDs;
2630
95
        for (const auto& op : operations) {
2631
95
            operationModuleIDs.insert(op.first->ID);
2632
95
        }
2633
2634
87
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
87
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
87
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
87
        for (const auto& id : addModuleIDs) {
2639
27
            operations.push_back({ modules.at(id), operations[0].second});
2640
27
        }
2641
87
    }
2642
87
#endif
2643
2644
87
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
87
    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
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
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
42
                auto& curModifier = op.modifier.GetVectorPtr();
2663
42
                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
289
                    for (auto& c : curModifier) {
2669
289
                        c++;
2670
289
                    }
2671
19
                }
2672
42
            }
2673
85
        }
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
87
    if ( options.noCompare == false ) {
2708
37
        compare(operations, results, data, size);
2709
37
    }
2710
87
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
147
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
147
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
147
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
2.02k
    do {
2596
2.02k
        auto op = getOp(&parentDs, data, size);
2597
2.02k
        auto module = getModule(parentDs);
2598
2.02k
        if ( module == nullptr ) {
2599
1.79k
            continue;
2600
1.79k
        }
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
2.01k
    } while ( parentDs.Get<bool>() == true );
2609
2610
147
    if ( operations.empty() == true ) {
2611
15
        return;
2612
15
    }
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
148
        for (const auto& m : modules ) {
2619
148
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
148
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
148
            moduleIDs.insert(moduleID);
2627
148
        }
2628
2629
132
        std::set<uint64_t> operationModuleIDs;
2630
163
        for (const auto& op : operations) {
2631
163
            operationModuleIDs.insert(op.first->ID);
2632
163
        }
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
61
            operations.push_back({ modules.at(id), operations[0].second});
2640
61
        }
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
356
    for (size_t i = 0; i < operations.size(); i++) {
2652
224
        auto& operation = operations[i];
2653
2654
224
        auto& module = operation.first;
2655
224
        auto& op = operation.second;
2656
2657
224
        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
63
                auto& curModifier = op.modifier.GetVectorPtr();
2663
63
                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
292
                    for (auto& c : curModifier) {
2669
292
                        c++;
2670
292
                    }
2671
23
                }
2672
63
            }
2673
150
        }
2674
2675
224
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
224
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
224
        const auto& result = results.back();
2682
2683
224
        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
224
        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
224
        if ( options.disableTests == false ) {
2701
224
            tests::test(op, result.second);
2702
224
        }
2703
2704
224
        postprocess(module, op, result);
2705
224
    }
2706
2707
132
    if ( options.noCompare == false ) {
2708
74
        compare(operations, results, data, size);
2709
74
    }
2710
132
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
124
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
124
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
124
    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.53k
            continue;
2600
2.53k
        }
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
8
            break;
2607
8
        }
2608
2.73k
    } while ( parentDs.Get<bool>() == true );
2609
2610
124
    if ( operations.empty() == true ) {
2611
13
        return;
2612
13
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
111
#if 1
2616
111
    {
2617
111
        std::set<uint64_t> moduleIDs;
2618
111
        for (const auto& m : modules ) {
2619
110
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
110
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
110
            moduleIDs.insert(moduleID);
2627
110
        }
2628
2629
111
        std::set<uint64_t> operationModuleIDs;
2630
134
        for (const auto& op : operations) {
2631
134
            operationModuleIDs.insert(op.first->ID);
2632
134
        }
2633
2634
111
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
111
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
111
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
111
        for (const auto& id : addModuleIDs) {
2639
39
            operations.push_back({ modules.at(id), operations[0].second});
2640
39
        }
2641
111
    }
2642
111
#endif
2643
2644
111
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
111
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
284
    for (size_t i = 0; i < operations.size(); i++) {
2652
173
        auto& operation = operations[i];
2653
2654
173
        auto& module = operation.first;
2655
173
        auto& op = operation.second;
2656
2657
173
        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
57
                auto& curModifier = op.modifier.GetVectorPtr();
2663
57
                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
37
                } else {
2668
378
                    for (auto& c : curModifier) {
2669
378
                        c++;
2670
378
                    }
2671
37
                }
2672
57
            }
2673
118
        }
2674
2675
173
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
173
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
173
        const auto& result = results.back();
2682
2683
173
        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
173
        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
173
        if ( options.disableTests == false ) {
2701
173
            tests::test(op, result.second);
2702
173
        }
2703
2704
173
        postprocess(module, op, result);
2705
173
    }
2706
2707
111
    if ( options.noCompare == false ) {
2708
55
        compare(operations, results, data, size);
2709
55
    }
2710
111
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
114
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
114
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
114
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.59k
    do {
2596
1.59k
        auto op = getOp(&parentDs, data, size);
2597
1.59k
        auto module = getModule(parentDs);
2598
1.59k
        if ( module == nullptr ) {
2599
1.37k
            continue;
2600
1.37k
        }
2601
2602
219
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
219
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
1.58k
    } while ( parentDs.Get<bool>() == true );
2609
2610
114
    if ( operations.empty() == true ) {
2611
5
        return;
2612
5
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
109
#if 1
2616
109
    {
2617
109
        std::set<uint64_t> moduleIDs;
2618
110
        for (const auto& m : modules ) {
2619
110
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
110
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
110
            moduleIDs.insert(moduleID);
2627
110
        }
2628
2629
109
        std::set<uint64_t> operationModuleIDs;
2630
132
        for (const auto& op : operations) {
2631
132
            operationModuleIDs.insert(op.first->ID);
2632
132
        }
2633
2634
109
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
109
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
109
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
109
        for (const auto& id : addModuleIDs) {
2639
43
            operations.push_back({ modules.at(id), operations[0].second});
2640
43
        }
2641
109
    }
2642
109
#endif
2643
2644
109
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
109
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
284
    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
120
            auto& prevModule = operations[i-1].first;
2659
120
            auto& prevOp = operations[i].second;
2660
2661
120
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
59
                auto& curModifier = op.modifier.GetVectorPtr();
2663
59
                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
35
                } else {
2668
313
                    for (auto& c : curModifier) {
2669
313
                        c++;
2670
313
                    }
2671
24
                }
2672
59
            }
2673
120
        }
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
109
    if ( options.noCompare == false ) {
2708
55
        compare(operations, results, data, size);
2709
55
    }
2710
109
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
152
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
152
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
152
    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
238
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
238
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
2.20k
    } while ( parentDs.Get<bool>() == true );
2609
2610
152
    if ( operations.empty() == true ) {
2611
8
        return;
2612
8
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
144
#if 1
2616
144
    {
2617
144
        std::set<uint64_t> moduleIDs;
2618
144
        for (const auto& m : modules ) {
2619
126
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
126
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
126
            moduleIDs.insert(moduleID);
2627
126
        }
2628
2629
144
        std::set<uint64_t> operationModuleIDs;
2630
145
        for (const auto& op : operations) {
2631
145
            operationModuleIDs.insert(op.first->ID);
2632
145
        }
2633
2634
144
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
144
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
144
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
144
        for (const auto& id : addModuleIDs) {
2639
54
            operations.push_back({ modules.at(id), operations[0].second});
2640
54
        }
2641
144
    }
2642
144
#endif
2643
2644
144
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
144
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
343
    for (size_t i = 0; i < operations.size(); i++) {
2652
199
        auto& operation = operations[i];
2653
2654
199
        auto& module = operation.first;
2655
199
        auto& op = operation.second;
2656
2657
199
        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
67
                auto& curModifier = op.modifier.GetVectorPtr();
2663
67
                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
41
                } else {
2668
326
                    for (auto& c : curModifier) {
2669
326
                        c++;
2670
326
                    }
2671
41
                }
2672
67
            }
2673
136
        }
2674
2675
199
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
199
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
199
        const auto& result = results.back();
2682
2683
199
        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
199
        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
199
        if ( options.disableTests == false ) {
2701
199
            tests::test(op, result.second);
2702
199
        }
2703
2704
199
        postprocess(module, op, result);
2705
199
    }
2706
2707
144
    if ( options.noCompare == false ) {
2708
63
        compare(operations, results, data, size);
2709
63
    }
2710
144
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
107
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
107
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
107
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.36k
    do {
2596
1.36k
        auto op = getOp(&parentDs, data, size);
2597
1.36k
        auto module = getModule(parentDs);
2598
1.36k
        if ( module == nullptr ) {
2599
1.22k
            continue;
2600
1.22k
        }
2601
2602
135
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
135
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
1.35k
    } while ( parentDs.Get<bool>() == true );
2609
2610
107
    if ( operations.empty() == true ) {
2611
13
        return;
2612
13
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
94
#if 1
2616
94
    {
2617
94
        std::set<uint64_t> moduleIDs;
2618
94
        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
94
        std::set<uint64_t> operationModuleIDs;
2630
94
        for (const auto& op : operations) {
2631
87
            operationModuleIDs.insert(op.first->ID);
2632
87
        }
2633
2634
94
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
94
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
94
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
94
        for (const auto& id : addModuleIDs) {
2639
16
            operations.push_back({ modules.at(id), operations[0].second});
2640
16
        }
2641
94
    }
2642
94
#endif
2643
2644
94
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
94
    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
103
        auto& operation = operations[i];
2653
2654
103
        auto& module = operation.first;
2655
103
        auto& op = operation.second;
2656
2657
103
        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
41
                auto& curModifier = op.modifier.GetVectorPtr();
2663
41
                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
22
                } else {
2668
289
                    for (auto& c : curModifier) {
2669
289
                        c++;
2670
289
                    }
2671
19
                }
2672
41
            }
2673
76
        }
2674
2675
103
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
103
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
103
        const auto& result = results.back();
2682
2683
103
        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
103
        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
103
        if ( options.disableTests == false ) {
2701
103
            tests::test(op, result.second);
2702
103
        }
2703
2704
103
        postprocess(module, op, result);
2705
103
    }
2706
2707
94
    if ( options.noCompare == false ) {
2708
27
        compare(operations, results, data, size);
2709
27
    }
2710
94
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
108
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
108
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
108
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
1.74k
    do {
2596
1.74k
        auto op = getOp(&parentDs, data, size);
2597
1.74k
        auto module = getModule(parentDs);
2598
1.74k
        if ( module == nullptr ) {
2599
1.57k
            continue;
2600
1.57k
        }
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
7
            break;
2607
7
        }
2608
1.73k
    } while ( parentDs.Get<bool>() == true );
2609
2610
108
    if ( operations.empty() == true ) {
2611
12
        return;
2612
12
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
96
#if 1
2616
96
    {
2617
96
        std::set<uint64_t> moduleIDs;
2618
96
        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
96
        std::set<uint64_t> operationModuleIDs;
2630
96
        for (const auto& op : operations) {
2631
90
            operationModuleIDs.insert(op.first->ID);
2632
90
        }
2633
2634
96
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
96
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
96
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
96
        for (const auto& id : addModuleIDs) {
2639
18
            operations.push_back({ modules.at(id), operations[0].second});
2640
18
        }
2641
96
    }
2642
96
#endif
2643
2644
96
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
96
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
204
    for (size_t i = 0; i < operations.size(); i++) {
2652
108
        auto& operation = operations[i];
2653
2654
108
        auto& module = operation.first;
2655
108
        auto& op = operation.second;
2656
2657
108
        if ( i > 0 ) {
2658
80
            auto& prevModule = operations[i-1].first;
2659
80
            auto& prevOp = operations[i].second;
2660
2661
80
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
46
                auto& curModifier = op.modifier.GetVectorPtr();
2663
46
                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
25
                } else {
2668
317
                    for (auto& c : curModifier) {
2669
317
                        c++;
2670
317
                    }
2671
25
                }
2672
46
            }
2673
80
        }
2674
2675
108
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
108
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
108
        const auto& result = results.back();
2682
2683
108
        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
108
        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
108
        if ( options.disableTests == false ) {
2701
108
            tests::test(op, result.second);
2702
108
        }
2703
2704
108
        postprocess(module, op, result);
2705
108
    }
2706
2707
96
    if ( options.noCompare == false ) {
2708
28
        compare(operations, results, data, size);
2709
28
    }
2710
96
}
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 */