Coverage Report

Created: 2025-03-09 06:52

/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.9k
#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
2.14k
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
2.14k
    (void)module;
53
2.14k
    (void)op;
54
55
2.14k
    if ( result.second != std::nullopt ) {
56
1.12k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
1.12k
    }
58
2.14k
}
59
60
2.14k
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
2.14k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
2.14k
    return module->OpDigest(op);
64
2.14k
}
65
66
/* Specialization for operation::HMAC */
67
2.08k
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.08k
    (void)module;
69
2.08k
    (void)op;
70
71
2.08k
    if ( result.second != std::nullopt ) {
72
1.23k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
1.23k
    }
74
2.08k
}
75
76
2.08k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
2.08k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
2.08k
    return module->OpHMAC(op);
80
2.08k
}
81
82
/* Specialization for operation::UMAC */
83
238
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
238
    (void)module;
85
238
    (void)op;
86
87
238
    if ( result.second != std::nullopt ) {
88
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
0
    }
90
238
}
91
92
238
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
238
    return module->OpUMAC(op);
94
238
}
95
96
/* Specialization for operation::CMAC */
97
4.92k
template<> void ExecutorBase<component::MAC, operation::CMAC>::postprocess(std::shared_ptr<Module> module, operation::CMAC& op, const ExecutorBase<component::MAC, operation::CMAC>::ResultPair& result) const {
98
4.92k
    (void)module;
99
4.92k
    (void)op;
100
101
4.92k
    if ( result.second != std::nullopt ) {
102
864
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
864
    }
104
4.92k
}
105
106
4.92k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
4.92k
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
4.92k
    return module->OpCMAC(op);
110
4.92k
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
3.81k
template<> void ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::postprocess(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op, const ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::ResultPair& result) const {
114
3.81k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
3.81k
    if ( result.second != std::nullopt ) {
119
962
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
962
        if ( result.second->tag != std::nullopt ) {
121
65
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
65
        }
123
962
    }
124
125
3.81k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
934
        using fuzzing::datasource::ID;
127
128
934
        bool tryDecrypt = true;
129
130
934
        if ( module->ID == CF_MODULE("OpenSSL") ) {
131
714
            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
33
                case    ID("Cryptofuzz/Cipher/AES_128_GCM"):
137
36
                case    ID("Cryptofuzz/Cipher/AES_192_GCM"):
138
42
                case    ID("Cryptofuzz/Cipher/AES_256_GCM"):
139
42
                case    ID("Cryptofuzz/Cipher/AES_128_CCM"):
140
42
                case    ID("Cryptofuzz/Cipher/AES_192_CCM"):
141
42
                case    ID("Cryptofuzz/Cipher/AES_256_CCM"):
142
42
                case    ID("Cryptofuzz/Cipher/ARIA_128_CCM"):
143
42
                case    ID("Cryptofuzz/Cipher/ARIA_192_CCM"):
144
42
                case    ID("Cryptofuzz/Cipher/ARIA_256_CCM"):
145
42
                case    ID("Cryptofuzz/Cipher/ARIA_128_GCM"):
146
42
                case    ID("Cryptofuzz/Cipher/ARIA_192_GCM"):
147
42
                case    ID("Cryptofuzz/Cipher/ARIA_256_GCM"):
148
42
                    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
42
                        tryDecrypt = false;
153
42
                    }
154
42
                    break;
155
714
            }
156
714
        }
157
158
934
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
892
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
892
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
892
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
892
                    op.cleartext.GetSize() + 32,
171
172
892
                    op.aad,
173
174
                    /* Empty modifier */
175
892
                    {});
176
177
892
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
892
            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
892
            } 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
892
        }
208
934
    }
209
3.81k
}
210
211
3.81k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
3.81k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
3.81k
    return module->OpSymmetricEncrypt(op);
215
3.81k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
2.95k
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
2.95k
    (void)module;
220
2.95k
    (void)op;
221
222
2.95k
    if ( result.second != std::nullopt ) {
223
333
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
333
    }
225
2.95k
}
226
227
2.95k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
2.95k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
2.95k
    return module->OpSymmetricDecrypt(op);
231
2.95k
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
533
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
533
    (void)module;
236
533
    (void)op;
237
238
533
    if ( result.second != std::nullopt ) {
239
126
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
126
    }
241
533
}
242
243
533
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
533
    return module->OpKDF_SCRYPT(op);
245
533
}
246
247
/* Specialization for operation::KDF_HKDF */
248
895
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
895
    (void)module;
250
895
    (void)op;
251
252
895
    if ( result.second != std::nullopt ) {
253
267
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
267
    }
255
895
}
256
257
895
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
895
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
895
    return module->OpKDF_HKDF(op);
261
895
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
235
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
235
    (void)module;
266
235
    (void)op;
267
268
235
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
235
}
272
273
235
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
235
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
235
    return module->OpKDF_PBKDF(op);
277
235
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
273
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
273
    (void)module;
282
273
    (void)op;
283
284
273
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
273
}
288
289
273
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
273
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
273
    return module->OpKDF_PBKDF1(op);
293
273
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
1.02k
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.02k
    (void)module;
298
1.02k
    (void)op;
299
300
1.02k
    if ( result.second != std::nullopt ) {
301
330
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
330
    }
303
1.02k
}
304
305
1.02k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
1.02k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
1.02k
    return module->OpKDF_PBKDF2(op);
309
1.02k
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
717
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
717
    (void)module;
314
717
    (void)op;
315
316
717
    if ( result.second != std::nullopt ) {
317
244
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
244
    }
319
717
}
320
321
717
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
717
    return module->OpKDF_ARGON2(op);
323
717
}
324
325
/* Specialization for operation::KDF_SSH */
326
154
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
154
    (void)module;
328
154
    (void)op;
329
330
154
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
154
}
334
335
154
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
154
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
154
    return module->OpKDF_SSH(op);
339
154
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
311
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
311
    (void)module;
344
311
    (void)op;
345
346
311
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
311
}
350
351
311
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
311
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
311
    return module->OpKDF_TLS1_PRF(op);
355
311
}
356
357
/* Specialization for operation::KDF_X963 */
358
206
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
206
    (void)module;
360
206
    (void)op;
361
362
206
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
206
}
366
367
206
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
206
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
206
    return module->OpKDF_X963(op);
371
206
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
34
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
34
    (void)module;
376
34
    (void)op;
377
378
34
    if ( result.second != std::nullopt ) {
379
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
0
    }
381
34
}
382
383
34
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
34
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
34
    return module->OpKDF_BCRYPT(op);
387
34
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
818
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
818
    (void)module;
392
818
    (void)op;
393
394
818
    if ( result.second != std::nullopt ) {
395
224
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
224
    }
397
818
}
398
399
818
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
818
    if ( op.mech.mode == true ) {
401
628
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
628
    }
403
404
818
    return module->OpKDF_SP_800_108(op);
405
818
}
406
407
/* Specialization for operation::KDF_SRTP */
408
170
template<> void ExecutorBase<component::Key3, operation::KDF_SRTP>::postprocess(std::shared_ptr<Module> module, operation::KDF_SRTP& op, const ExecutorBase<component::Key3, operation::KDF_SRTP>::ResultPair& result) const {
409
170
    (void)module;
410
170
    (void)op;
411
170
    (void)result;
412
170
}
413
414
170
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const {
415
170
    return module->OpKDF_SRTP(op);
416
170
}
417
418
/* Specialization for operation::KDF_SRTCP */
419
128
template<> void ExecutorBase<component::Key3, operation::KDF_SRTCP>::postprocess(std::shared_ptr<Module> module, operation::KDF_SRTCP& op, const ExecutorBase<component::Key3, operation::KDF_SRTCP>::ResultPair& result) const {
420
128
    (void)module;
421
128
    (void)op;
422
128
    (void)result;
423
128
}
424
425
128
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const {
426
128
    return module->OpKDF_SRTCP(op);
427
128
}
428
429
/* Specialization for operation::ECC_PrivateToPublic */
430
558
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op, const ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::ResultPair& result) const {
431
558
    (void)module;
432
433
558
    if ( result.second != std::nullopt  ) {
434
170
        const auto curveID = op.curveType.Get();
435
170
        const auto privkey = op.priv.ToTrimmedString();
436
170
        const auto pub_x = result.second->first.ToTrimmedString();
437
170
        const auto pub_y = result.second->second.ToTrimmedString();
438
439
170
        Pool_CurvePrivkey.Set({ curveID, privkey });
440
170
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
441
170
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
442
443
170
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
444
170
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
445
170
    }
446
558
}
447
448
558
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op) const {
449
558
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
450
451
558
    const size_t size = op.priv.ToTrimmedString().size();
452
453
558
    if ( size == 0 || size > 4096 ) {
454
0
        return std::nullopt;
455
0
    }
456
457
558
    return module->OpECC_PrivateToPublic(op);
458
558
}
459
460
/* Specialization for operation::ECC_ValidatePubkey */
461
323
template<> void ExecutorBase<bool, operation::ECC_ValidatePubkey>::postprocess(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op, const ExecutorBase<bool, operation::ECC_ValidatePubkey>::ResultPair& result) const {
462
323
    (void)module;
463
323
    (void)op;
464
323
    (void)result;
465
323
}
466
467
323
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
468
323
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
469
470
323
    return module->OpECC_ValidatePubkey(op);
471
323
}
472
473
/* Specialization for operation::ECC_GenerateKeyPair */
474
475
/* Do not compare DH_GenerateKeyPair results, because the result can be produced indeterministically */
476
template <>
477
120
void ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DH_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
478
120
    (void)operations;
479
120
    (void)results;
480
120
    (void)data;
481
120
    (void)size;
482
120
}
483
484
851
template<> void ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op, const ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::ResultPair& result) const {
485
851
    (void)module;
486
487
851
    if ( result.second != std::nullopt  ) {
488
360
        const auto curveID = op.curveType.Get();
489
360
        const auto privkey = result.second->priv.ToTrimmedString();
490
360
        const auto pub_x = result.second->pub.first.ToTrimmedString();
491
360
        const auto pub_y = result.second->pub.second.ToTrimmedString();
492
493
360
        Pool_CurvePrivkey.Set({ curveID, privkey });
494
360
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
495
360
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
496
497
360
        {
498
360
            auto opValidate = operation::ECC_ValidatePubkey(
499
360
                    op.curveType,
500
360
                    result.second->pub,
501
360
                    op.modifier);
502
503
360
            const auto validateResult = module->OpECC_ValidatePubkey(opValidate);
504
360
            CF_ASSERT(
505
360
                    validateResult == std::nullopt ||
506
360
                    *validateResult == true,
507
360
                    "Cannot validate generated public key");
508
360
        }
509
360
    }
510
851
}
511
512
851
template<> std::optional<component::ECC_KeyPair> ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op) const {
513
851
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
514
515
851
    return module->OpECC_GenerateKeyPair(op);
516
851
}
517
518
/* Specialization for operation::ECCSI_Sign */
519
114
template<> void ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECCSI_Sign& op, const ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::ResultPair& result) const {
520
114
    (void)module;
521
522
114
    if ( result.second != std::nullopt  ) {
523
0
        const auto curveID = op.curveType.Get();
524
0
        const auto cleartext = op.cleartext.ToHex();
525
0
        const auto id = op.id.ToHex();
526
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
527
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
528
0
        const auto pvt_x = result.second->pvt.first.ToTrimmedString();
529
0
        const auto pvt_y = result.second->pvt.second.ToTrimmedString();
530
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
531
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
532
533
0
        Pool_CurveECCSISignature.Set({
534
0
                curveID,
535
0
                cleartext,
536
0
                id,
537
0
                pub_x, pub_y,
538
0
                pvt_x, pvt_y,
539
0
                sig_r, sig_s});
540
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
541
0
        Pool_CurveECC_Point.Set({ curveID, pvt_x, pvt_y });
542
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
543
544
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
545
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
546
0
        if ( pvt_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pvt_x); }
547
0
        if ( pvt_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pvt_y); }
548
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
549
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
550
551
0
        {
552
0
            auto opVerify = operation::ECCSI_Verify(
553
0
                    op,
554
0
                    *(result.second),
555
0
                    op.modifier);
556
557
0
            const auto verifyResult = module->OpECCSI_Verify(opVerify);
558
0
            CF_ASSERT(
559
0
                    verifyResult == std::nullopt ||
560
0
                    *verifyResult == true,
561
0
                    "Cannot verify generated signature");
562
0
        }
563
0
    }
564
114
}
565
566
114
template<> std::optional<component::ECCSI_Signature> ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Sign& op) const {
567
114
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
568
114
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
569
570
114
    const size_t size = op.priv.ToTrimmedString().size();
571
572
114
    if ( size == 0 || size > 4096 ) {
573
0
        return std::nullopt;
574
0
    }
575
576
114
    return module->OpECCSI_Sign(op);
577
114
}
578
579
/* Specialization for operation::ECDSA_Sign */
580
2.64k
template<> void ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Sign& op, const ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::ResultPair& result) const {
581
2.64k
    (void)module;
582
583
2.64k
    if ( result.second != std::nullopt  ) {
584
1.32k
        const auto curveID = op.curveType.Get();
585
1.32k
        const auto cleartext = op.cleartext.ToHex();
586
1.32k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
587
1.32k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
588
1.32k
        const auto sig_r = result.second->signature.first.ToTrimmedString();
589
1.32k
        const auto sig_s = result.second->signature.second.ToTrimmedString();
590
591
1.32k
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
592
1.32k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
593
1.32k
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
594
595
1.32k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
596
1.32k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
597
1.32k
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
598
1.32k
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
599
600
1.32k
        {
601
1.32k
            auto opVerify = operation::ECDSA_Verify(
602
1.32k
                    op,
603
1.32k
                    *(result.second),
604
1.32k
                    op.modifier);
605
606
1.32k
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
607
1.32k
            CF_ASSERT(
608
1.32k
                    verifyResult == std::nullopt ||
609
1.32k
                    *verifyResult == true,
610
1.32k
                    "Cannot verify generated signature");
611
1.32k
        }
612
1.32k
    }
613
2.64k
}
614
615
2.64k
template<> std::optional<component::ECDSA_Signature> ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Sign& op) const {
616
2.64k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
617
2.64k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
618
619
2.64k
    const size_t size = op.priv.ToTrimmedString().size();
620
621
2.64k
    if ( size == 0 || size > 4096 ) {
622
0
        return std::nullopt;
623
0
    }
624
625
2.64k
    return module->OpECDSA_Sign(op);
626
2.64k
}
627
628
/* Specialization for operation::ECGDSA_Sign */
629
277
template<> void ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECGDSA_Sign& op, const ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::ResultPair& result) const {
630
277
    (void)module;
631
632
277
    if ( result.second != std::nullopt  ) {
633
81
        const auto curveID = op.curveType.Get();
634
81
        const auto cleartext = op.cleartext.ToHex();
635
81
        const auto pub_x = result.second->pub.first.ToTrimmedString();
636
81
        const auto pub_y = result.second->pub.second.ToTrimmedString();
637
81
        const auto sig_r = result.second->signature.first.ToTrimmedString();
638
81
        const auto sig_s = result.second->signature.second.ToTrimmedString();
639
640
81
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
641
81
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
642
81
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
643
644
81
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
645
81
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
646
81
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
647
81
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
648
81
    }
649
277
}
650
651
277
template<> std::optional<component::ECGDSA_Signature> ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Sign& op) const {
652
277
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
653
277
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
654
655
277
    const size_t size = op.priv.ToTrimmedString().size();
656
657
277
    if ( size == 0 || size > 4096 ) {
658
0
        return std::nullopt;
659
0
    }
660
661
277
    return module->OpECGDSA_Sign(op);
662
277
}
663
664
/* Specialization for operation::ECRDSA_Sign */
665
112
template<> void ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECRDSA_Sign& op, const ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::ResultPair& result) const {
666
112
    (void)module;
667
668
112
    if ( result.second != std::nullopt  ) {
669
0
        const auto curveID = op.curveType.Get();
670
0
        const auto cleartext = op.cleartext.ToHex();
671
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
672
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
673
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
674
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
675
676
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
677
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
678
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
679
680
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
681
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
682
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
683
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
684
0
    }
685
112
}
686
687
112
template<> std::optional<component::ECRDSA_Signature> ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Sign& op) const {
688
112
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
689
112
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
690
691
112
    const size_t size = op.priv.ToTrimmedString().size();
692
693
112
    if ( size == 0 || size > 4096 ) {
694
0
        return std::nullopt;
695
0
    }
696
697
112
    return module->OpECRDSA_Sign(op);
698
112
}
699
700
/* Specialization for operation::Schnorr_Sign */
701
103
template<> void ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::postprocess(std::shared_ptr<Module> module, operation::Schnorr_Sign& op, const ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::ResultPair& result) const {
702
103
    (void)module;
703
704
103
    if ( result.second != std::nullopt  ) {
705
0
        const auto curveID = op.curveType.Get();
706
0
        const auto cleartext = op.cleartext.ToHex();
707
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
708
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
709
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
710
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
711
712
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
713
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
714
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
715
716
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
717
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
718
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
719
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
720
0
    }
721
103
}
722
723
103
template<> std::optional<component::Schnorr_Signature> ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Sign& op) const {
724
103
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
103
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
726
727
103
    const size_t size = op.priv.ToTrimmedString().size();
728
729
103
    if ( size == 0 || size > 4096 ) {
730
0
        return std::nullopt;
731
0
    }
732
733
103
    return module->OpSchnorr_Sign(op);
734
103
}
735
736
/* Specialization for operation::ECCSI_Verify */
737
89
template<> void ExecutorBase<bool, operation::ECCSI_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECCSI_Verify& op, const ExecutorBase<bool, operation::ECCSI_Verify>::ResultPair& result) const {
738
89
    (void)module;
739
89
    (void)op;
740
89
    (void)result;
741
89
}
742
743
89
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
744
89
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
745
89
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
746
747
89
    return module->OpECCSI_Verify(op);
748
89
}
749
750
/* Specialization for operation::ECDSA_Verify */
751
643
template<> void ExecutorBase<bool, operation::ECDSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Verify& op, const ExecutorBase<bool, operation::ECDSA_Verify>::ResultPair& result) const {
752
643
    (void)module;
753
643
    (void)op;
754
643
    (void)result;
755
643
}
756
757
643
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
758
643
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
759
643
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
760
761
    /* Intentionally do not constrain the size of the public key or
762
     * signature (like we do for BignumCalc).
763
     *
764
     * If any large public key or signature causes a time-out (or
765
     * worse), this is something that needs attention;
766
     * because verifiers sometimes process untrusted public keys,
767
     * signatures or both, they should be resistant to bugs
768
     * arising from large inputs.
769
     */
770
771
643
    return module->OpECDSA_Verify(op);
772
643
}
773
774
/* Specialization for operation::ECGDSA_Verify */
775
416
template<> void ExecutorBase<bool, operation::ECGDSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op, const ExecutorBase<bool, operation::ECGDSA_Verify>::ResultPair& result) const {
776
416
    (void)module;
777
416
    (void)op;
778
416
    (void)result;
779
416
}
780
781
416
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
782
416
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
783
416
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
784
785
    /* Intentionally do not constrain the size of the public key or
786
     * signature (like we do for BignumCalc).
787
     *
788
     * If any large public key or signature causes a time-out (or
789
     * worse), this is something that needs attention;
790
     * because verifiers sometimes process untrusted public keys,
791
     * signatures or both, they should be resistant to bugs
792
     * arising from large inputs.
793
     */
794
795
416
    return module->OpECGDSA_Verify(op);
796
416
}
797
798
/* Specialization for operation::ECRDSA_Verify */
799
104
template<> void ExecutorBase<bool, operation::ECRDSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op, const ExecutorBase<bool, operation::ECRDSA_Verify>::ResultPair& result) const {
800
104
    (void)module;
801
104
    (void)op;
802
104
    (void)result;
803
104
}
804
805
104
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
806
104
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
807
104
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
808
809
    /* Intentionally do not constrain the size of the public key or
810
     * signature (like we do for BignumCalc).
811
     *
812
     * If any large public key or signature causes a time-out (or
813
     * worse), this is something that needs attention;
814
     * because verifiers sometimes process untrusted public keys,
815
     * signatures or both, they should be resistant to bugs
816
     * arising from large inputs.
817
     */
818
819
104
    return module->OpECRDSA_Verify(op);
820
104
}
821
822
/* Specialization for operation::Schnorr_Verify */
823
103
template<> void ExecutorBase<bool, operation::Schnorr_Verify>::postprocess(std::shared_ptr<Module> module, operation::Schnorr_Verify& op, const ExecutorBase<bool, operation::Schnorr_Verify>::ResultPair& result) const {
824
103
    (void)module;
825
103
    (void)op;
826
103
    (void)result;
827
103
}
828
829
103
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
830
103
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
831
103
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
832
833
    /* Intentionally do not constrain the size of the public key or
834
     * signature (like we do for BignumCalc).
835
     *
836
     * If any large public key or signature causes a time-out (or
837
     * worse), this is something that needs attention;
838
     * because verifiers sometimes process untrusted public keys,
839
     * signatures or both, they should be resistant to bugs
840
     * arising from large inputs.
841
     */
842
843
103
    return module->OpSchnorr_Verify(op);
844
103
}
845
846
1.63k
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Recover& op, const ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::ResultPair& result) const {
847
1.63k
    (void)module;
848
1.63k
    (void)op;
849
1.63k
    (void)result;
850
1.63k
}
851
852
1.63k
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Recover& op) const {
853
1.63k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
854
1.63k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
855
856
1.63k
    return module->OpECDSA_Recover(op);
857
1.63k
}
858
859
/* Specialization for operation::DSA_Verify */
860
0
template<> void ExecutorBase<bool, operation::DSA_Verify>::updateExtraCounters(const uint64_t moduleID, operation::DSA_Verify& op) const {
861
0
    (void)moduleID;
862
0
    (void)op;
863
864
    /* TODO */
865
0
}
866
867
690
template<> void ExecutorBase<bool, operation::DSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::DSA_Verify& op, const ExecutorBase<bool, operation::DSA_Verify>::ResultPair& result) const {
868
690
    (void)module;
869
690
    (void)op;
870
690
    (void)result;
871
690
}
872
873
690
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
874
690
    const std::vector<size_t> sizes = {
875
690
        op.parameters.p.ToTrimmedString().size(),
876
690
        op.parameters.q.ToTrimmedString().size(),
877
690
        op.parameters.g.ToTrimmedString().size(),
878
690
        op.pub.ToTrimmedString().size(),
879
690
        op.signature.first.ToTrimmedString().size(),
880
690
        op.signature.second.ToTrimmedString().size(),
881
690
    };
882
883
4.14k
    for (const auto& size : sizes) {
884
4.14k
        if ( size == 0 || size > 4096 ) {
885
0
            return std::nullopt;
886
0
        }
887
4.14k
    }
888
889
690
    return module->OpDSA_Verify(op);
890
690
}
891
892
/* Specialization for operation::DSA_Sign */
893
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
894
template <>
895
83
void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DSA_Sign> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
896
83
    (void)operations;
897
83
    (void)results;
898
83
    (void)data;
899
83
    (void)size;
900
83
}
901
0
template<> void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::updateExtraCounters(const uint64_t moduleID, operation::DSA_Sign& op) const {
902
0
    (void)moduleID;
903
0
    (void)op;
904
905
    /* TODO */
906
0
}
907
908
295
template<> void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::DSA_Sign& op, const ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::ResultPair& result) const {
909
295
    (void)module;
910
295
    (void)op;
911
295
    if ( result.second != std::nullopt ) {
912
0
        const auto cleartext = op.cleartext.ToHex();
913
0
        const auto p = op.parameters.p.ToTrimmedString();
914
0
        const auto q = op.parameters.q.ToTrimmedString();
915
0
        const auto g = op.parameters.g.ToTrimmedString();
916
0
        const auto r = result.second->signature.first.ToTrimmedString();
917
0
        const auto s = result.second->signature.second.ToTrimmedString();
918
0
        const auto pub = result.second->pub.ToTrimmedString();
919
920
0
        Pool_DSASignature.Set({
921
0
                cleartext,
922
0
                p,
923
0
                q,
924
0
                g,
925
0
                pub,
926
0
                r,
927
0
                s
928
0
        });
929
930
0
        if ( r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(r); }
931
0
        if ( s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(s); }
932
0
    }
933
295
}
934
935
295
template<> std::optional<component::DSA_Signature> ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::callModule(std::shared_ptr<Module> module, operation::DSA_Sign& op) const {
936
295
    const std::vector<size_t> sizes = {
937
295
        op.parameters.p.ToTrimmedString().size(),
938
295
        op.parameters.q.ToTrimmedString().size(),
939
295
        op.parameters.g.ToTrimmedString().size(),
940
295
        op.priv.ToTrimmedString().size(),
941
295
    };
942
943
1.18k
    for (const auto& size : sizes) {
944
1.18k
        if ( size == 0 || size > 4096 ) {
945
0
            return std::nullopt;
946
0
        }
947
1.18k
    }
948
949
295
    return module->OpDSA_Sign(op);
950
295
}
951
952
/* Specialization for operation::DSA_PrivateToPublic */
953
954
0
template<> void ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::updateExtraCounters(const uint64_t moduleID, operation::DSA_PrivateToPublic& op) const {
955
0
    (void)moduleID;
956
0
    (void)op;
957
958
    /* TODO */
959
0
}
960
961
66
template<> void ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op, const ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::ResultPair& result) const {
962
66
    (void)result;
963
66
    (void)module;
964
66
    (void)op;
965
66
    if ( result.second != std::nullopt ) {
966
        //Pool_DSA_PubPriv.Set({pub, priv});
967
0
    }
968
66
}
969
970
66
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
971
66
    return module->OpDSA_PrivateToPublic(op);
972
66
}
973
974
/* Specialization for operation::DSA_GenerateKeyPair */
975
976
/* Do not compare DSA_GenerateKeyPair results, because the result can be produced indeterministically */
977
template <>
978
35
void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DSA_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
979
35
    (void)operations;
980
35
    (void)results;
981
35
    (void)data;
982
35
    (void)size;
983
35
}
984
985
0
template<> void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateKeyPair& op) const {
986
0
    (void)moduleID;
987
0
    (void)op;
988
989
    /* TODO */
990
0
}
991
992
151
template<> void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::DSA_GenerateKeyPair& op, const ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::ResultPair& result) const {
993
151
    (void)result;
994
151
    (void)module;
995
151
    (void)op;
996
151
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
997
0
        const auto priv = result.second->first.ToTrimmedString();
998
0
        const auto pub = result.second->second.ToTrimmedString();
999
1000
0
        Pool_DSA_PubPriv.Set({pub, priv});
1001
0
    }
1002
151
}
1003
1004
151
template<> std::optional<component::DSA_KeyPair> ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateKeyPair& op) const {
1005
151
    const std::vector<size_t> sizes = {
1006
151
        op.p.ToTrimmedString().size(),
1007
151
        op.q.ToTrimmedString().size(),
1008
151
        op.g.ToTrimmedString().size(),
1009
151
    };
1010
1011
453
    for (const auto& size : sizes) {
1012
453
        if ( size == 0 || size > 4096 ) {
1013
0
            return std::nullopt;
1014
0
        }
1015
453
    }
1016
1017
151
    return module->OpDSA_GenerateKeyPair(op);
1018
151
}
1019
1020
/* Specialization for operation::DSA_GenerateParameters */
1021
1022
/* Do not compare DSA_GenerateParameters results, because the result can be produced indeterministically */
1023
template <>
1024
337
void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DSA_GenerateParameters> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
1025
337
    (void)operations;
1026
337
    (void)results;
1027
337
    (void)data;
1028
337
    (void)size;
1029
337
}
1030
1031
0
template<> void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateParameters& op) const {
1032
0
    (void)moduleID;
1033
0
    (void)op;
1034
1035
    /* TODO */
1036
0
}
1037
1038
1.32k
template<> void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::postprocess(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op, const ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::ResultPair& result) const {
1039
1.32k
    (void)result;
1040
1.32k
    (void)module;
1041
1.32k
    (void)op;
1042
1.32k
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1043
173
        const auto P = result.second->p.ToTrimmedString();
1044
173
        const auto Q = result.second->q.ToTrimmedString();
1045
173
        const auto G = result.second->g.ToTrimmedString();
1046
1047
173
        Pool_DSA_PQG.Set({P, Q, G});
1048
1049
173
        if ( P.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(P); }
1050
173
        if ( Q.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(Q); }
1051
173
        if ( G.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(G); }
1052
173
    }
1053
1.32k
}
1054
1055
1.32k
template<> std::optional<component::DSA_Parameters> ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op) const {
1056
1.32k
    return module->OpDSA_GenerateParameters(op);
1057
1.32k
}
1058
1059
/* Specialization for operation::ECDH_Derive */
1060
158
template<> void ExecutorBase<component::Secret, operation::ECDH_Derive>::postprocess(std::shared_ptr<Module> module, operation::ECDH_Derive& op, const ExecutorBase<component::Secret, operation::ECDH_Derive>::ResultPair& result) const {
1061
158
    (void)module;
1062
158
    (void)op;
1063
158
    (void)result;
1064
158
}
1065
1066
158
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1067
158
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1068
1069
158
    return module->OpECDH_Derive(op);
1070
158
}
1071
1072
/* Specialization for operation::ECIES_Encrypt */
1073
template <>
1074
28
void ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::ECIES_Encrypt> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
1075
28
    (void)operations;
1076
28
    (void)results;
1077
28
    (void)data;
1078
28
    (void)size;
1079
28
}
1080
123
template<> void ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::postprocess(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op, const ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::ResultPair& result) const {
1081
123
    (void)module;
1082
123
    (void)op;
1083
123
    (void)result;
1084
123
}
1085
1086
123
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1087
123
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1088
1089
123
    return module->OpECIES_Encrypt(op);
1090
123
}
1091
1092
/* Specialization for operation::ECIES_Decrypt */
1093
83
template<> void ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::postprocess(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op, const ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::ResultPair& result) const {
1094
83
    (void)module;
1095
83
    (void)op;
1096
83
    (void)result;
1097
83
}
1098
1099
83
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1100
83
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1101
1102
83
    return module->OpECIES_Decrypt(op);
1103
83
}
1104
1105
/* Specialization for operation::ECC_Point_Add */
1106
318
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Add& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>::ResultPair& result) const {
1107
318
    (void)module;
1108
1109
318
    if ( result.second != std::nullopt  ) {
1110
18
        const auto curveID = op.curveType.Get();
1111
18
        const auto x = result.second->first.ToTrimmedString();
1112
18
        const auto y = result.second->second.ToTrimmedString();
1113
1114
18
        Pool_CurveECC_Point.Set({ curveID, x, y });
1115
1116
18
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1117
18
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1118
18
    }
1119
318
}
1120
1121
318
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Add& op) const {
1122
318
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1123
1124
318
    return module->OpECC_Point_Add(op);
1125
318
}
1126
1127
/* Specialization for operation::ECC_Point_Sub */
1128
201
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Sub& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>::ResultPair& result) const {
1129
201
    (void)module;
1130
1131
201
    if ( result.second != std::nullopt  ) {
1132
5
        const auto curveID = op.curveType.Get();
1133
5
        const auto x = result.second->first.ToTrimmedString();
1134
5
        const auto y = result.second->second.ToTrimmedString();
1135
1136
5
        Pool_CurveECC_Point.Set({ curveID, x, y });
1137
1138
5
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1139
5
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1140
5
    }
1141
201
}
1142
1143
201
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Sub& op) const {
1144
201
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1145
1146
201
    return module->OpECC_Point_Sub(op);
1147
201
}
1148
1149
/* Specialization for operation::ECC_Point_Mul */
1150
512
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Mul& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::ResultPair& result) const {
1151
512
    (void)module;
1152
1153
512
    if ( result.second != std::nullopt  ) {
1154
112
        const auto curveID = op.curveType.Get();
1155
112
        const auto x = result.second->first.ToTrimmedString();
1156
112
        const auto y = result.second->second.ToTrimmedString();
1157
1158
112
        Pool_CurveECC_Point.Set({ curveID, x, y });
1159
1160
112
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1161
112
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1162
112
    }
1163
512
}
1164
1165
512
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Mul& op) const {
1166
512
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1167
1168
512
    return module->OpECC_Point_Mul(op);
1169
512
}
1170
1171
/* Specialization for operation::ECC_Point_Neg */
1172
378
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Neg& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::ResultPair& result) const {
1173
378
    (void)module;
1174
1175
378
    if ( result.second != std::nullopt  ) {
1176
19
        const auto curveID = op.curveType.Get();
1177
19
        const auto x = result.second->first.ToTrimmedString();
1178
19
        const auto y = result.second->second.ToTrimmedString();
1179
1180
19
        Pool_CurveECC_Point.Set({ curveID, x, y });
1181
1182
19
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1183
19
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1184
19
    }
1185
378
}
1186
1187
378
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Neg& op) const {
1188
378
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1189
1190
378
    return module->OpECC_Point_Neg(op);
1191
378
}
1192
1193
/* Specialization for operation::ECC_Point_Dbl */
1194
661
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Dbl& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>::ResultPair& result) const {
1195
661
    (void)module;
1196
1197
661
    if ( result.second != std::nullopt  ) {
1198
46
        const auto curveID = op.curveType.Get();
1199
46
        const auto x = result.second->first.ToTrimmedString();
1200
46
        const auto y = result.second->second.ToTrimmedString();
1201
1202
46
        Pool_CurveECC_Point.Set({ curveID, x, y });
1203
1204
46
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1205
46
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1206
46
    }
1207
661
}
1208
1209
661
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Dbl& op) const {
1210
661
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1211
1212
661
    return module->OpECC_Point_Dbl(op);
1213
661
}
1214
1215
/* Specialization for operation::ECC_Point_Cmp */
1216
342
template<> void ExecutorBase<bool, operation::ECC_Point_Cmp>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op, const ExecutorBase<bool, operation::ECC_Point_Cmp>::ResultPair& result) const {
1217
342
    (void)module;
1218
342
    (void)result;
1219
342
    (void)op;
1220
342
}
1221
1222
342
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1223
342
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1224
1225
342
    return module->OpECC_Point_Cmp(op);
1226
342
}
1227
1228
/* Specialization for operation::DH_Derive */
1229
475
template<> void ExecutorBase<component::Bignum, operation::DH_Derive>::postprocess(std::shared_ptr<Module> module, operation::DH_Derive& op, const ExecutorBase<component::Bignum, operation::DH_Derive>::ResultPair& result) const {
1230
475
    (void)module;
1231
475
    (void)op;
1232
475
    (void)result;
1233
475
}
1234
1235
475
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1236
475
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1237
475
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1238
475
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1239
475
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1240
1241
475
    return module->OpDH_Derive(op);
1242
475
}
1243
1244
/* Specialization for operation::DH_GenerateKeyPair */
1245
432
template<> void ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::DH_GenerateKeyPair& op, const ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::ResultPair& result) const {
1246
432
    (void)result;
1247
432
    (void)op;
1248
432
    (void)module;
1249
1250
432
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1251
27
        const auto priv = result.second->first.ToTrimmedString();
1252
27
        const auto pub = result.second->second.ToTrimmedString();
1253
1254
27
        Pool_DH_PrivateKey.Set(priv);
1255
27
        Pool_DH_PublicKey.Set(pub);
1256
27
    }
1257
432
}
1258
1259
432
template<> std::optional<component::DH_KeyPair> ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DH_GenerateKeyPair& op) const {
1260
432
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1261
432
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1262
1263
432
    return module->OpDH_GenerateKeyPair(op);
1264
432
}
1265
1266
/* Specialization for operation::BignumCalc */
1267
34.1k
template<> void ExecutorBase<component::Bignum, operation::BignumCalc>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc& op, const ExecutorBase<component::Bignum, operation::BignumCalc>::ResultPair& result) const {
1268
34.1k
    (void)module;
1269
34.1k
    (void)op;
1270
1271
34.1k
    if ( result.second != std::nullopt  ) {
1272
21.0k
        const auto bignum = result.second->ToTrimmedString();
1273
1274
21.0k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1275
20.1k
            Pool_Bignum.Set(bignum);
1276
20.1k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1277
2.27k
                Pool_Bignum_Primes.Set(bignum);
1278
2.27k
            }
1279
20.1k
        }
1280
21.0k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1281
1.26k
            if ( bignum == "1" ) {
1282
291
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1283
291
            }
1284
1.26k
        }
1285
21.0k
    }
1286
34.1k
}
1287
1288
34.1k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1289
34.1k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1290
1291
    /* Prevent timeouts */
1292
34.1k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1293
34.1k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1294
34.1k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1295
34.1k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1296
1297
34.1k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1298
337
        return std::nullopt;
1299
337
    }
1300
1301
33.8k
    switch ( op.calcOp.Get() ) {
1302
76
        case    CF_CALCOP("SetBit(A,B)"):
1303
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1304
76
            if ( op.bn1.GetSize() > 4 ) {
1305
9
                return std::nullopt;
1306
9
            }
1307
67
            break;
1308
335
        case    CF_CALCOP("Exp(A,B)"):
1309
335
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1310
18
                return std::nullopt;
1311
18
            }
1312
317
            break;
1313
317
        case    CF_CALCOP("ModLShift(A,B,C)"):
1314
170
            if ( op.bn1.GetSize() > 4 ) {
1315
9
                return std::nullopt;
1316
9
            }
1317
161
            break;
1318
161
        case    CF_CALCOP("Exp2(A)"):
1319
14
            if ( op.bn0.GetSize() > 4 ) {
1320
5
                return std::nullopt;
1321
5
            }
1322
9
            break;
1323
33.8k
    }
1324
1325
33.7k
    return module->OpBignumCalc(op);
1326
33.8k
}
1327
1328
/* Specialization for operation::BignumCalc_Fp2 */
1329
109
template<> void ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op, const ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ResultPair& result) const {
1330
109
    (void)module;
1331
109
    (void)op;
1332
1333
109
    if ( result.second != std::nullopt  ) {
1334
0
        const auto bignum_first = result.second->first.ToTrimmedString();
1335
0
        const auto bignum_second = result.second->second.ToTrimmedString();
1336
1337
0
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1338
0
            Pool_Bignum.Set(bignum_first);
1339
0
        }
1340
0
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1341
0
            Pool_Bignum.Set(bignum_second);
1342
0
        }
1343
0
    }
1344
109
}
1345
1346
109
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1347
109
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1348
1349
    /* Prevent timeouts */
1350
109
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1351
109
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1352
109
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1353
109
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1354
109
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1355
109
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1356
109
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1357
109
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1358
1359
109
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1360
0
        return std::nullopt;
1361
0
    }
1362
1363
109
    return module->OpBignumCalc_Fp2(op);
1364
109
}
1365
1366
/* Specialization for operation::BignumCalc_Fp12 */
1367
240
template<> void ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op, const ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ResultPair& result) const {
1368
240
    (void)module;
1369
240
    (void)op;
1370
1371
240
    if ( result.second != std::nullopt  ) {
1372
0
        Pool_Fp12.Set({
1373
0
                result.second->bn1.ToTrimmedString(),
1374
0
                result.second->bn2.ToTrimmedString(),
1375
0
                result.second->bn3.ToTrimmedString(),
1376
0
                result.second->bn4.ToTrimmedString(),
1377
0
                result.second->bn5.ToTrimmedString(),
1378
0
                result.second->bn6.ToTrimmedString(),
1379
0
                result.second->bn7.ToTrimmedString(),
1380
0
                result.second->bn8.ToTrimmedString(),
1381
0
                result.second->bn9.ToTrimmedString(),
1382
0
                result.second->bn10.ToTrimmedString(),
1383
0
                result.second->bn11.ToTrimmedString(),
1384
0
                result.second->bn12.ToTrimmedString()
1385
0
        });
1386
        /* TODO */
1387
#if 0
1388
        const auto bignum_first = result.second->first.ToTrimmedString();
1389
        const auto bignum_second = result.second->second.ToTrimmedString();
1390
1391
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1392
            Pool_Bignum.Set(bignum_first);
1393
        }
1394
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1395
            Pool_Bignum.Set(bignum_second);
1396
        }
1397
#endif
1398
0
    }
1399
240
}
1400
1401
240
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1402
240
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1403
1404
    /* Prevent timeouts */
1405
240
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1406
240
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1407
240
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1408
240
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1409
240
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1410
240
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1411
240
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1412
240
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1413
240
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1414
237
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1415
237
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1416
237
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1417
1418
237
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1419
230
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1420
221
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1421
221
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1422
212
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1423
205
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1424
199
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1425
193
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1426
193
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1427
193
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1428
193
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1429
193
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1430
1431
193
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1432
193
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1433
193
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1434
193
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1435
193
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1436
193
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1437
193
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1438
193
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1439
193
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1440
193
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1441
193
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1442
193
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1443
1444
193
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1445
193
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1446
193
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1447
186
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1448
180
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1449
170
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1450
163
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1451
163
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1452
163
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1453
163
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1454
159
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1455
159
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1456
1457
159
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1458
0
        return std::nullopt;
1459
0
    }
1460
1461
159
    return module->OpBignumCalc_Fp12(op);
1462
159
}
1463
1464
/* Specialization for operation::BLS_PrivateToPublic */
1465
146
template<> void ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic& op, const ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::ResultPair& result) const {
1466
146
    (void)module;
1467
1468
146
    if ( result.second != std::nullopt  ) {
1469
0
        const auto curveID = op.curveType.Get();
1470
0
        const auto g1_x = result.second->first.ToTrimmedString();
1471
0
        const auto g1_y = result.second->second.ToTrimmedString();
1472
1473
0
        G1AddToPool(curveID, g1_x, g1_y);
1474
1475
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1476
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1477
0
    }
1478
146
}
1479
1480
146
template<> std::optional<component::BLS_PublicKey> ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic& op) const {
1481
146
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1482
1483
146
    const size_t size = op.priv.ToTrimmedString().size();
1484
1485
146
    if ( size == 0 || size > 4096 ) {
1486
0
        return std::nullopt;
1487
0
    }
1488
1489
146
    return module->OpBLS_PrivateToPublic(op);
1490
146
}
1491
1492
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1493
135
template<> void ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic_G2& op, const ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::ResultPair& result) const {
1494
135
    (void)module;
1495
135
    if ( result.second != std::nullopt  ) {
1496
0
        const auto curveID = op.curveType.Get();
1497
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1498
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1499
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1500
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1501
1502
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1503
1504
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1505
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1506
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1507
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1508
0
    }
1509
135
}
1510
1511
135
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic_G2& op) const {
1512
135
    const size_t size = op.priv.ToTrimmedString().size();
1513
1514
135
    if ( size == 0 || size > 4096 ) {
1515
0
        return std::nullopt;
1516
0
    }
1517
1518
135
    return module->OpBLS_PrivateToPublic_G2(op);
1519
135
}
1520
1521
/* Specialization for operation::BLS_Sign */
1522
105
template<> void ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::postprocess(std::shared_ptr<Module> module, operation::BLS_Sign& op, const ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::ResultPair& result) const {
1523
105
    (void)module;
1524
1525
105
    if ( result.second != std::nullopt  ) {
1526
0
        const auto curveID = op.curveType.Get();
1527
0
        const auto point_v = op.hashOrPoint ? op.point.first.first.ToTrimmedString() : "";
1528
0
        const auto point_w = op.hashOrPoint ? op.point.first.second.ToTrimmedString() : "";
1529
0
        const auto point_x = op.hashOrPoint ? op.point.second.first.ToTrimmedString() : "";
1530
0
        const auto point_y = op.hashOrPoint ? op.point.second.second.ToTrimmedString() : "";
1531
0
        const auto cleartext = op.hashOrPoint ? op.cleartext.ToHex() : "";
1532
0
        const auto dest = op.dest.ToHex();
1533
0
        const auto aug = op.aug.ToHex();
1534
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
1535
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
1536
0
        const auto sig_v = result.second->signature.first.first.ToTrimmedString();
1537
0
        const auto sig_w = result.second->signature.first.second.ToTrimmedString();
1538
0
        const auto sig_x = result.second->signature.second.first.ToTrimmedString();
1539
0
        const auto sig_y = result.second->signature.second.second.ToTrimmedString();
1540
1541
0
        G1AddToPool(curveID, pub_x, pub_y);
1542
0
        G2AddToPool(curveID, sig_v, sig_w, sig_x, sig_y);
1543
0
        Pool_CurveBLSSignature.Set({ curveID, op.hashOrPoint, point_v, point_w, point_x, point_y, cleartext, dest, aug, pub_x, pub_y, sig_v, sig_w, sig_x, sig_y});
1544
1545
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
1546
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
1547
0
        if ( sig_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_v); }
1548
0
        if ( sig_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_w); }
1549
0
        if ( sig_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_x); }
1550
0
        if ( sig_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_y); }
1551
0
    }
1552
105
}
1553
1554
105
template<> std::optional<component::BLS_Signature> ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::callModule(std::shared_ptr<Module> module, operation::BLS_Sign& op) const {
1555
105
    const size_t size = op.priv.ToTrimmedString().size();
1556
1557
105
    if ( size == 0 || size > 4096 ) {
1558
0
        return std::nullopt;
1559
0
    }
1560
1561
105
    return module->OpBLS_Sign(op);
1562
105
}
1563
1564
/* Specialization for operation::BLS_Verify */
1565
63
template<> void ExecutorBase<bool, operation::BLS_Verify>::postprocess(std::shared_ptr<Module> module, operation::BLS_Verify& op, const ExecutorBase<bool, operation::BLS_Verify>::ResultPair& result) const {
1566
63
    (void)module;
1567
63
    (void)op;
1568
63
    (void)result;
1569
63
}
1570
1571
63
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_Verify>::callModule(std::shared_ptr<Module> module, operation::BLS_Verify& op) const {
1572
#if 0
1573
    const std::vector<size_t> sizes = {
1574
        op.pub.first.ToTrimmedString().size(),
1575
        op.pub.second.ToTrimmedString().size(),
1576
        op.signature.first.ToTrimmedString().size(),
1577
        op.signature.second.ToTrimmedString().size(),
1578
    };
1579
1580
    for (const auto& size : sizes) {
1581
        if ( size == 0 || size > 4096 ) {
1582
            return std::nullopt;
1583
        }
1584
    }
1585
#endif
1586
1587
63
    return module->OpBLS_Verify(op);
1588
63
}
1589
1590
/* Specialization for operation::BLS_BatchSign */
1591
108
template<> void ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::postprocess(std::shared_ptr<Module> module, operation::BLS_BatchSign& op, const ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::ResultPair& result) const {
1592
108
    (void)module;
1593
108
    (void)op;
1594
1595
108
    if ( result.second != std::nullopt  ) {
1596
0
        std::vector< std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2> > msgpub;
1597
0
        for (const auto& mp : result.second->msgpub) {
1598
0
            msgpub.push_back(
1599
0
                    std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2>{
1600
0
                        {
1601
0
                            mp.first.first.ToTrimmedString(),
1602
0
                            mp.first.second.ToTrimmedString()
1603
0
                        },
1604
0
                        {
1605
0
                            mp.second.first.first.ToTrimmedString(),
1606
0
                            mp.second.first.second.ToTrimmedString(),
1607
0
                            mp.second.second.first.ToTrimmedString(),
1608
0
                            mp.second.second.second.ToTrimmedString()
1609
0
                        }
1610
0
                    }
1611
0
            );
1612
0
            G1AddToPool(CF_ECC_CURVE("BLS12_381"), mp.first.first.ToTrimmedString(), mp.first.second.ToTrimmedString());
1613
0
            Pool_CurveBLSG2.Set({
1614
0
                    CF_ECC_CURVE("BLS12_381"),
1615
0
                    mp.second.first.first.ToTrimmedString(),
1616
0
                    mp.second.first.second.ToTrimmedString(),
1617
0
                    mp.second.second.first.ToTrimmedString(),
1618
0
                    mp.second.second.second.ToTrimmedString()
1619
0
            });
1620
0
        }
1621
0
        Pool_BLS_BatchSignature.Set({msgpub});
1622
0
    }
1623
108
}
1624
1625
108
template<> std::optional<component::BLS_BatchSignature> ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchSign& op) const {
1626
108
    return module->OpBLS_BatchSign(op);
1627
108
}
1628
1629
/* Specialization for operation::BLS_BatchVerify */
1630
117
template<> void ExecutorBase<bool, operation::BLS_BatchVerify>::postprocess(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op, const ExecutorBase<bool, operation::BLS_BatchVerify>::ResultPair& result) const {
1631
117
    (void)module;
1632
117
    (void)op;
1633
117
    (void)result;
1634
117
}
1635
1636
117
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1637
117
    return module->OpBLS_BatchVerify(op);
1638
117
}
1639
1640
/* Specialization for operation::BLS_Aggregate_G1 */
1641
82
template<> void ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::postprocess(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op, const ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::ResultPair& result) const {
1642
82
    (void)module;
1643
82
    (void)op;
1644
82
    (void)result;
1645
82
}
1646
1647
82
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op) const {
1648
82
    return module->OpBLS_Aggregate_G1(op);
1649
82
}
1650
1651
/* Specialization for operation::BLS_Aggregate_G2 */
1652
100
template<> void ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op, const ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::ResultPair& result) const {
1653
100
    (void)module;
1654
100
    (void)op;
1655
100
    (void)result;
1656
100
}
1657
1658
100
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op) const {
1659
100
    return module->OpBLS_Aggregate_G2(op);
1660
100
}
1661
1662
/* Specialization for operation::BLS_Pairing */
1663
93
template<> void ExecutorBase<component::Fp12, operation::BLS_Pairing>::postprocess(std::shared_ptr<Module> module, operation::BLS_Pairing& op, const ExecutorBase<component::Fp12, operation::BLS_Pairing>::ResultPair& result) const {
1664
93
    (void)module;
1665
93
    (void)op;
1666
1667
93
    if ( result.second != std::nullopt  ) {
1668
0
        Pool_Fp12.Set({
1669
0
                result.second->bn1.ToTrimmedString(),
1670
0
                result.second->bn2.ToTrimmedString(),
1671
0
                result.second->bn3.ToTrimmedString(),
1672
0
                result.second->bn4.ToTrimmedString(),
1673
0
                result.second->bn5.ToTrimmedString(),
1674
0
                result.second->bn6.ToTrimmedString(),
1675
0
                result.second->bn7.ToTrimmedString(),
1676
0
                result.second->bn8.ToTrimmedString(),
1677
0
                result.second->bn9.ToTrimmedString(),
1678
0
                result.second->bn10.ToTrimmedString(),
1679
0
                result.second->bn11.ToTrimmedString(),
1680
0
                result.second->bn12.ToTrimmedString()
1681
0
        });
1682
0
    }
1683
93
}
1684
1685
93
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1686
93
    return module->OpBLS_Pairing(op);
1687
93
}
1688
1689
/* Specialization for operation::BLS_MillerLoop */
1690
86
template<> void ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::postprocess(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op, const ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::ResultPair& result) const {
1691
86
    (void)module;
1692
86
    (void)op;
1693
1694
86
    if ( result.second != std::nullopt  ) {
1695
0
        Pool_Fp12.Set({
1696
0
                result.second->bn1.ToTrimmedString(),
1697
0
                result.second->bn2.ToTrimmedString(),
1698
0
                result.second->bn3.ToTrimmedString(),
1699
0
                result.second->bn4.ToTrimmedString(),
1700
0
                result.second->bn5.ToTrimmedString(),
1701
0
                result.second->bn6.ToTrimmedString(),
1702
0
                result.second->bn7.ToTrimmedString(),
1703
0
                result.second->bn8.ToTrimmedString(),
1704
0
                result.second->bn9.ToTrimmedString(),
1705
0
                result.second->bn10.ToTrimmedString(),
1706
0
                result.second->bn11.ToTrimmedString(),
1707
0
                result.second->bn12.ToTrimmedString()
1708
0
        });
1709
0
    }
1710
86
}
1711
1712
86
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1713
86
    return module->OpBLS_MillerLoop(op);
1714
86
}
1715
1716
/* Specialization for operation::BLS_FinalExp */
1717
114
template<> void ExecutorBase<component::Fp12, operation::BLS_FinalExp>::postprocess(std::shared_ptr<Module> module, operation::BLS_FinalExp& op, const ExecutorBase<component::Fp12, operation::BLS_FinalExp>::ResultPair& result) const {
1718
114
    (void)module;
1719
114
    (void)op;
1720
1721
114
    if ( result.second != std::nullopt  ) {
1722
0
        Pool_Fp12.Set({
1723
0
                result.second->bn1.ToTrimmedString(),
1724
0
                result.second->bn2.ToTrimmedString(),
1725
0
                result.second->bn3.ToTrimmedString(),
1726
0
                result.second->bn4.ToTrimmedString(),
1727
0
                result.second->bn5.ToTrimmedString(),
1728
0
                result.second->bn6.ToTrimmedString(),
1729
0
                result.second->bn7.ToTrimmedString(),
1730
0
                result.second->bn8.ToTrimmedString(),
1731
0
                result.second->bn9.ToTrimmedString(),
1732
0
                result.second->bn10.ToTrimmedString(),
1733
0
                result.second->bn11.ToTrimmedString(),
1734
0
                result.second->bn12.ToTrimmedString()
1735
0
        });
1736
0
    }
1737
114
}
1738
1739
114
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1740
114
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1741
114
    return module->OpBLS_FinalExp(op);
1742
114
}
1743
1744
/* Specialization for operation::BLS_HashToG1 */
1745
120
template<> void ExecutorBase<component::G1, operation::BLS_HashToG1>::postprocess(std::shared_ptr<Module> module, operation::BLS_HashToG1& op, const ExecutorBase<component::G1, operation::BLS_HashToG1>::ResultPair& result) const {
1746
120
    (void)module;
1747
1748
120
    if ( result.second != std::nullopt  ) {
1749
0
        const auto curveID = op.curveType.Get();
1750
0
        const auto g1_x = result.second->first.ToTrimmedString();
1751
0
        const auto g1_y = result.second->second.ToTrimmedString();
1752
1753
0
        G1AddToPool(curveID, g1_x, g1_y);
1754
1755
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1756
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1757
0
    }
1758
120
}
1759
1760
120
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1761
120
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1762
120
    return module->OpBLS_HashToG1(op);
1763
120
}
1764
1765
/* Specialization for operation::BLS_MapToG1 */
1766
110
template<> void ExecutorBase<component::G1, operation::BLS_MapToG1>::postprocess(std::shared_ptr<Module> module, operation::BLS_MapToG1& op, const ExecutorBase<component::G1, operation::BLS_MapToG1>::ResultPair& result) const {
1767
110
    (void)module;
1768
1769
110
    if ( result.second != std::nullopt  ) {
1770
0
        const auto curveID = op.curveType.Get();
1771
0
        const auto g1_x = result.second->first.ToTrimmedString();
1772
0
        const auto g1_y = result.second->second.ToTrimmedString();
1773
1774
0
        G1AddToPool(curveID, g1_x, g1_y);
1775
1776
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1777
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1778
0
    }
1779
110
}
1780
1781
110
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1782
110
    return module->OpBLS_MapToG1(op);
1783
110
}
1784
1785
/* Specialization for operation::BLS_MapToG2 */
1786
118
template<> void ExecutorBase<component::G2, operation::BLS_MapToG2>::postprocess(std::shared_ptr<Module> module, operation::BLS_MapToG2& op, const ExecutorBase<component::G2, operation::BLS_MapToG2>::ResultPair& result) const {
1787
118
    (void)module;
1788
1789
118
    if ( result.second != std::nullopt  ) {
1790
0
        const auto curveID = op.curveType.Get();
1791
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1792
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1793
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1794
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1795
1796
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1797
1798
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1799
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1800
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1801
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1802
0
    }
1803
118
}
1804
1805
118
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1806
118
    return module->OpBLS_MapToG2(op);
1807
118
}
1808
1809
/* Specialization for operation::BLS_IsG1OnCurve */
1810
99
template<> void ExecutorBase<bool, operation::BLS_IsG1OnCurve>::postprocess(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op, const ExecutorBase<bool, operation::BLS_IsG1OnCurve>::ResultPair& result) const {
1811
99
    (void)module;
1812
99
    (void)op;
1813
99
    (void)result;
1814
99
}
1815
1816
99
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1817
99
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1818
99
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1819
99
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1820
1821
99
    return module->OpBLS_IsG1OnCurve(op);
1822
99
}
1823
1824
/* Specialization for operation::BLS_IsG2OnCurve */
1825
147
template<> void ExecutorBase<bool, operation::BLS_IsG2OnCurve>::postprocess(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op, const ExecutorBase<bool, operation::BLS_IsG2OnCurve>::ResultPair& result) const {
1826
147
    (void)module;
1827
147
    (void)op;
1828
147
    (void)result;
1829
147
}
1830
1831
147
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1832
147
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1833
147
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1834
147
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1835
147
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1836
1837
147
    return module->OpBLS_IsG2OnCurve(op);
1838
147
}
1839
1840
/* Specialization for operation::BLS_GenerateKeyPair */
1841
108
template<> void ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::BLS_GenerateKeyPair& op, const ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::ResultPair& result) const {
1842
108
    (void)module;
1843
1844
108
    if ( result.second != std::nullopt  ) {
1845
0
        const auto curveID = op.curveType.Get();
1846
0
        const auto priv = result.second->priv.ToTrimmedString();
1847
0
        const auto g1_x = result.second->pub.first.ToTrimmedString();
1848
0
        const auto g1_y = result.second->pub.second.ToTrimmedString();
1849
1850
0
        G1AddToPool(curveID, g1_x, g1_y);
1851
1852
0
        if ( priv.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(priv); }
1853
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1854
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1855
0
    }
1856
108
}
1857
1858
108
template<> std::optional<component::BLS_KeyPair> ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::BLS_GenerateKeyPair& op) const {
1859
108
    return module->OpBLS_GenerateKeyPair(op);
1860
108
}
1861
1862
/* Specialization for operation::BLS_Decompress_G1 */
1863
106
template<> void ExecutorBase<component::G1, operation::BLS_Decompress_G1>::postprocess(std::shared_ptr<Module> module, operation::BLS_Decompress_G1& op, const ExecutorBase<component::G1, operation::BLS_Decompress_G1>::ResultPair& result) const {
1864
106
    (void)module;
1865
1866
106
    if ( result.second != std::nullopt  ) {
1867
0
        const auto curveID = op.curveType.Get();
1868
0
        const auto g1_x = result.second->first.ToTrimmedString();
1869
0
        const auto g1_y = result.second->second.ToTrimmedString();
1870
1871
0
        G1AddToPool(curveID, g1_x, g1_y);
1872
1873
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1874
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1875
0
    }
1876
106
}
1877
1878
106
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Decompress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G1& op) const {
1879
106
    return module->OpBLS_Decompress_G1(op);
1880
106
}
1881
1882
/* Specialization for operation::BLS_Compress_G1 */
1883
143
template<> void ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::postprocess(std::shared_ptr<Module> module, operation::BLS_Compress_G1& op, const ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::ResultPair& result) const {
1884
143
    (void)module;
1885
143
    (void)op;
1886
1887
143
    if ( result.second != std::nullopt  ) {
1888
0
        const auto compressed = result.second->ToTrimmedString();
1889
1890
0
        if ( compressed.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(compressed); }
1891
0
    }
1892
143
}
1893
1894
143
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G1& op) const {
1895
143
    return module->OpBLS_Compress_G1(op);
1896
143
}
1897
1898
/* Specialization for operation::BLS_Decompress_G2 */
1899
116
template<> void ExecutorBase<component::G2, operation::BLS_Decompress_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op, const ExecutorBase<component::G2, operation::BLS_Decompress_G2>::ResultPair& result) const {
1900
116
    (void)module;
1901
1902
116
    if ( result.second != std::nullopt  ) {
1903
0
        const auto curveID = op.curveType.Get();
1904
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1905
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1906
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1907
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1908
1909
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1910
1911
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1912
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1913
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1914
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1915
0
    }
1916
116
}
1917
1918
116
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Decompress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op) const {
1919
116
    return module->OpBLS_Decompress_G2(op);
1920
116
}
1921
1922
/* Specialization for operation::BLS_Compress_G2 */
1923
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 {
1924
120
    (void)module;
1925
1926
120
    if ( result.second != std::nullopt  ) {
1927
0
        const auto curveID = op.curveType.Get();
1928
0
        const auto g1_x = result.second->first.ToTrimmedString();
1929
0
        const auto g1_y = result.second->second.ToTrimmedString();
1930
1931
0
        G1AddToPool(curveID, g1_x, g1_y);
1932
1933
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1934
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1935
0
    }
1936
120
}
1937
1938
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 {
1939
120
    return module->OpBLS_Compress_G2(op);
1940
120
}
1941
1942
/* Specialization for operation::BLS_G1_Add */
1943
120
template<> void ExecutorBase<component::G1, operation::BLS_G1_Add>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_Add& op, const ExecutorBase<component::G1, operation::BLS_G1_Add>::ResultPair& result) const {
1944
120
    (void)module;
1945
1946
120
    if ( result.second != std::nullopt  ) {
1947
0
        const auto curveID = op.curveType.Get();
1948
0
        const auto g1_x = result.second->first.ToTrimmedString();
1949
0
        const auto g1_y = result.second->second.ToTrimmedString();
1950
1951
0
        G1AddToPool(curveID, g1_x, g1_y);
1952
1953
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1954
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1955
0
    }
1956
120
}
1957
1958
120
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Add& op) const {
1959
120
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1960
120
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1961
120
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1962
120
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1963
120
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1964
1965
120
    return module->OpBLS_G1_Add(op);
1966
120
}
1967
1968
/* Specialization for operation::BLS_G1_Mul */
1969
131
template<> void ExecutorBase<component::G1, operation::BLS_G1_Mul>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op, const ExecutorBase<component::G1, operation::BLS_G1_Mul>::ResultPair& result) const {
1970
131
    (void)module;
1971
1972
131
    if ( result.second != std::nullopt  ) {
1973
0
        const auto curveID = op.curveType.Get();
1974
0
        const auto g1_x = result.second->first.ToTrimmedString();
1975
0
        const auto g1_y = result.second->second.ToTrimmedString();
1976
1977
0
        G1AddToPool(curveID, g1_x, g1_y);
1978
1979
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1980
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1981
0
    }
1982
131
}
1983
1984
131
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op) const {
1985
131
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1986
131
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1987
131
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1988
131
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1989
1990
131
    return module->OpBLS_G1_Mul(op);
1991
131
}
1992
1993
/* Specialization for operation::BLS_G1_IsEq */
1994
131
template<> void ExecutorBase<bool, operation::BLS_G1_IsEq>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op, const ExecutorBase<bool, operation::BLS_G1_IsEq>::ResultPair& result) const {
1995
131
    (void)module;
1996
131
    (void)op;
1997
131
    (void)result;
1998
131
}
1999
2000
131
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
2001
131
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2002
131
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2003
131
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2004
131
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2005
131
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2006
2007
131
    return module->OpBLS_G1_IsEq(op);
2008
131
}
2009
2010
/* Specialization for operation::BLS_G1_Neg */
2011
119
template<> void ExecutorBase<component::G1, operation::BLS_G1_Neg>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_Neg& op, const ExecutorBase<component::G1, operation::BLS_G1_Neg>::ResultPair& result) const {
2012
119
    (void)module;
2013
2014
119
    if ( result.second != std::nullopt  ) {
2015
0
        const auto curveID = op.curveType.Get();
2016
0
        const auto g1_x = result.second->first.ToTrimmedString();
2017
0
        const auto g1_y = result.second->second.ToTrimmedString();
2018
2019
0
        G1AddToPool(curveID, g1_x, g1_y);
2020
2021
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
2022
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
2023
0
    }
2024
119
}
2025
2026
119
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Neg& op) const {
2027
119
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2028
119
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
119
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
2031
119
    return module->OpBLS_G1_Neg(op);
2032
119
}
2033
2034
/* Specialization for operation::BLS_G2_Add */
2035
101
template<> void ExecutorBase<component::G2, operation::BLS_G2_Add>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_Add& op, const ExecutorBase<component::G2, operation::BLS_G2_Add>::ResultPair& result) const {
2036
101
    (void)module;
2037
2038
101
    if ( result.second != std::nullopt  ) {
2039
0
        const auto curveID = op.curveType.Get();
2040
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2041
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2042
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2043
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2044
2045
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2046
2047
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2048
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2049
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2050
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2051
0
    }
2052
101
}
2053
2054
101
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Add& op) const {
2055
101
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2056
101
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2057
101
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2058
101
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2059
101
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2060
101
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2061
101
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2062
101
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2063
101
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2064
2065
101
    return module->OpBLS_G2_Add(op);
2066
101
}
2067
2068
/* Specialization for operation::BLS_G2_Mul */
2069
97
template<> void ExecutorBase<component::G2, operation::BLS_G2_Mul>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_Mul& op, const ExecutorBase<component::G2, operation::BLS_G2_Mul>::ResultPair& result) const {
2070
97
    (void)module;
2071
2072
97
    if ( result.second != std::nullopt  ) {
2073
0
        const auto curveID = op.curveType.Get();
2074
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2075
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2076
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2077
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2078
2079
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2080
2081
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2082
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2083
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2084
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2085
0
    }
2086
97
}
2087
2088
97
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Mul& op) const {
2089
97
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2090
97
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2091
97
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2092
97
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2093
97
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2094
97
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2095
2096
97
    return module->OpBLS_G2_Mul(op);
2097
97
}
2098
2099
/* Specialization for operation::BLS_G2_IsEq */
2100
140
template<> void ExecutorBase<bool, operation::BLS_G2_IsEq>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op, const ExecutorBase<bool, operation::BLS_G2_IsEq>::ResultPair& result) const {
2101
140
    (void)module;
2102
140
    (void)op;
2103
140
    (void)result;
2104
140
}
2105
2106
140
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2107
140
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2108
140
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2109
140
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2110
140
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2111
140
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2112
140
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2113
140
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2114
140
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2115
140
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2116
2117
140
    return module->OpBLS_G2_IsEq(op);
2118
140
}
2119
2120
/* Specialization for operation::BLS_G2_Neg */
2121
150
template<> void ExecutorBase<component::G2, operation::BLS_G2_Neg>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_Neg& op, const ExecutorBase<component::G2, operation::BLS_G2_Neg>::ResultPair& result) const {
2122
150
    (void)module;
2123
2124
150
    if ( result.second != std::nullopt  ) {
2125
0
        const auto curveID = op.curveType.Get();
2126
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2127
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2128
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2129
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2130
2131
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2132
2133
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2134
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2135
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2136
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2137
0
    }
2138
150
}
2139
2140
150
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Neg& op) const {
2141
150
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2142
150
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2143
150
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2144
150
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2145
150
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2146
2147
150
    return module->OpBLS_G2_Neg(op);
2148
150
}
2149
2150
/* Specialization for operation::BLS_G1_MultiExp */
2151
161
template<> void ExecutorBase<component::G1, operation::BLS_G1_MultiExp>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_MultiExp& op, const ExecutorBase<component::G1, operation::BLS_G1_MultiExp>::ResultPair& result) const {
2152
161
    (void)module;
2153
2154
161
    if ( result.second != std::nullopt  ) {
2155
0
        const auto curveID = op.curveType.Get();
2156
0
        const auto g1_x = result.second->first.ToTrimmedString();
2157
0
        const auto g1_y = result.second->second.ToTrimmedString();
2158
2159
0
        G1AddToPool(curveID, g1_x, g1_y);
2160
2161
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
2162
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
2163
0
    }
2164
161
}
2165
2166
161
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_MultiExp>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_MultiExp& op) const {
2167
161
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2168
2169
3.04k
    for (const auto& point_scalar : op.points_scalars.points_scalars) {
2170
3.04k
        if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2171
3.04k
        if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2172
3.04k
        if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2173
3.04k
    }
2174
2175
161
    return module->OpBLS_G1_MultiExp(op);
2176
161
}
2177
2178
/* Specialization for operation::Misc */
2179
103
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2180
103
    (void)module;
2181
103
    (void)op;
2182
103
    (void)result;
2183
103
}
2184
2185
103
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2186
103
    return module->OpMisc(op);
2187
103
}
2188
2189
/* Specialization for operation::BLS_HashToG2 */
2190
120
template<> void ExecutorBase<component::G2, operation::BLS_HashToG2>::postprocess(std::shared_ptr<Module> module, operation::BLS_HashToG2& op, const ExecutorBase<component::G2, operation::BLS_HashToG2>::ResultPair& result) const {
2191
120
    (void)module;
2192
2193
120
    if ( result.second != std::nullopt  ) {
2194
0
        const auto curveID = op.curveType.Get();
2195
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2196
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2197
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2198
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2199
2200
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2201
2202
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2203
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2204
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2205
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2206
0
    }
2207
120
}
2208
2209
120
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2210
120
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2211
120
    return module->OpBLS_HashToG2(op);
2212
120
}
2213
2214
ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2215
    ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options)
2216
23
{ }
2217
22
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2218
22
    this->modulo = component::Bignum(modulo);
2219
22
}
2220
2221
ExecutorBignumCalc_Mod_BLS12_381_R::ExecutorBignumCalc_Mod_BLS12_381_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2222
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2223
1
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2224
1
}
2225
2226
ExecutorBignumCalc_Mod_BLS12_381_P::ExecutorBignumCalc_Mod_BLS12_381_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2227
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2228
1
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2229
1
}
2230
2231
ExecutorBignumCalc_Mod_BLS12_377_R::ExecutorBignumCalc_Mod_BLS12_377_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2232
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2233
1
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2234
1
}
2235
2236
ExecutorBignumCalc_Mod_BLS12_377_P::ExecutorBignumCalc_Mod_BLS12_377_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2237
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2238
1
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2239
1
}
2240
2241
ExecutorBignumCalc_Mod_BN128_R::ExecutorBignumCalc_Mod_BN128_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2242
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2243
1
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2244
1
}
2245
2246
ExecutorBignumCalc_Mod_BN128_P::ExecutorBignumCalc_Mod_BN128_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2247
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2248
1
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2249
1
}
2250
2251
ExecutorBignumCalc_Mod_Vesta_R::ExecutorBignumCalc_Mod_Vesta_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2252
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2253
1
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337"));
2254
1
}
2255
2256
ExecutorBignumCalc_Mod_Vesta_P::ExecutorBignumCalc_Mod_Vesta_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2257
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2258
1
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097"));
2259
1
}
2260
2261
ExecutorBignumCalc_Mod_ED25519::ExecutorBignumCalc_Mod_ED25519(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2262
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2263
1
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2264
1
}
2265
2266
ExecutorBignumCalc_Mod_Edwards_R::ExecutorBignumCalc_Mod_Edwards_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2267
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2268
1
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2269
1
}
2270
2271
ExecutorBignumCalc_Mod_Edwards_P::ExecutorBignumCalc_Mod_Edwards_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2272
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2273
1
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2274
1
}
2275
2276
ExecutorBignumCalc_Mod_Goldilocks::ExecutorBignumCalc_Mod_Goldilocks(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2277
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2278
1
    CF_NORET(SetModulo("18446744069414584321"));
2279
1
}
2280
2281
ExecutorBignumCalc_Mod_MNT4_R::ExecutorBignumCalc_Mod_MNT4_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2282
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2283
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2284
1
}
2285
2286
ExecutorBignumCalc_Mod_MNT4_P::ExecutorBignumCalc_Mod_MNT4_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2287
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2288
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2289
1
}
2290
2291
ExecutorBignumCalc_Mod_MNT6_R::ExecutorBignumCalc_Mod_MNT6_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2292
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2293
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2294
1
}
2295
2296
ExecutorBignumCalc_Mod_MNT6_P::ExecutorBignumCalc_Mod_MNT6_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2297
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2298
1
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2299
1
}
2300
2301
ExecutorBignumCalc_Mod_2Exp64::ExecutorBignumCalc_Mod_2Exp64(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2302
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2303
1
    CF_NORET(SetModulo("18446744073709551616"));
2304
1
}
2305
2306
ExecutorBignumCalc_Mod_2Exp128::ExecutorBignumCalc_Mod_2Exp128(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2307
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2308
1
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2309
1
}
2310
2311
ExecutorBignumCalc_Mod_2Exp256::ExecutorBignumCalc_Mod_2Exp256(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2312
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2313
1
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2314
1
}
2315
2316
ExecutorBignumCalc_Mod_2Exp512::ExecutorBignumCalc_Mod_2Exp512(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2317
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2318
1
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2319
1
}
2320
2321
ExecutorBignumCalc_Mod_SECP256K1::ExecutorBignumCalc_Mod_SECP256K1(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2322
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2323
1
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2324
1
}
2325
2326
ExecutorBignumCalc_Mod_SECP256K1_P::ExecutorBignumCalc_Mod_SECP256K1_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2327
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2328
1
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2329
1
}
2330
2331
ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2332
    ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options)
2333
1
{ }
2334
0
void ExecutorBignumCalc_Fp2::SetModulo(const std::string& modulo) {
2335
0
    this->modulo = component::Bignum(modulo);
2336
0
}
2337
2338
ExecutorBignumCalc_Fp12::ExecutorBignumCalc_Fp12(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2339
    ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options)
2340
1
{ }
2341
0
void ExecutorBignumCalc_Fp12::SetModulo(const std::string& modulo) {
2342
0
    this->modulo = component::Bignum(modulo);
2343
0
}
2344
2345
template <class ResultType, class OperationType>
2346
ExecutorBase<ResultType, OperationType>::ExecutorBase(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2347
    operationID(operationID),
2348
    modules(modules),
2349
    options(options)
2350
107
{
2351
107
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
23
{
2351
23
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
2352
2353
/* Specialization for operation::SR25519_Verify */
2354
141
template<> void ExecutorBase<bool, operation::SR25519_Verify>::postprocess(std::shared_ptr<Module> module, operation::SR25519_Verify& op, const ExecutorBase<bool, operation::SR25519_Verify>::ResultPair& result) const {
2355
141
    (void)module;
2356
141
    (void)op;
2357
141
    (void)result;
2358
141
}
2359
2360
141
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2361
141
    return module->OpSR25519_Verify(op);
2362
141
}
2363
2364
template <class ResultType, class OperationType>
2365
107
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
107
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2365
23
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
23
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
2367
2368
/* Filter away the values in the set that are std::nullopt */
2369
template <class ResultType, class OperationType>
2370
17.3k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
17.3k
    ResultSet ret;
2372
2373
71.0k
    for (const auto& result : results) {
2374
71.0k
        if ( result.second == std::nullopt ) {
2375
41.5k
            continue;
2376
41.5k
        }
2377
2378
29.4k
        ret.push_back(result);
2379
29.4k
    }
2380
2381
17.3k
    return ret;
2382
17.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
521
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
521
    ResultSet ret;
2372
2373
2.14k
    for (const auto& result : results) {
2374
2.14k
        if ( result.second == std::nullopt ) {
2375
1.02k
            continue;
2376
1.02k
        }
2377
2378
1.12k
        ret.push_back(result);
2379
1.12k
    }
2380
2381
521
    return ret;
2382
521
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
444
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
444
    ResultSet ret;
2372
2373
2.08k
    for (const auto& result : results) {
2374
2.08k
        if ( result.second == std::nullopt ) {
2375
849
            continue;
2376
849
        }
2377
2378
1.23k
        ret.push_back(result);
2379
1.23k
    }
2380
2381
444
    return ret;
2382
444
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
32
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
32
    ResultSet ret;
2372
2373
238
    for (const auto& result : results) {
2374
238
        if ( result.second == std::nullopt ) {
2375
238
            continue;
2376
238
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
32
    return ret;
2382
32
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
1.03k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.03k
    ResultSet ret;
2372
2373
4.92k
    for (const auto& result : results) {
2374
4.92k
        if ( result.second == std::nullopt ) {
2375
4.05k
            continue;
2376
4.05k
        }
2377
2378
864
        ret.push_back(result);
2379
864
    }
2380
2381
1.03k
    return ret;
2382
1.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> > > > const&) const
Line
Count
Source
2370
749
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
749
    ResultSet ret;
2372
2373
3.81k
    for (const auto& result : results) {
2374
3.81k
        if ( result.second == std::nullopt ) {
2375
2.85k
            continue;
2376
2.85k
        }
2377
2378
962
        ret.push_back(result);
2379
962
    }
2380
2381
749
    return ret;
2382
749
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
598
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
598
    ResultSet ret;
2372
2373
2.95k
    for (const auto& result : results) {
2374
2.95k
        if ( result.second == std::nullopt ) {
2375
2.62k
            continue;
2376
2.62k
        }
2377
2378
333
        ret.push_back(result);
2379
333
    }
2380
2381
598
    return ret;
2382
598
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
95
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
95
    ResultSet ret;
2372
2373
533
    for (const auto& result : results) {
2374
533
        if ( result.second == std::nullopt ) {
2375
407
            continue;
2376
407
        }
2377
2378
126
        ret.push_back(result);
2379
126
    }
2380
2381
95
    return ret;
2382
95
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
214
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
214
    ResultSet ret;
2372
2373
895
    for (const auto& result : results) {
2374
895
        if ( result.second == std::nullopt ) {
2375
628
            continue;
2376
628
        }
2377
2378
267
        ret.push_back(result);
2379
267
    }
2380
2381
214
    return ret;
2382
214
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
49
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
49
    ResultSet ret;
2372
2373
311
    for (const auto& result : results) {
2374
311
        if ( result.second == std::nullopt ) {
2375
311
            continue;
2376
311
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
49
    return ret;
2382
49
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
35
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
35
    ResultSet ret;
2372
2373
235
    for (const auto& result : results) {
2374
235
        if ( result.second == std::nullopt ) {
2375
235
            continue;
2376
235
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
35
    return ret;
2382
35
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
38
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
38
    ResultSet ret;
2372
2373
273
    for (const auto& result : results) {
2374
273
        if ( result.second == std::nullopt ) {
2375
273
            continue;
2376
273
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
38
    return ret;
2382
38
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
265
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
265
    ResultSet ret;
2372
2373
1.02k
    for (const auto& result : results) {
2374
1.02k
        if ( result.second == std::nullopt ) {
2375
694
            continue;
2376
694
        }
2377
2378
330
        ret.push_back(result);
2379
330
    }
2380
2381
265
    return ret;
2382
265
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
204
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
204
    ResultSet ret;
2372
2373
717
    for (const auto& result : results) {
2374
717
        if ( result.second == std::nullopt ) {
2375
473
            continue;
2376
473
        }
2377
2378
244
        ret.push_back(result);
2379
244
    }
2380
2381
204
    return ret;
2382
204
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
27
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
27
    ResultSet ret;
2372
2373
154
    for (const auto& result : results) {
2374
154
        if ( result.second == std::nullopt ) {
2375
154
            continue;
2376
154
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
27
    return ret;
2382
27
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
27
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
27
    ResultSet ret;
2372
2373
206
    for (const auto& result : results) {
2374
206
        if ( result.second == std::nullopt ) {
2375
206
            continue;
2376
206
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
27
    return ret;
2382
27
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
10
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
10
    ResultSet ret;
2372
2373
34
    for (const auto& result : results) {
2374
34
        if ( result.second == std::nullopt ) {
2375
34
            continue;
2376
34
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
10
    return ret;
2382
10
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
224
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
224
    ResultSet ret;
2372
2373
818
    for (const auto& result : results) {
2374
818
        if ( result.second == std::nullopt ) {
2375
594
            continue;
2376
594
        }
2377
2378
224
        ret.push_back(result);
2379
224
    }
2380
2381
224
    return ret;
2382
224
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&) const
Line
Count
Source
2370
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
170
    for (const auto& result : results) {
2374
170
        if ( result.second == std::nullopt ) {
2375
170
            continue;
2376
170
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&) const
Line
Count
Source
2370
22
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
22
    ResultSet ret;
2372
2373
128
    for (const auto& result : results) {
2374
128
        if ( result.second == std::nullopt ) {
2375
128
            continue;
2376
128
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
22
    return ret;
2382
22
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
147
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
147
    ResultSet ret;
2372
2373
558
    for (const auto& result : results) {
2374
558
        if ( result.second == std::nullopt ) {
2375
388
            continue;
2376
388
        }
2377
2378
170
        ret.push_back(result);
2379
170
    }
2380
2381
147
    return ret;
2382
147
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
90
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
90
    ResultSet ret;
2372
2373
323
    for (const auto& result : results) {
2374
323
        if ( result.second == std::nullopt ) {
2375
297
            continue;
2376
297
        }
2377
2378
26
        ret.push_back(result);
2379
26
    }
2380
2381
90
    return ret;
2382
90
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECC_KeyPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECC_KeyPair> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> > > > const&) const
Line
Count
Source
2370
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
24
    ResultSet ret;
2372
2373
114
    for (const auto& result : results) {
2374
114
        if ( result.second == std::nullopt ) {
2375
114
            continue;
2376
114
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
24
    return ret;
2382
24
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2370
580
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
580
    ResultSet ret;
2372
2373
2.64k
    for (const auto& result : results) {
2374
2.64k
        if ( result.second == std::nullopt ) {
2375
1.32k
            continue;
2376
1.32k
        }
2377
2378
1.32k
        ret.push_back(result);
2379
1.32k
    }
2380
2381
580
    return ret;
2382
580
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2370
63
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
63
    ResultSet ret;
2372
2373
277
    for (const auto& result : results) {
2374
277
        if ( result.second == std::nullopt ) {
2375
196
            continue;
2376
196
        }
2377
2378
81
        ret.push_back(result);
2379
81
    }
2380
2381
63
    return ret;
2382
63
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2370
25
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
25
    ResultSet ret;
2372
2373
112
    for (const auto& result : results) {
2374
112
        if ( result.second == std::nullopt ) {
2375
112
            continue;
2376
112
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
25
    return ret;
2382
25
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2370
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
24
    ResultSet ret;
2372
2373
103
    for (const auto& result : results) {
2374
103
        if ( result.second == std::nullopt ) {
2375
103
            continue;
2376
103
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
24
    return ret;
2382
24
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
21
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
21
    ResultSet ret;
2372
2373
89
    for (const auto& result : results) {
2374
89
        if ( result.second == std::nullopt ) {
2375
89
            continue;
2376
89
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
21
    return ret;
2382
21
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
178
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
178
    ResultSet ret;
2372
2373
643
    for (const auto& result : results) {
2374
643
        if ( result.second == std::nullopt ) {
2375
448
            continue;
2376
448
        }
2377
2378
195
        ret.push_back(result);
2379
195
    }
2380
2381
178
    return ret;
2382
178
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
110
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
110
    ResultSet ret;
2372
2373
416
    for (const auto& result : results) {
2374
416
        if ( result.second == std::nullopt ) {
2375
286
            continue;
2376
286
        }
2377
2378
130
        ret.push_back(result);
2379
130
    }
2380
2381
110
    return ret;
2382
110
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
25
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
25
    ResultSet ret;
2372
2373
104
    for (const auto& result : results) {
2374
104
        if ( result.second == std::nullopt ) {
2375
104
            continue;
2376
104
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
25
    return ret;
2382
25
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
23
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
23
    ResultSet ret;
2372
2373
103
    for (const auto& result : results) {
2374
103
        if ( result.second == std::nullopt ) {
2375
103
            continue;
2376
103
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
23
    return ret;
2382
23
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
447
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
447
    ResultSet ret;
2372
2373
1.63k
    for (const auto& result : results) {
2374
1.63k
        if ( result.second == std::nullopt ) {
2375
1.13k
            continue;
2376
1.13k
        }
2377
2378
503
        ret.push_back(result);
2379
503
    }
2380
2381
447
    return ret;
2382
447
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
186
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
186
    ResultSet ret;
2372
2373
690
    for (const auto& result : results) {
2374
690
        if ( result.second == std::nullopt ) {
2375
646
            continue;
2376
646
        }
2377
2378
44
        ret.push_back(result);
2379
44
    }
2380
2381
186
    return ret;
2382
186
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Signature> > > > const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Parameters> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Parameters> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const
Line
Count
Source
2370
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
66
    for (const auto& result : results) {
2374
66
        if ( result.second == std::nullopt ) {
2375
66
            continue;
2376
66
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
34
    ResultSet ret;
2372
2373
158
    for (const auto& result : results) {
2374
158
        if ( result.second == std::nullopt ) {
2375
154
            continue;
2376
154
        }
2377
2378
4
        ret.push_back(result);
2379
4
    }
2380
2381
34
    return ret;
2382
34
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
18
    ResultSet ret;
2372
2373
83
    for (const auto& result : results) {
2374
83
        if ( result.second == std::nullopt ) {
2375
83
            continue;
2376
83
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
18
    return ret;
2382
18
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
78
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
78
    ResultSet ret;
2372
2373
318
    for (const auto& result : results) {
2374
318
        if ( result.second == std::nullopt ) {
2375
300
            continue;
2376
300
        }
2377
2378
18
        ret.push_back(result);
2379
18
    }
2380
2381
78
    return ret;
2382
78
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
48
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
48
    ResultSet ret;
2372
2373
201
    for (const auto& result : results) {
2374
201
        if ( result.second == std::nullopt ) {
2375
196
            continue;
2376
196
        }
2377
2378
5
        ret.push_back(result);
2379
5
    }
2380
2381
48
    return ret;
2382
48
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
140
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
140
    ResultSet ret;
2372
2373
512
    for (const auto& result : results) {
2374
512
        if ( result.second == std::nullopt ) {
2375
400
            continue;
2376
400
        }
2377
2378
112
        ret.push_back(result);
2379
112
    }
2380
2381
140
    return ret;
2382
140
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
102
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
102
    ResultSet ret;
2372
2373
378
    for (const auto& result : results) {
2374
378
        if ( result.second == std::nullopt ) {
2375
359
            continue;
2376
359
        }
2377
2378
19
        ret.push_back(result);
2379
19
    }
2380
2381
102
    return ret;
2382
102
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
186
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
186
    ResultSet ret;
2372
2373
661
    for (const auto& result : results) {
2374
661
        if ( result.second == std::nullopt ) {
2375
615
            continue;
2376
615
        }
2377
2378
46
        ret.push_back(result);
2379
46
    }
2380
2381
186
    return ret;
2382
186
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
87
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
87
    ResultSet ret;
2372
2373
342
    for (const auto& result : results) {
2374
342
        if ( result.second == std::nullopt ) {
2375
317
            continue;
2376
317
        }
2377
2378
25
        ret.push_back(result);
2379
25
    }
2380
2381
87
    return ret;
2382
87
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const
Line
Count
Source
2370
128
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
128
    ResultSet ret;
2372
2373
475
    for (const auto& result : results) {
2374
475
        if ( result.second == std::nullopt ) {
2375
435
            continue;
2376
435
        }
2377
2378
40
        ret.push_back(result);
2379
40
    }
2380
2381
128
    return ret;
2382
128
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const
Line
Count
Source
2370
9.02k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
9.02k
    ResultSet ret;
2372
2373
34.1k
    for (const auto& result : results) {
2374
34.1k
        if ( result.second == std::nullopt ) {
2375
13.1k
            continue;
2376
13.1k
        }
2377
2378
21.0k
        ret.push_back(result);
2379
21.0k
    }
2380
2381
9.02k
    return ret;
2382
9.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
28
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
28
    ResultSet ret;
2372
2373
109
    for (const auto& result : results) {
2374
109
        if ( result.second == std::nullopt ) {
2375
109
            continue;
2376
109
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
28
    return ret;
2382
28
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
61
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
61
    ResultSet ret;
2372
2373
240
    for (const auto& result : results) {
2374
240
        if ( result.second == std::nullopt ) {
2375
240
            continue;
2376
240
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
61
    return ret;
2382
61
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
34
    ResultSet ret;
2372
2373
146
    for (const auto& result : results) {
2374
146
        if ( result.second == std::nullopt ) {
2375
146
            continue;
2376
146
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
34
    return ret;
2382
34
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
32
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
32
    ResultSet ret;
2372
2373
135
    for (const auto& result : results) {
2374
135
        if ( result.second == std::nullopt ) {
2375
135
            continue;
2376
135
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
32
    return ret;
2382
32
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> > > > const&) const
Line
Count
Source
2370
25
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
25
    ResultSet ret;
2372
2373
105
    for (const auto& result : results) {
2374
105
        if ( result.second == std::nullopt ) {
2375
105
            continue;
2376
105
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
25
    return ret;
2382
25
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
63
    for (const auto& result : results) {
2374
63
        if ( result.second == std::nullopt ) {
2375
63
            continue;
2376
63
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> > > > const&) const
Line
Count
Source
2370
25
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
25
    ResultSet ret;
2372
2373
108
    for (const auto& result : results) {
2374
108
        if ( result.second == std::nullopt ) {
2375
108
            continue;
2376
108
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
25
    return ret;
2382
25
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
27
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
27
    ResultSet ret;
2372
2373
117
    for (const auto& result : results) {
2374
117
        if ( result.second == std::nullopt ) {
2375
117
            continue;
2376
117
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
27
    return ret;
2382
27
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
17
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
17
    ResultSet ret;
2372
2373
82
    for (const auto& result : results) {
2374
82
        if ( result.second == std::nullopt ) {
2375
82
            continue;
2376
82
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
17
    return ret;
2382
17
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
21
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
21
    ResultSet ret;
2372
2373
100
    for (const auto& result : results) {
2374
100
        if ( result.second == std::nullopt ) {
2375
100
            continue;
2376
100
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
21
    return ret;
2382
21
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
21
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
21
    ResultSet ret;
2372
2373
93
    for (const auto& result : results) {
2374
93
        if ( result.second == std::nullopt ) {
2375
93
            continue;
2376
93
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
21
    return ret;
2382
21
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
18
    ResultSet ret;
2372
2373
86
    for (const auto& result : results) {
2374
86
        if ( result.second == std::nullopt ) {
2375
86
            continue;
2376
86
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
18
    return ret;
2382
18
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
24
    ResultSet ret;
2372
2373
114
    for (const auto& result : results) {
2374
114
        if ( result.second == std::nullopt ) {
2375
114
            continue;
2376
114
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
24
    return ret;
2382
24
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
120
    for (const auto& result : results) {
2374
120
        if ( result.second == std::nullopt ) {
2375
120
            continue;
2376
120
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
120
    for (const auto& result : results) {
2374
120
        if ( result.second == std::nullopt ) {
2375
120
            continue;
2376
120
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
24
    ResultSet ret;
2372
2373
110
    for (const auto& result : results) {
2374
110
        if ( result.second == std::nullopt ) {
2375
110
            continue;
2376
110
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
24
    return ret;
2382
24
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
27
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
27
    ResultSet ret;
2372
2373
118
    for (const auto& result : results) {
2374
118
        if ( result.second == std::nullopt ) {
2375
118
            continue;
2376
118
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
27
    return ret;
2382
27
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
22
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
22
    ResultSet ret;
2372
2373
99
    for (const auto& result : results) {
2374
99
        if ( result.second == std::nullopt ) {
2375
99
            continue;
2376
99
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
22
    return ret;
2382
22
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
37
    ResultSet ret;
2372
2373
147
    for (const auto& result : results) {
2374
147
        if ( result.second == std::nullopt ) {
2375
147
            continue;
2376
147
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
37
    return ret;
2382
37
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> > > > const&) const
Line
Count
Source
2370
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
24
    ResultSet ret;
2372
2373
108
    for (const auto& result : results) {
2374
108
        if ( result.second == std::nullopt ) {
2375
108
            continue;
2376
108
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
24
    return ret;
2382
24
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
23
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
23
    ResultSet ret;
2372
2373
106
    for (const auto& result : results) {
2374
106
        if ( result.second == std::nullopt ) {
2375
106
            continue;
2376
106
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
23
    return ret;
2382
23
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const
Line
Count
Source
2370
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
33
    ResultSet ret;
2372
2373
143
    for (const auto& result : results) {
2374
143
        if ( result.second == std::nullopt ) {
2375
143
            continue;
2376
143
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
33
    return ret;
2382
33
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
116
    for (const auto& result : results) {
2374
116
        if ( result.second == std::nullopt ) {
2375
116
            continue;
2376
116
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
120
    for (const auto& result : results) {
2374
120
        if ( result.second == std::nullopt ) {
2375
120
            continue;
2376
120
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
29
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
29
    ResultSet ret;
2372
2373
120
    for (const auto& result : results) {
2374
120
        if ( result.second == std::nullopt ) {
2375
120
            continue;
2376
120
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
29
    return ret;
2382
29
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
32
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
32
    ResultSet ret;
2372
2373
131
    for (const auto& result : results) {
2374
131
        if ( result.second == std::nullopt ) {
2375
131
            continue;
2376
131
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
32
    return ret;
2382
32
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
32
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
32
    ResultSet ret;
2372
2373
131
    for (const auto& result : results) {
2374
131
        if ( result.second == std::nullopt ) {
2375
131
            continue;
2376
131
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
32
    return ret;
2382
32
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
28
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
28
    ResultSet ret;
2372
2373
119
    for (const auto& result : results) {
2374
119
        if ( result.second == std::nullopt ) {
2375
119
            continue;
2376
119
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
28
    return ret;
2382
28
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
24
    ResultSet ret;
2372
2373
101
    for (const auto& result : results) {
2374
101
        if ( result.second == std::nullopt ) {
2375
101
            continue;
2376
101
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
24
    return ret;
2382
24
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
24
    ResultSet ret;
2372
2373
97
    for (const auto& result : results) {
2374
97
        if ( result.second == std::nullopt ) {
2375
97
            continue;
2376
97
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
24
    return ret;
2382
24
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
36
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
36
    ResultSet ret;
2372
2373
140
    for (const auto& result : results) {
2374
140
        if ( result.second == std::nullopt ) {
2375
140
            continue;
2376
140
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
36
    return ret;
2382
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
35
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
35
    ResultSet ret;
2372
2373
150
    for (const auto& result : results) {
2374
150
        if ( result.second == std::nullopt ) {
2375
150
            continue;
2376
150
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
35
    return ret;
2382
35
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
39
    ResultSet ret;
2372
2373
161
    for (const auto& result : results) {
2374
161
        if ( result.second == std::nullopt ) {
2375
161
            continue;
2376
161
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
39
    return ret;
2382
39
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
24
    ResultSet ret;
2372
2373
103
    for (const auto& result : results) {
2374
103
        if ( result.second == std::nullopt ) {
2375
103
            continue;
2376
103
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
24
    return ret;
2382
24
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
30
    ResultSet ret;
2372
2373
141
    for (const auto& result : results) {
2374
141
        if ( result.second == std::nullopt ) {
2375
141
            continue;
2376
141
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
30
    return ret;
2382
30
}
2383
2384
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2385
template <>
2386
250
void ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::ECC_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2387
250
    (void)operations;
2388
250
    (void)results;
2389
250
    (void)data;
2390
250
    (void)size;
2391
250
}
2392
2393
template <class ResultType, class OperationType>
2394
706
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
706
    (void)operation;
2396
2397
706
    return false;
2398
706
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2394
281
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
281
    (void)operation;
2396
2397
281
    return false;
2398
281
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const
Line
Count
Source
2394
16
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
16
    (void)operation;
2396
2397
16
    return false;
2398
16
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
Line
Count
Source
2394
36
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
36
    (void)operation;
2396
2397
36
    return false;
2398
36
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::dontCompare(cryptofuzz::operation::KDF_TLS1_PRF const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::dontCompare(cryptofuzz::operation::KDF_PBKDF const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::dontCompare(cryptofuzz::operation::KDF_PBKDF1 const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::dontCompare(cryptofuzz::operation::KDF_PBKDF2 const&) const
Line
Count
Source
2394
27
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
27
    (void)operation;
2396
2397
27
    return false;
2398
27
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const
Line
Count
Source
2394
43
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
43
    (void)operation;
2396
2397
43
    return false;
2398
43
}
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
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::dontCompare(cryptofuzz::operation::KDF_BCRYPT const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
Line
Count
Source
2394
17
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
17
    (void)operation;
2396
2397
17
    return false;
2398
17
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::dontCompare(cryptofuzz::operation::KDF_SRTP const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::dontCompare(cryptofuzz::operation::KDF_SRTCP const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::dontCompare(cryptofuzz::operation::ECC_PrivateToPublic const&) const
Line
Count
Source
2394
44
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
44
    (void)operation;
2396
2397
44
    return false;
2398
44
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2394
9
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
9
    (void)operation;
2396
2397
9
    return false;
2398
9
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::dontCompare(cryptofuzz::operation::ECC_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::dontCompare(cryptofuzz::operation::Schnorr_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::dontCompare(cryptofuzz::operation::ECCSI_Verify const&) const
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::dontCompare(cryptofuzz::operation::ECDSA_Verify const&) const
Line
Count
Source
2394
41
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
41
    (void)operation;
2396
2397
41
    return false;
2398
41
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const
Line
Count
Source
2394
22
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
22
    (void)operation;
2396
2397
22
    return false;
2398
22
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::dontCompare(cryptofuzz::operation::ECRDSA_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::dontCompare(cryptofuzz::operation::Schnorr_Verify const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::dontCompare(cryptofuzz::operation::ECDSA_Recover const&) const
Line
Count
Source
2394
85
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
85
    (void)operation;
2396
2397
85
    return false;
2398
85
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const
Line
Count
Source
2394
12
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
12
    (void)operation;
2396
2397
12
    return false;
2398
12
}
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
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::dontCompare(cryptofuzz::operation::ECDH_Derive const&) const
Line
Count
Source
2394
1
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
1
    (void)operation;
2396
2397
1
    return false;
2398
1
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::dontCompare(cryptofuzz::operation::ECIES_Encrypt const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::dontCompare(cryptofuzz::operation::ECIES_Decrypt const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::dontCompare(cryptofuzz::operation::ECC_Point_Add const&) const
Line
Count
Source
2394
5
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
5
    (void)operation;
2396
2397
5
    return false;
2398
5
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::dontCompare(cryptofuzz::operation::ECC_Point_Sub const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const
Line
Count
Source
2394
29
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
29
    (void)operation;
2396
2397
29
    return false;
2398
29
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2394
6
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
6
    (void)operation;
2396
2397
6
    return false;
2398
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
Line
Count
Source
2394
15
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
15
    (void)operation;
2396
2397
15
    return false;
2398
15
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2394
6
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
6
    (void)operation;
2396
2397
6
    return false;
2398
6
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DH_GenerateKeyPair const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::dontCompare(cryptofuzz::operation::DH_Derive const&) const
Line
Count
Source
2394
11
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
11
    (void)operation;
2396
2397
11
    return false;
2398
11
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::dontCompare(cryptofuzz::operation::BignumCalc_Fp2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::dontCompare(cryptofuzz::operation::BignumCalc_Fp12 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::dontCompare(cryptofuzz::operation::BLS_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::dontCompare(cryptofuzz::operation::BLS_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::dontCompare(cryptofuzz::operation::BLS_BatchSign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::dontCompare(cryptofuzz::operation::BLS_BatchVerify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::dontCompare(cryptofuzz::operation::BLS_Pairing const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::dontCompare(cryptofuzz::operation::BLS_MillerLoop const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::dontCompare(cryptofuzz::operation::BLS_FinalExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::dontCompare(cryptofuzz::operation::BLS_HashToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::dontCompare(cryptofuzz::operation::BLS_HashToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::dontCompare(cryptofuzz::operation::BLS_MapToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::dontCompare(cryptofuzz::operation::BLS_MapToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG1OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG2OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::dontCompare(cryptofuzz::operation::BLS_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::dontCompare(cryptofuzz::operation::BLS_Decompress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::dontCompare(cryptofuzz::operation::BLS_Compress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::dontCompare(cryptofuzz::operation::BLS_Decompress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::dontCompare(cryptofuzz::operation::BLS_Compress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::dontCompare(cryptofuzz::operation::BLS_G1_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::dontCompare(cryptofuzz::operation::BLS_G1_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::dontCompare(cryptofuzz::operation::BLS_G1_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::dontCompare(cryptofuzz::operation::BLS_G1_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::dontCompare(cryptofuzz::operation::BLS_G2_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::dontCompare(cryptofuzz::operation::BLS_G2_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::dontCompare(cryptofuzz::operation::BLS_G2_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::dontCompare(cryptofuzz::operation::BLS_G2_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::dontCompare(cryptofuzz::operation::BLS_G1_MultiExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::dontCompare(cryptofuzz::operation::Misc const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::dontCompare(cryptofuzz::operation::SR25519_Verify const&) const
2399
2400
template <>
2401
5.70k
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2402
5.70k
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2403
5.67k
    if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; }
2404
5.67k
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2405
5.02k
    if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; }
2406
2407
5.02k
    return false;
2408
5.02k
}
2409
2410
template <>
2411
0
bool ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::dontCompare(const operation::ECCSI_Sign& operation) const {
2412
0
    (void)operation;
2413
0
    return true;
2414
0
}
2415
2416
template <>
2417
343
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2418
343
    if (
2419
343
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2420
343
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2421
282
        if ( operation.UseRandomNonce() ) {
2422
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2423
114
            return true;
2424
114
        }
2425
282
    }
2426
2427
229
    return false;
2428
343
}
2429
2430
template <>
2431
17
bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const {
2432
17
    if (
2433
17
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2434
17
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2435
17
        if ( operation.UseRandomNonce() ) {
2436
            /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */
2437
17
            return true;
2438
17
        }
2439
17
    }
2440
2441
0
    return false;
2442
17
}
2443
2444
template <>
2445
0
bool ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::dontCompare(const operation::ECRDSA_Sign& operation) const {
2446
0
    if (
2447
0
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2448
0
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2449
0
        if ( operation.UseRandomNonce() ) {
2450
            /* Don't compare ECRDSA signatures comptued from a randomly generated nonce */
2451
0
            return true;
2452
0
        }
2453
0
    }
2454
2455
0
    return false;
2456
0
}
2457
2458
/* OpenSSL DES_EDE3_WRAP randomizes the IV, result is different each time */
2459
template <>
2460
182
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2461
182
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2462
2463
182
    return false;
2464
182
}
2465
2466
template <>
2467
53
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2468
53
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2469
2470
53
    return false;
2471
53
}
2472
2473
template <>
2474
156
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2475
156
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2476
2477
156
    return false;
2478
156
}
2479
2480
template <>
2481
277
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2482
277
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2483
2484
276
    return false;
2485
277
}
2486
2487
template <class ResultType, class OperationType>
2488
17.3k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
17.3k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
17.3k
    const auto filtered = filter(results);
2495
2496
17.3k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
9.95k
        return;
2499
9.95k
    }
2500
2501
7.43k
    if ( dontCompare(operations[0].second) == true ) {
2502
816
        return;
2503
816
    }
2504
2505
22.3k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
15.7k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
15.7k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
15.7k
        const bool equal = *prev == *cur;
2510
2511
15.7k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
15.7k
    }
2528
6.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Digest>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Digest> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
521
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
521
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
521
    const auto filtered = filter(results);
2495
2496
521
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
240
        return;
2499
240
    }
2500
2501
281
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
945
    for (size_t i = 1; i < filtered.size(); i++) {
2506
664
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
664
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
664
        const bool equal = *prev == *cur;
2510
2511
664
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
664
    }
2528
281
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::HMAC>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::HMAC> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
444
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
444
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
444
    const auto filtered = filter(results);
2495
2496
444
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
167
        return;
2499
167
    }
2500
2501
277
    if ( dontCompare(operations[0].second) == true ) {
2502
1
        return;
2503
1
    }
2504
2505
1.11k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
836
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
836
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
836
        const bool equal = *prev == *cur;
2510
2511
836
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
836
    }
2528
276
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::UMAC>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::UMAC> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
32
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
32
    const auto filtered = filter(results);
2495
2496
32
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
32
        return;
2499
32
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::CMAC>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::CMAC> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1.03k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1.03k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1.03k
    const auto filtered = filter(results);
2495
2496
1.03k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
875
        return;
2499
875
    }
2500
2501
156
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
756
    for (size_t i = 1; i < filtered.size(); i++) {
2506
600
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
600
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
600
        const bool equal = *prev == *cur;
2510
2511
600
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
600
    }
2528
156
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricEncrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricEncrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
749
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
749
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
749
    const auto filtered = filter(results);
2495
2496
749
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
567
        return;
2499
567
    }
2500
2501
182
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
829
    for (size_t i = 1; i < filtered.size(); i++) {
2506
647
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
647
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
647
        const bool equal = *prev == *cur;
2510
2511
647
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
647
    }
2528
182
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricDecrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricDecrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
598
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
598
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
598
    const auto filtered = filter(results);
2495
2496
598
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
545
        return;
2499
545
    }
2500
2501
53
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
269
    for (size_t i = 1; i < filtered.size(); i++) {
2506
216
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
216
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
216
        const bool equal = *prev == *cur;
2510
2511
216
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
216
    }
2528
53
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SCRYPT>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SCRYPT> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
95
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
95
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
95
    const auto filtered = filter(results);
2495
2496
95
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
79
        return;
2499
79
    }
2500
2501
16
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
90
    for (size_t i = 1; i < filtered.size(); i++) {
2506
74
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
74
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
74
        const bool equal = *prev == *cur;
2510
2511
74
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
74
    }
2528
16
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_HKDF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_HKDF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
214
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
214
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
214
    const auto filtered = filter(results);
2495
2496
214
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
178
        return;
2499
178
    }
2500
2501
36
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
149
    for (size_t i = 1; i < filtered.size(); i++) {
2506
113
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
113
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
113
        const bool equal = *prev == *cur;
2510
2511
113
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
113
    }
2528
36
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_TLS1_PRF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_TLS1_PRF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
49
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
49
    const auto filtered = filter(results);
2495
2496
49
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
49
        return;
2499
49
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
35
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
35
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
35
    const auto filtered = filter(results);
2495
2496
35
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
35
        return;
2499
35
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
38
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
38
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
38
    const auto filtered = filter(results);
2495
2496
38
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
38
        return;
2499
38
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
265
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
265
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
265
    const auto filtered = filter(results);
2495
2496
265
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
238
        return;
2499
238
    }
2500
2501
27
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
162
    for (size_t i = 1; i < filtered.size(); i++) {
2506
135
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
135
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
135
        const bool equal = *prev == *cur;
2510
2511
135
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
135
    }
2528
27
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_ARGON2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_ARGON2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
204
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
204
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
204
    const auto filtered = filter(results);
2495
2496
204
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
161
        return;
2499
161
    }
2500
2501
43
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
113
    for (size_t i = 1; i < filtered.size(); i++) {
2506
70
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
70
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
70
        const bool equal = *prev == *cur;
2510
2511
70
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
70
    }
2528
43
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SSH>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SSH> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
27
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
27
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
27
    const auto filtered = filter(results);
2495
2496
27
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
27
        return;
2499
27
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_X963>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_X963> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
27
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
27
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
27
    const auto filtered = filter(results);
2495
2496
27
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
27
        return;
2499
27
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_BCRYPT>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_BCRYPT> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
10
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
10
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
10
    const auto filtered = filter(results);
2495
2496
10
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
10
        return;
2499
10
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
224
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
224
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
224
    const auto filtered = filter(results);
2495
2496
224
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
207
        return;
2499
207
    }
2500
2501
17
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
50
    for (size_t i = 1; i < filtered.size(); i++) {
2506
33
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
33
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
33
        const bool equal = *prev == *cur;
2510
2511
33
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
33
    }
2528
17
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTP>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTP> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
26
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
26
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
26
    const auto filtered = filter(results);
2495
2496
26
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
26
        return;
2499
26
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTCP>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTCP> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
22
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
22
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
22
    const auto filtered = filter(results);
2495
2496
22
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
22
        return;
2499
22
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_PrivateToPublic>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_PrivateToPublic> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
147
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
147
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
147
    const auto filtered = filter(results);
2495
2496
147
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
103
        return;
2499
103
    }
2500
2501
44
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
125
    for (size_t i = 1; i < filtered.size(); i++) {
2506
81
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
81
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
81
        const bool equal = *prev == *cur;
2510
2511
81
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
81
    }
2528
44
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_ValidatePubkey>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_ValidatePubkey> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
90
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
90
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
90
    const auto filtered = filter(results);
2495
2496
90
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
81
        return;
2499
81
    }
2500
2501
9
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
18
    for (size_t i = 1; i < filtered.size(); i++) {
2506
9
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
9
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
9
        const bool equal = *prev == *cur;
2510
2511
9
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
9
    }
2528
9
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
24
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
24
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
24
    const auto filtered = filter(results);
2495
2496
24
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
24
        return;
2499
24
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
580
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
580
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
580
    const auto filtered = filter(results);
2495
2496
580
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
237
        return;
2499
237
    }
2500
2501
343
    if ( dontCompare(operations[0].second) == true ) {
2502
114
        return;
2503
114
    }
2504
2505
731
    for (size_t i = 1; i < filtered.size(); i++) {
2506
502
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
502
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
502
        const bool equal = *prev == *cur;
2510
2511
502
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
502
    }
2528
229
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
63
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
63
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
63
    const auto filtered = filter(results);
2495
2496
63
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
46
        return;
2499
46
    }
2500
2501
17
    if ( dontCompare(operations[0].second) == true ) {
2502
17
        return;
2503
17
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
25
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
25
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
25
    const auto filtered = filter(results);
2495
2496
25
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
25
        return;
2499
25
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
24
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
24
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
24
    const auto filtered = filter(results);
2495
2496
24
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
24
        return;
2499
24
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
21
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
21
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
21
    const auto filtered = filter(results);
2495
2496
21
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
21
        return;
2499
21
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
178
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
178
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
178
    const auto filtered = filter(results);
2495
2496
178
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
137
        return;
2499
137
    }
2500
2501
41
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
104
    for (size_t i = 1; i < filtered.size(); i++) {
2506
63
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
63
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
63
        const bool equal = *prev == *cur;
2510
2511
63
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
63
    }
2528
41
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
110
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
110
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
110
    const auto filtered = filter(results);
2495
2496
110
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
88
        return;
2499
88
    }
2500
2501
22
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
62
    for (size_t i = 1; i < filtered.size(); i++) {
2506
40
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
40
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
40
        const bool equal = *prev == *cur;
2510
2511
40
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
40
    }
2528
22
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
25
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
25
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
25
    const auto filtered = filter(results);
2495
2496
25
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
25
        return;
2499
25
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
23
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
23
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
23
    const auto filtered = filter(results);
2495
2496
23
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
23
        return;
2499
23
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Recover>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Recover> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
447
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
447
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
447
    const auto filtered = filter(results);
2495
2496
447
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
362
        return;
2499
362
    }
2500
2501
85
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
257
    for (size_t i = 1; i < filtered.size(); i++) {
2506
172
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
172
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
172
        const bool equal = *prev == *cur;
2510
2511
172
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
172
    }
2528
85
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
186
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
186
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
186
    const auto filtered = filter(results);
2495
2496
186
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
174
        return;
2499
174
    }
2500
2501
12
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
27
    for (size_t i = 1; i < filtered.size(); i++) {
2506
15
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
15
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
15
        const bool equal = *prev == *cur;
2510
2511
15
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
15
    }
2528
12
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_PrivateToPublic>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_PrivateToPublic> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
16
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
16
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
16
    const auto filtered = filter(results);
2495
2496
16
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
16
        return;
2499
16
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDH_Derive>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDH_Derive> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
34
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
34
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
34
    const auto filtered = filter(results);
2495
2496
34
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
33
        return;
2499
33
    }
2500
2501
1
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
2
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1
        const bool equal = *prev == *cur;
2510
2511
1
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
1
    }
2528
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Decrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Decrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
18
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
18
    const auto filtered = filter(results);
2495
2496
18
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
18
        return;
2499
18
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
78
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
78
    const auto filtered = filter(results);
2495
2496
78
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
73
        return;
2499
73
    }
2500
2501
5
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
16
    for (size_t i = 1; i < filtered.size(); i++) {
2506
11
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
11
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
11
        const bool equal = *prev == *cur;
2510
2511
11
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
11
    }
2528
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
48
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
48
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
48
    const auto filtered = filter(results);
2495
2496
48
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
48
        return;
2499
48
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Mul>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Mul> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
140
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
140
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
140
    const auto filtered = filter(results);
2495
2496
140
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
111
        return;
2499
111
    }
2500
2501
29
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
74
    for (size_t i = 1; i < filtered.size(); i++) {
2506
45
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
45
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
45
        const bool equal = *prev == *cur;
2510
2511
45
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
45
    }
2528
29
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Neg>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Neg> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
102
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
102
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
102
    const auto filtered = filter(results);
2495
2496
102
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
96
        return;
2499
96
    }
2500
2501
6
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
13
    for (size_t i = 1; i < filtered.size(); i++) {
2506
7
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
7
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
7
        const bool equal = *prev == *cur;
2510
2511
7
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
7
    }
2528
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
186
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
186
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
186
    const auto filtered = filter(results);
2495
2496
186
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
171
        return;
2499
171
    }
2500
2501
15
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
39
    for (size_t i = 1; i < filtered.size(); i++) {
2506
24
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
24
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
24
        const bool equal = *prev == *cur;
2510
2511
24
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
24
    }
2528
15
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Cmp>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Cmp> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
87
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
87
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
87
    const auto filtered = filter(results);
2495
2496
87
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
81
        return;
2499
81
    }
2500
2501
6
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
18
    for (size_t i = 1; i < filtered.size(); i++) {
2506
12
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
12
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
12
        const bool equal = *prev == *cur;
2510
2511
12
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
12
    }
2528
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DH_Derive>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DH_Derive> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
128
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
128
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
128
    const auto filtered = filter(results);
2495
2496
128
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
117
        return;
2499
117
    }
2500
2501
11
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
25
    for (size_t i = 1; i < filtered.size(); i++) {
2506
14
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
14
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
14
        const bool equal = *prev == *cur;
2510
2511
14
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
14
    }
2528
11
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
9.02k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
9.02k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
9.02k
    const auto filtered = filter(results);
2495
2496
9.02k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3.32k
        return;
2499
3.32k
    }
2500
2501
5.70k
    if ( dontCompare(operations[0].second) == true ) {
2502
684
        return;
2503
684
    }
2504
2505
16.3k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
11.3k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
11.3k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
11.3k
        const bool equal = *prev == *cur;
2510
2511
11.3k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
11.3k
    }
2528
5.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
28
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
28
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
28
    const auto filtered = filter(results);
2495
2496
28
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
28
        return;
2499
28
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp12>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp12> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
61
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
61
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
61
    const auto filtered = filter(results);
2495
2496
61
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
61
        return;
2499
61
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
34
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
34
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
34
    const auto filtered = filter(results);
2495
2496
34
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
34
        return;
2499
34
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
32
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
32
    const auto filtered = filter(results);
2495
2496
32
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
32
        return;
2499
32
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
25
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
25
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
25
    const auto filtered = filter(results);
2495
2496
25
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
25
        return;
2499
25
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
16
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
16
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
16
    const auto filtered = filter(results);
2495
2496
16
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
16
        return;
2499
16
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchSign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchSign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
25
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
25
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
25
    const auto filtered = filter(results);
2495
2496
25
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
25
        return;
2499
25
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchVerify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchVerify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
27
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
27
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
27
    const auto filtered = filter(results);
2495
2496
27
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
27
        return;
2499
27
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
17
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
17
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
17
    const auto filtered = filter(results);
2495
2496
17
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
17
        return;
2499
17
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
21
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
21
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
21
    const auto filtered = filter(results);
2495
2496
21
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
21
        return;
2499
21
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Pairing>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Pairing> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
21
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
21
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
21
    const auto filtered = filter(results);
2495
2496
21
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
21
        return;
2499
21
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MillerLoop>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MillerLoop> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
18
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
18
    const auto filtered = filter(results);
2495
2496
18
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
18
        return;
2499
18
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_FinalExp>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_FinalExp> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
24
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
24
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
24
    const auto filtered = filter(results);
2495
2496
24
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
24
        return;
2499
24
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
26
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
26
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
26
    const auto filtered = filter(results);
2495
2496
26
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
26
        return;
2499
26
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
26
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
26
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
26
    const auto filtered = filter(results);
2495
2496
26
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
26
        return;
2499
26
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
24
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
24
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
24
    const auto filtered = filter(results);
2495
2496
24
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
24
        return;
2499
24
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
27
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
27
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
27
    const auto filtered = filter(results);
2495
2496
27
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
27
        return;
2499
27
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG1OnCurve>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG1OnCurve> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
22
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
22
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
22
    const auto filtered = filter(results);
2495
2496
22
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
22
        return;
2499
22
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG2OnCurve>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG2OnCurve> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
37
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
37
    const auto filtered = filter(results);
2495
2496
37
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
37
        return;
2499
37
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_GenerateKeyPair>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_GenerateKeyPair> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
24
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
24
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
24
    const auto filtered = filter(results);
2495
2496
24
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
24
        return;
2499
24
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
23
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
23
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
23
    const auto filtered = filter(results);
2495
2496
23
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
23
        return;
2499
23
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
33
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
33
    const auto filtered = filter(results);
2495
2496
33
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
33
        return;
2499
33
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
26
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
26
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
26
    const auto filtered = filter(results);
2495
2496
26
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
26
        return;
2499
26
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
26
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
26
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
26
    const auto filtered = filter(results);
2495
2496
26
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
26
        return;
2499
26
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
29
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
29
    const auto filtered = filter(results);
2495
2496
29
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
29
        return;
2499
29
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Mul>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Mul> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
32
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
32
    const auto filtered = filter(results);
2495
2496
32
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
32
        return;
2499
32
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_IsEq>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_IsEq> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
32
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
32
    const auto filtered = filter(results);
2495
2496
32
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
32
        return;
2499
32
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Neg>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Neg> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
28
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
28
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
28
    const auto filtered = filter(results);
2495
2496
28
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
28
        return;
2499
28
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
24
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
24
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
24
    const auto filtered = filter(results);
2495
2496
24
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
24
        return;
2499
24
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Mul>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Mul> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
24
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
24
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
24
    const auto filtered = filter(results);
2495
2496
24
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
24
        return;
2499
24
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_IsEq>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_IsEq> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
36
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
36
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
36
    const auto filtered = filter(results);
2495
2496
36
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
36
        return;
2499
36
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Neg>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Neg> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
35
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
35
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
35
    const auto filtered = filter(results);
2495
2496
35
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
35
        return;
2499
35
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_MultiExp>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_MultiExp> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
39
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
39
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
39
    const auto filtered = filter(results);
2495
2496
39
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
39
        return;
2499
39
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Misc>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Misc> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
24
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
24
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
24
    const auto filtered = filter(results);
2495
2496
24
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
24
        return;
2499
24
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SR25519_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SR25519_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
30
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
30
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
30
    const auto filtered = filter(results);
2495
2496
30
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
30
        return;
2499
30
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
2529
2530
template <class ResultType, class OperationType>
2531
0
void ExecutorBase<ResultType, OperationType>::abort(std::vector<std::string> moduleNames, const std::string operation, const std::string algorithm, const std::string reason) const {
2532
0
    std::sort(moduleNames.begin(), moduleNames.end());
2533
2534
0
    printf("CPU:\n");
2535
0
    system("cat /proc/cpuinfo | grep '^model name' | head -n1");
2536
0
    system("cat /proc/cpuinfo | grep '^flags' | head -n1");
2537
2538
0
    printf("Assertion failure: ");
2539
0
    for (const auto& moduleName : moduleNames) {
2540
0
        printf("%s-", moduleName.c_str());
2541
0
    }
2542
0
    printf("%s-%s-%s\n", operation.c_str(), algorithm.c_str(), reason.c_str());
2543
0
    fflush(stdout);
2544
2545
0
    ::abort();
2546
0
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
2547
2548
template <class ResultType, class OperationType>
2549
113k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
113k
    (void)parentDs;
2551
113k
    return op;
2552
113k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2549
2.26k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.26k
    (void)parentDs;
2551
2.26k
    return op;
2552
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2549
2.26k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.26k
    (void)parentDs;
2551
2.26k
    return op;
2552
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2549
904
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
904
    (void)parentDs;
2551
904
    return op;
2552
904
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2549
5.43k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.43k
    (void)parentDs;
2551
5.43k
    return op;
2552
5.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2549
5.68k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.68k
    (void)parentDs;
2551
5.68k
    return op;
2552
5.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2549
3.66k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.66k
    (void)parentDs;
2551
3.66k
    return op;
2552
3.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2549
1.12k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.12k
    (void)parentDs;
2551
1.12k
    return op;
2552
1.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2549
1.55k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.55k
    (void)parentDs;
2551
1.55k
    return op;
2552
1.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2549
1.04k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.04k
    (void)parentDs;
2551
1.04k
    return op;
2552
1.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2549
848
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
848
    (void)parentDs;
2551
848
    return op;
2552
848
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2549
1.37k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.37k
    (void)parentDs;
2551
1.37k
    return op;
2552
1.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2549
1.25k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.25k
    (void)parentDs;
2551
1.25k
    return op;
2552
1.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2549
2.05k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.05k
    (void)parentDs;
2551
2.05k
    return op;
2552
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2549
635
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
635
    (void)parentDs;
2551
635
    return op;
2552
635
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2549
938
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
938
    (void)parentDs;
2551
938
    return op;
2552
938
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2549
433
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
433
    (void)parentDs;
2551
433
    return op;
2552
433
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SP_800_108) const
Line
Count
Source
2549
1.62k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.62k
    (void)parentDs;
2551
1.62k
    return op;
2552
1.62k
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SRTP) const
Line
Count
Source
2549
537
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
537
    (void)parentDs;
2551
537
    return op;
2552
537
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SRTCP) const
Line
Count
Source
2549
572
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
572
    (void)parentDs;
2551
572
    return op;
2552
572
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2549
1.03k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.03k
    (void)parentDs;
2551
1.03k
    return op;
2552
1.03k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2549
965
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
965
    (void)parentDs;
2551
965
    return op;
2552
965
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2549
958
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
958
    (void)parentDs;
2551
958
    return op;
2552
958
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const
Line
Count
Source
2549
496
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
496
    (void)parentDs;
2551
496
    return op;
2552
496
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const
Line
Count
Source
2549
2.43k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.43k
    (void)parentDs;
2551
2.43k
    return op;
2552
2.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2549
1.68k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.68k
    (void)parentDs;
2551
1.68k
    return op;
2552
1.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const
Line
Count
Source
2549
475
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
475
    (void)parentDs;
2551
475
    return op;
2552
475
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2549
764
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
764
    (void)parentDs;
2551
764
    return op;
2552
764
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2549
568
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
568
    (void)parentDs;
2551
568
    return op;
2552
568
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2549
1.10k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.10k
    (void)parentDs;
2551
1.10k
    return op;
2552
1.10k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2549
879
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
879
    (void)parentDs;
2551
879
    return op;
2552
879
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2549
853
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
853
    (void)parentDs;
2551
853
    return op;
2552
853
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2549
729
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
729
    (void)parentDs;
2551
729
    return op;
2552
729
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2549
2.13k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.13k
    (void)parentDs;
2551
2.13k
    return op;
2552
2.13k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2549
1.03k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.03k
    (void)parentDs;
2551
1.03k
    return op;
2552
1.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2549
1.04k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.04k
    (void)parentDs;
2551
1.04k
    return op;
2552
1.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2549
1.37k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.37k
    (void)parentDs;
2551
1.37k
    return op;
2552
1.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2549
983
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
983
    (void)parentDs;
2551
983
    return op;
2552
983
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const
Line
Count
Source
2549
840
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
840
    (void)parentDs;
2551
840
    return op;
2552
840
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2549
762
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
762
    (void)parentDs;
2551
762
    return op;
2552
762
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2549
738
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
738
    (void)parentDs;
2551
738
    return op;
2552
738
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2549
577
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
577
    (void)parentDs;
2551
577
    return op;
2552
577
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2549
808
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
808
    (void)parentDs;
2551
808
    return op;
2552
808
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const
Line
Count
Source
2549
869
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
869
    (void)parentDs;
2551
869
    return op;
2552
869
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const
Line
Count
Source
2549
1.06k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.06k
    (void)parentDs;
2551
1.06k
    return op;
2552
1.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2549
859
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
859
    (void)parentDs;
2551
859
    return op;
2552
859
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2549
1.41k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.41k
    (void)parentDs;
2551
1.41k
    return op;
2552
1.41k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2549
741
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
741
    (void)parentDs;
2551
741
    return op;
2552
741
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2549
881
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
881
    (void)parentDs;
2551
881
    return op;
2552
881
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2549
1.21k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.21k
    (void)parentDs;
2551
1.21k
    return op;
2552
1.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2549
22.6k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
22.6k
    (void)parentDs;
2551
22.6k
    return op;
2552
22.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2549
350
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
350
    (void)parentDs;
2551
350
    return op;
2552
350
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2549
494
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
494
    (void)parentDs;
2551
494
    return op;
2552
494
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2549
546
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
546
    (void)parentDs;
2551
546
    return op;
2552
546
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2549
522
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
522
    (void)parentDs;
2551
522
    return op;
2552
522
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2549
561
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
561
    (void)parentDs;
2551
561
    return op;
2552
561
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2549
814
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
814
    (void)parentDs;
2551
814
    return op;
2552
814
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2549
989
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
989
    (void)parentDs;
2551
989
    return op;
2552
989
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2549
874
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
874
    (void)parentDs;
2551
874
    return op;
2552
874
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2549
1.51k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.51k
    (void)parentDs;
2551
1.51k
    return op;
2552
1.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2549
594
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
594
    (void)parentDs;
2551
594
    return op;
2552
594
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2549
674
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
674
    (void)parentDs;
2551
674
    return op;
2552
674
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2549
623
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
623
    (void)parentDs;
2551
623
    return op;
2552
623
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2549
476
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
476
    (void)parentDs;
2551
476
    return op;
2552
476
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2549
879
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
879
    (void)parentDs;
2551
879
    return op;
2552
879
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2549
1.00k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.00k
    (void)parentDs;
2551
1.00k
    return op;
2552
1.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2549
1.06k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.06k
    (void)parentDs;
2551
1.06k
    return op;
2552
1.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2549
693
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
693
    (void)parentDs;
2551
693
    return op;
2552
693
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2549
733
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
733
    (void)parentDs;
2551
733
    return op;
2552
733
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2549
584
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
584
    (void)parentDs;
2551
584
    return op;
2552
584
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const
Line
Count
Source
2549
820
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
820
    (void)parentDs;
2551
820
    return op;
2552
820
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
Line
Count
Source
2549
590
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
590
    (void)parentDs;
2551
590
    return op;
2552
590
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2549
934
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
934
    (void)parentDs;
2551
934
    return op;
2552
934
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const
Line
Count
Source
2549
619
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
619
    (void)parentDs;
2551
619
    return op;
2552
619
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2549
1.01k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.01k
    (void)parentDs;
2551
1.01k
    return op;
2552
1.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2549
955
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
955
    (void)parentDs;
2551
955
    return op;
2552
955
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2549
861
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
861
    (void)parentDs;
2551
861
    return op;
2552
861
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2549
892
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
892
    (void)parentDs;
2551
892
    return op;
2552
892
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2549
619
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
619
    (void)parentDs;
2551
619
    return op;
2552
619
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2549
893
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
893
    (void)parentDs;
2551
893
    return op;
2552
893
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2549
616
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
616
    (void)parentDs;
2551
616
    return op;
2552
616
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2549
850
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
850
    (void)parentDs;
2551
850
    return op;
2552
850
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2549
684
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
684
    (void)parentDs;
2551
684
    return op;
2552
684
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const
Line
Count
Source
2549
606
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
606
    (void)parentDs;
2551
606
    return op;
2552
606
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2549
611
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
611
    (void)parentDs;
2551
611
    return op;
2552
611
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2549
638
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
638
    (void)parentDs;
2551
638
    return op;
2552
638
}
2553
2554
129
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2555
129
    (void)parentDs;
2556
129
    op.modulo = modulo;
2557
129
    return op;
2558
129
}
2559
2560
353
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2561
353
    (void)parentDs;
2562
353
    op.modulo = modulo;
2563
353
    return op;
2564
353
}
2565
2566
94
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2567
94
    (void)parentDs;
2568
94
    op.modulo = modulo;
2569
94
    return op;
2570
94
}
2571
2572
378
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2573
378
    (void)parentDs;
2574
378
    op.modulo = modulo;
2575
378
    return op;
2576
378
}
2577
2578
87
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2579
87
    (void)parentDs;
2580
87
    op.modulo = modulo;
2581
87
    return op;
2582
87
}
2583
2584
305
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2585
305
    (void)parentDs;
2586
305
    op.modulo = modulo;
2587
305
    return op;
2588
305
}
2589
2590
122
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2591
122
    (void)parentDs;
2592
122
    op.modulo = modulo;
2593
122
    return op;
2594
122
}
2595
2596
222
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2597
222
    (void)parentDs;
2598
222
    op.modulo = modulo;
2599
222
    return op;
2600
222
}
2601
2602
221
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2603
221
    (void)parentDs;
2604
221
    op.modulo = modulo;
2605
221
    return op;
2606
221
}
2607
2608
110
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2609
110
    (void)parentDs;
2610
110
    op.modulo = modulo;
2611
110
    return op;
2612
110
}
2613
2614
91
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2615
91
    (void)parentDs;
2616
91
    op.modulo = modulo;
2617
91
    return op;
2618
91
}
2619
2620
82
operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2621
82
    (void)parentDs;
2622
82
    op.modulo = modulo;
2623
82
    return op;
2624
82
}
2625
2626
87
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2627
87
    (void)parentDs;
2628
87
    op.modulo = modulo;
2629
87
    return op;
2630
87
}
2631
2632
281
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2633
281
    (void)parentDs;
2634
281
    op.modulo = modulo;
2635
281
    return op;
2636
281
}
2637
2638
248
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2639
248
    (void)parentDs;
2640
248
    op.modulo = modulo;
2641
248
    return op;
2642
248
}
2643
2644
120
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2645
120
    (void)parentDs;
2646
120
    op.modulo = modulo;
2647
120
    return op;
2648
120
}
2649
2650
134
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2651
134
    (void)parentDs;
2652
134
    op.modulo = modulo;
2653
134
    return op;
2654
134
}
2655
2656
334
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2657
334
    (void)parentDs;
2658
334
    op.modulo = modulo;
2659
334
    return op;
2660
334
}
2661
2662
221
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2663
221
    (void)parentDs;
2664
221
    op.modulo = modulo;
2665
221
    return op;
2666
221
}
2667
2668
277
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2669
277
    (void)parentDs;
2670
277
    op.modulo = modulo;
2671
277
    return op;
2672
277
}
2673
2674
191
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2675
191
    (void)parentDs;
2676
191
    op.modulo = modulo;
2677
191
    return op;
2678
191
}
2679
2680
103
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2681
103
    (void)parentDs;
2682
103
    op.modulo = modulo;
2683
103
    return op;
2684
103
}
2685
2686
template <class ResultType, class OperationType>
2687
119k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
119k
    Datasource ds(data, size);
2689
119k
    if ( parentDs != nullptr ) {
2690
119k
        auto modifier = parentDs->GetData(0);
2691
119k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
119k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
119k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.28k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.28k
    Datasource ds(data, size);
2689
2.28k
    if ( parentDs != nullptr ) {
2690
2.28k
        auto modifier = parentDs->GetData(0);
2691
2.28k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.28k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.28k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.28k
    Datasource ds(data, size);
2689
2.28k
    if ( parentDs != nullptr ) {
2690
2.28k
        auto modifier = parentDs->GetData(0);
2691
2.28k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.28k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
926
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
926
    Datasource ds(data, size);
2689
926
    if ( parentDs != nullptr ) {
2690
926
        auto modifier = parentDs->GetData(0);
2691
926
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
926
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
926
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.45k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.45k
    Datasource ds(data, size);
2689
5.45k
    if ( parentDs != nullptr ) {
2690
5.45k
        auto modifier = parentDs->GetData(0);
2691
5.45k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.45k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.70k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.70k
    Datasource ds(data, size);
2689
5.70k
    if ( parentDs != nullptr ) {
2690
5.70k
        auto modifier = parentDs->GetData(0);
2691
5.70k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.70k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.70k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.68k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.68k
    Datasource ds(data, size);
2689
3.68k
    if ( parentDs != nullptr ) {
2690
3.68k
        auto modifier = parentDs->GetData(0);
2691
3.68k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.68k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.14k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.14k
    Datasource ds(data, size);
2689
1.14k
    if ( parentDs != nullptr ) {
2690
1.14k
        auto modifier = parentDs->GetData(0);
2691
1.14k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.14k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.57k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.57k
    Datasource ds(data, size);
2689
1.57k
    if ( parentDs != nullptr ) {
2690
1.57k
        auto modifier = parentDs->GetData(0);
2691
1.57k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.57k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.05k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.05k
    Datasource ds(data, size);
2689
1.05k
    if ( parentDs != nullptr ) {
2690
1.05k
        auto modifier = parentDs->GetData(0);
2691
1.05k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.05k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
863
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
863
    Datasource ds(data, size);
2689
863
    if ( parentDs != nullptr ) {
2690
863
        auto modifier = parentDs->GetData(0);
2691
863
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
863
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
863
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.38k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.38k
    Datasource ds(data, size);
2689
1.38k
    if ( parentDs != nullptr ) {
2690
1.38k
        auto modifier = parentDs->GetData(0);
2691
1.38k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.38k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.27k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.27k
    Datasource ds(data, size);
2689
1.27k
    if ( parentDs != nullptr ) {
2690
1.27k
        auto modifier = parentDs->GetData(0);
2691
1.27k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.27k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.27k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.07k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.07k
    Datasource ds(data, size);
2689
2.07k
    if ( parentDs != nullptr ) {
2690
2.07k
        auto modifier = parentDs->GetData(0);
2691
2.07k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.07k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
650
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
650
    Datasource ds(data, size);
2689
650
    if ( parentDs != nullptr ) {
2690
650
        auto modifier = parentDs->GetData(0);
2691
650
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
650
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
650
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
954
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
954
    Datasource ds(data, size);
2689
954
    if ( parentDs != nullptr ) {
2690
954
        auto modifier = parentDs->GetData(0);
2691
954
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
954
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
954
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
449
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
449
    Datasource ds(data, size);
2689
449
    if ( parentDs != nullptr ) {
2690
449
        auto modifier = parentDs->GetData(0);
2691
449
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
449
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
449
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.64k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.64k
    Datasource ds(data, size);
2689
1.64k
    if ( parentDs != nullptr ) {
2690
1.64k
        auto modifier = parentDs->GetData(0);
2691
1.64k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.64k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.64k
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
553
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
553
    Datasource ds(data, size);
2689
553
    if ( parentDs != nullptr ) {
2690
553
        auto modifier = parentDs->GetData(0);
2691
553
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
553
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
553
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
589
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
589
    Datasource ds(data, size);
2689
589
    if ( parentDs != nullptr ) {
2690
589
        auto modifier = parentDs->GetData(0);
2691
589
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
589
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
589
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.04k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.04k
    Datasource ds(data, size);
2689
1.04k
    if ( parentDs != nullptr ) {
2690
1.04k
        auto modifier = parentDs->GetData(0);
2691
1.04k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.04k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.04k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
983
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
983
    Datasource ds(data, size);
2689
983
    if ( parentDs != nullptr ) {
2690
983
        auto modifier = parentDs->GetData(0);
2691
983
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
983
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
983
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
968
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
968
    Datasource ds(data, size);
2689
968
    if ( parentDs != nullptr ) {
2690
968
        auto modifier = parentDs->GetData(0);
2691
968
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
968
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
968
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
510
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
510
    Datasource ds(data, size);
2689
510
    if ( parentDs != nullptr ) {
2690
510
        auto modifier = parentDs->GetData(0);
2691
510
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
510
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
510
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.44k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.44k
    Datasource ds(data, size);
2689
2.44k
    if ( parentDs != nullptr ) {
2690
2.44k
        auto modifier = parentDs->GetData(0);
2691
2.44k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.44k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.69k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.69k
    Datasource ds(data, size);
2689
1.69k
    if ( parentDs != nullptr ) {
2690
1.69k
        auto modifier = parentDs->GetData(0);
2691
1.69k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.69k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
486
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
486
    Datasource ds(data, size);
2689
486
    if ( parentDs != nullptr ) {
2690
486
        auto modifier = parentDs->GetData(0);
2691
486
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
486
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
486
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
776
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
776
    Datasource ds(data, size);
2689
776
    if ( parentDs != nullptr ) {
2690
776
        auto modifier = parentDs->GetData(0);
2691
776
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
776
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
776
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
583
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
583
    Datasource ds(data, size);
2689
583
    if ( parentDs != nullptr ) {
2690
583
        auto modifier = parentDs->GetData(0);
2691
583
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
583
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
583
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.11k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.11k
    Datasource ds(data, size);
2689
1.11k
    if ( parentDs != nullptr ) {
2690
1.11k
        auto modifier = parentDs->GetData(0);
2691
1.11k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.11k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.11k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
890
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
890
    Datasource ds(data, size);
2689
890
    if ( parentDs != nullptr ) {
2690
890
        auto modifier = parentDs->GetData(0);
2691
890
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
890
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
890
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
868
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
868
    Datasource ds(data, size);
2689
868
    if ( parentDs != nullptr ) {
2690
868
        auto modifier = parentDs->GetData(0);
2691
868
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
868
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
868
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
744
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
744
    Datasource ds(data, size);
2689
744
    if ( parentDs != nullptr ) {
2690
744
        auto modifier = parentDs->GetData(0);
2691
744
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
744
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
744
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.15k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.15k
    Datasource ds(data, size);
2689
2.15k
    if ( parentDs != nullptr ) {
2690
2.15k
        auto modifier = parentDs->GetData(0);
2691
2.15k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.15k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.15k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.06k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.06k
    Datasource ds(data, size);
2689
1.06k
    if ( parentDs != nullptr ) {
2690
1.06k
        auto modifier = parentDs->GetData(0);
2691
1.06k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.06k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.06k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.06k
    Datasource ds(data, size);
2689
1.06k
    if ( parentDs != nullptr ) {
2690
1.06k
        auto modifier = parentDs->GetData(0);
2691
1.06k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.06k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.39k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.39k
    Datasource ds(data, size);
2689
1.39k
    if ( parentDs != nullptr ) {
2690
1.39k
        auto modifier = parentDs->GetData(0);
2691
1.39k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.39k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.00k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.00k
    Datasource ds(data, size);
2689
1.00k
    if ( parentDs != nullptr ) {
2690
1.00k
        auto modifier = parentDs->GetData(0);
2691
1.00k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.00k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
855
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
855
    Datasource ds(data, size);
2689
855
    if ( parentDs != nullptr ) {
2690
855
        auto modifier = parentDs->GetData(0);
2691
855
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
855
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
855
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
782
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
782
    Datasource ds(data, size);
2689
782
    if ( parentDs != nullptr ) {
2690
782
        auto modifier = parentDs->GetData(0);
2691
782
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
782
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
782
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
752
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
752
    Datasource ds(data, size);
2689
752
    if ( parentDs != nullptr ) {
2690
752
        auto modifier = parentDs->GetData(0);
2691
752
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
752
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
752
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
594
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
594
    Datasource ds(data, size);
2689
594
    if ( parentDs != nullptr ) {
2690
594
        auto modifier = parentDs->GetData(0);
2691
594
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
594
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
594
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
822
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
822
    Datasource ds(data, size);
2689
822
    if ( parentDs != nullptr ) {
2690
822
        auto modifier = parentDs->GetData(0);
2691
822
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
822
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
822
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
887
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
887
    Datasource ds(data, size);
2689
887
    if ( parentDs != nullptr ) {
2690
887
        auto modifier = parentDs->GetData(0);
2691
887
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
887
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
887
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.08k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.08k
    Datasource ds(data, size);
2689
1.08k
    if ( parentDs != nullptr ) {
2690
1.08k
        auto modifier = parentDs->GetData(0);
2691
1.08k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.08k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
873
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
873
    Datasource ds(data, size);
2689
873
    if ( parentDs != nullptr ) {
2690
873
        auto modifier = parentDs->GetData(0);
2691
873
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
873
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
873
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.43k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.43k
    Datasource ds(data, size);
2689
1.43k
    if ( parentDs != nullptr ) {
2690
1.43k
        auto modifier = parentDs->GetData(0);
2691
1.43k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.43k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.43k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
760
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
760
    Datasource ds(data, size);
2689
760
    if ( parentDs != nullptr ) {
2690
760
        auto modifier = parentDs->GetData(0);
2691
760
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
760
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
760
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
890
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
890
    Datasource ds(data, size);
2689
890
    if ( parentDs != nullptr ) {
2690
890
        auto modifier = parentDs->GetData(0);
2691
890
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
890
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
890
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.23k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.23k
    Datasource ds(data, size);
2689
1.23k
    if ( parentDs != nullptr ) {
2690
1.23k
        auto modifier = parentDs->GetData(0);
2691
1.23k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.23k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
26.9k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
26.9k
    Datasource ds(data, size);
2689
26.9k
    if ( parentDs != nullptr ) {
2690
26.9k
        auto modifier = parentDs->GetData(0);
2691
26.9k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
26.9k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
26.9k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
363
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
363
    Datasource ds(data, size);
2689
363
    if ( parentDs != nullptr ) {
2690
363
        auto modifier = parentDs->GetData(0);
2691
363
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
363
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
363
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
526
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
526
    Datasource ds(data, size);
2689
526
    if ( parentDs != nullptr ) {
2690
526
        auto modifier = parentDs->GetData(0);
2691
526
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
526
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
526
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
564
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
564
    Datasource ds(data, size);
2689
564
    if ( parentDs != nullptr ) {
2690
564
        auto modifier = parentDs->GetData(0);
2691
564
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
564
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
564
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
537
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
537
    Datasource ds(data, size);
2689
537
    if ( parentDs != nullptr ) {
2690
537
        auto modifier = parentDs->GetData(0);
2691
537
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
537
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
537
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
578
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
578
    Datasource ds(data, size);
2689
578
    if ( parentDs != nullptr ) {
2690
578
        auto modifier = parentDs->GetData(0);
2691
578
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
578
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
578
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
834
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
834
    Datasource ds(data, size);
2689
834
    if ( parentDs != nullptr ) {
2690
834
        auto modifier = parentDs->GetData(0);
2691
834
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
834
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
834
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.02k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.02k
    Datasource ds(data, size);
2689
1.02k
    if ( parentDs != nullptr ) {
2690
1.02k
        auto modifier = parentDs->GetData(0);
2691
1.02k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.02k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.02k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
912
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
912
    Datasource ds(data, size);
2689
912
    if ( parentDs != nullptr ) {
2690
912
        auto modifier = parentDs->GetData(0);
2691
912
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
912
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
912
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.54k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.54k
    Datasource ds(data, size);
2689
1.54k
    if ( parentDs != nullptr ) {
2690
1.54k
        auto modifier = parentDs->GetData(0);
2691
1.54k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.54k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.54k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
628
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
628
    Datasource ds(data, size);
2689
628
    if ( parentDs != nullptr ) {
2690
628
        auto modifier = parentDs->GetData(0);
2691
628
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
628
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
628
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
697
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
697
    Datasource ds(data, size);
2689
697
    if ( parentDs != nullptr ) {
2690
697
        auto modifier = parentDs->GetData(0);
2691
697
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
697
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
697
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
639
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
639
    Datasource ds(data, size);
2689
639
    if ( parentDs != nullptr ) {
2690
639
        auto modifier = parentDs->GetData(0);
2691
639
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
639
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
639
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
497
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
497
    Datasource ds(data, size);
2689
497
    if ( parentDs != nullptr ) {
2690
497
        auto modifier = parentDs->GetData(0);
2691
497
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
497
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
497
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
897
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
897
    Datasource ds(data, size);
2689
897
    if ( parentDs != nullptr ) {
2690
897
        auto modifier = parentDs->GetData(0);
2691
897
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
897
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
897
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.02k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.02k
    Datasource ds(data, size);
2689
1.02k
    if ( parentDs != nullptr ) {
2690
1.02k
        auto modifier = parentDs->GetData(0);
2691
1.02k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.02k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.07k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.07k
    Datasource ds(data, size);
2689
1.07k
    if ( parentDs != nullptr ) {
2690
1.07k
        auto modifier = parentDs->GetData(0);
2691
1.07k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.07k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
708
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
708
    Datasource ds(data, size);
2689
708
    if ( parentDs != nullptr ) {
2690
708
        auto modifier = parentDs->GetData(0);
2691
708
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
708
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
708
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
750
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
750
    Datasource ds(data, size);
2689
750
    if ( parentDs != nullptr ) {
2690
750
        auto modifier = parentDs->GetData(0);
2691
750
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
750
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
750
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
593
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
593
    Datasource ds(data, size);
2689
593
    if ( parentDs != nullptr ) {
2690
593
        auto modifier = parentDs->GetData(0);
2691
593
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
593
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
593
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
844
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
844
    Datasource ds(data, size);
2689
844
    if ( parentDs != nullptr ) {
2690
844
        auto modifier = parentDs->GetData(0);
2691
844
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
844
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
844
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
609
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
609
    Datasource ds(data, size);
2689
609
    if ( parentDs != nullptr ) {
2690
609
        auto modifier = parentDs->GetData(0);
2691
609
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
609
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
609
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
951
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
951
    Datasource ds(data, size);
2689
951
    if ( parentDs != nullptr ) {
2690
951
        auto modifier = parentDs->GetData(0);
2691
951
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
951
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
951
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
634
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
634
    Datasource ds(data, size);
2689
634
    if ( parentDs != nullptr ) {
2690
634
        auto modifier = parentDs->GetData(0);
2691
634
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
634
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
634
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.02k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.02k
    Datasource ds(data, size);
2689
1.02k
    if ( parentDs != nullptr ) {
2690
1.02k
        auto modifier = parentDs->GetData(0);
2691
1.02k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.02k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
976
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
976
    Datasource ds(data, size);
2689
976
    if ( parentDs != nullptr ) {
2690
976
        auto modifier = parentDs->GetData(0);
2691
976
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
976
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
976
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
880
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
880
    Datasource ds(data, size);
2689
880
    if ( parentDs != nullptr ) {
2690
880
        auto modifier = parentDs->GetData(0);
2691
880
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
880
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
880
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
907
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
907
    Datasource ds(data, size);
2689
907
    if ( parentDs != nullptr ) {
2690
907
        auto modifier = parentDs->GetData(0);
2691
907
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
907
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
907
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
632
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
632
    Datasource ds(data, size);
2689
632
    if ( parentDs != nullptr ) {
2690
632
        auto modifier = parentDs->GetData(0);
2691
632
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
632
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
632
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
914
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
914
    Datasource ds(data, size);
2689
914
    if ( parentDs != nullptr ) {
2690
914
        auto modifier = parentDs->GetData(0);
2691
914
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
914
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
914
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
629
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
629
    Datasource ds(data, size);
2689
629
    if ( parentDs != nullptr ) {
2690
629
        auto modifier = parentDs->GetData(0);
2691
629
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
629
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
629
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
873
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
873
    Datasource ds(data, size);
2689
873
    if ( parentDs != nullptr ) {
2690
873
        auto modifier = parentDs->GetData(0);
2691
873
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
873
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
873
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
698
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
698
    Datasource ds(data, size);
2689
698
    if ( parentDs != nullptr ) {
2690
698
        auto modifier = parentDs->GetData(0);
2691
698
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
698
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
698
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
638
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
638
    Datasource ds(data, size);
2689
638
    if ( parentDs != nullptr ) {
2690
638
        auto modifier = parentDs->GetData(0);
2691
638
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
638
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
638
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
624
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
624
    Datasource ds(data, size);
2689
624
    if ( parentDs != nullptr ) {
2690
624
        auto modifier = parentDs->GetData(0);
2691
624
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
624
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
624
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
656
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
656
    Datasource ds(data, size);
2689
656
    if ( parentDs != nullptr ) {
2690
656
        auto modifier = parentDs->GetData(0);
2691
656
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
656
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
656
}
2696
2697
template <class ResultType, class OperationType>
2698
117k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
117k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
117k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
117k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
117k
    if ( modules.find(moduleID) == modules.end() ) {
2712
75.8k
        return nullptr;
2713
75.8k
    }
2714
2715
41.7k
    return modules.at(moduleID);
2716
117k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.26k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.26k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.26k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.26k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.26k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.07k
        return nullptr;
2713
1.07k
    }
2714
2715
1.19k
    return modules.at(moduleID);
2716
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.26k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.26k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.26k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.26k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.26k
    if ( modules.find(moduleID) == modules.end() ) {
2712
909
        return nullptr;
2713
909
    }
2714
2715
1.35k
    return modules.at(moduleID);
2716
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
904
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
904
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
904
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
904
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
904
    if ( modules.find(moduleID) == modules.end() ) {
2712
613
        return nullptr;
2713
613
    }
2714
2715
291
    return modules.at(moduleID);
2716
904
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.43k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.43k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.43k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.43k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.43k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.35k
        return nullptr;
2713
2.35k
    }
2714
2715
3.07k
    return modules.at(moduleID);
2716
5.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.68k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.68k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.68k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.68k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.68k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.27k
        return nullptr;
2713
3.27k
    }
2714
2715
2.41k
    return modules.at(moduleID);
2716
5.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.66k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.66k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.66k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.66k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.66k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.79k
        return nullptr;
2713
1.79k
    }
2714
2715
1.87k
    return modules.at(moduleID);
2716
3.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.12k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.12k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.12k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.12k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.12k
    if ( modules.find(moduleID) == modules.end() ) {
2712
719
        return nullptr;
2713
719
    }
2714
2715
410
    return modules.at(moduleID);
2716
1.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.55k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.55k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.55k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.55k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.55k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.01k
        return nullptr;
2713
1.01k
    }
2714
2715
537
    return modules.at(moduleID);
2716
1.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.04k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.04k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.04k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.04k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.04k
    if ( modules.find(moduleID) == modules.end() ) {
2712
711
        return nullptr;
2713
711
    }
2714
2715
329
    return modules.at(moduleID);
2716
1.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
848
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
848
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
848
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
848
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
848
    if ( modules.find(moduleID) == modules.end() ) {
2712
609
        return nullptr;
2713
609
    }
2714
2715
239
    return modules.at(moduleID);
2716
848
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.37k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.37k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.37k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.37k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.37k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.10k
        return nullptr;
2713
1.10k
    }
2714
2715
267
    return modules.at(moduleID);
2716
1.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.25k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.25k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.25k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.25k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.25k
    if ( modules.find(moduleID) == modules.end() ) {
2712
710
        return nullptr;
2713
710
    }
2714
2715
544
    return modules.at(moduleID);
2716
1.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.05k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.05k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.05k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.05k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.05k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.71k
        return nullptr;
2713
1.71k
    }
2714
2715
336
    return modules.at(moduleID);
2716
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
635
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
635
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
635
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
635
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
635
    if ( modules.find(moduleID) == modules.end() ) {
2712
508
        return nullptr;
2713
508
    }
2714
2715
127
    return modules.at(moduleID);
2716
635
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
938
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
938
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
938
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
938
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
938
    if ( modules.find(moduleID) == modules.end() ) {
2712
718
        return nullptr;
2713
718
    }
2714
2715
220
    return modules.at(moduleID);
2716
938
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
433
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
433
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
433
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
433
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
433
    if ( modules.find(moduleID) == modules.end() ) {
2712
403
        return nullptr;
2713
403
    }
2714
2715
30
    return modules.at(moduleID);
2716
433
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.62k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.62k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.62k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.62k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.62k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.19k
        return nullptr;
2713
1.19k
    }
2714
2715
430
    return modules.at(moduleID);
2716
1.62k
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
537
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
537
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
537
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
537
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
537
    if ( modules.find(moduleID) == modules.end() ) {
2712
353
        return nullptr;
2713
353
    }
2714
2715
184
    return modules.at(moduleID);
2716
537
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
572
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
572
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
572
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
572
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
572
    if ( modules.find(moduleID) == modules.end() ) {
2712
414
        return nullptr;
2713
414
    }
2714
2715
158
    return modules.at(moduleID);
2716
572
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.03k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.03k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.03k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.03k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.03k
    if ( modules.find(moduleID) == modules.end() ) {
2712
718
        return nullptr;
2713
718
    }
2714
2715
313
    return modules.at(moduleID);
2716
1.03k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
965
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
965
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
965
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
965
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
965
    if ( modules.find(moduleID) == modules.end() ) {
2712
793
        return nullptr;
2713
793
    }
2714
2715
172
    return modules.at(moduleID);
2716
965
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
958
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
958
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
958
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
958
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
958
    if ( modules.find(moduleID) == modules.end() ) {
2712
560
        return nullptr;
2713
560
    }
2714
2715
398
    return modules.at(moduleID);
2716
958
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
496
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
496
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
496
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
496
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
496
    if ( modules.find(moduleID) == modules.end() ) {
2712
404
        return nullptr;
2713
404
    }
2714
2715
92
    return modules.at(moduleID);
2716
496
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.43k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.43k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.43k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.43k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.43k
    if ( modules.find(moduleID) == modules.end() ) {
2712
921
        return nullptr;
2713
921
    }
2714
2715
1.51k
    return modules.at(moduleID);
2716
2.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.68k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.68k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.68k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.68k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.68k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.49k
        return nullptr;
2713
1.49k
    }
2714
2715
185
    return modules.at(moduleID);
2716
1.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
475
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
475
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
475
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
475
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
475
    if ( modules.find(moduleID) == modules.end() ) {
2712
391
        return nullptr;
2713
391
    }
2714
2715
84
    return modules.at(moduleID);
2716
475
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
764
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
764
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
764
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
764
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
764
    if ( modules.find(moduleID) == modules.end() ) {
2712
698
        return nullptr;
2713
698
    }
2714
2715
66
    return modules.at(moduleID);
2716
764
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
568
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
568
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
568
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
568
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
568
    if ( modules.find(moduleID) == modules.end() ) {
2712
497
        return nullptr;
2713
497
    }
2714
2715
71
    return modules.at(moduleID);
2716
568
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.10k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.10k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.10k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.10k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.10k
    if ( modules.find(moduleID) == modules.end() ) {
2712
806
        return nullptr;
2713
806
    }
2714
2715
301
    return modules.at(moduleID);
2716
1.10k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
879
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
879
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
879
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
879
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
879
    if ( modules.find(moduleID) == modules.end() ) {
2712
649
        return nullptr;
2713
649
    }
2714
2715
230
    return modules.at(moduleID);
2716
879
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
853
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
853
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
853
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
853
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
853
    if ( modules.find(moduleID) == modules.end() ) {
2712
775
        return nullptr;
2713
775
    }
2714
2715
78
    return modules.at(moduleID);
2716
853
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
729
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
729
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
729
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
729
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
729
    if ( modules.find(moduleID) == modules.end() ) {
2712
654
        return nullptr;
2713
654
    }
2714
2715
75
    return modules.at(moduleID);
2716
729
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.13k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.13k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.13k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.13k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.13k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.37k
        return nullptr;
2713
1.37k
    }
2714
2715
768
    return modules.at(moduleID);
2716
2.13k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.03k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.03k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.03k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.03k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.03k
    if ( modules.find(moduleID) == modules.end() ) {
2712
685
        return nullptr;
2713
685
    }
2714
2715
352
    return modules.at(moduleID);
2716
1.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.04k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.04k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.04k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.04k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.04k
    if ( modules.find(moduleID) == modules.end() ) {
2712
889
        return nullptr;
2713
889
    }
2714
2715
158
    return modules.at(moduleID);
2716
1.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.37k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.37k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.37k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.37k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.37k
    if ( modules.find(moduleID) == modules.end() ) {
2712
676
        return nullptr;
2713
676
    }
2714
2715
701
    return modules.at(moduleID);
2716
1.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
983
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
983
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
983
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
983
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
983
    if ( modules.find(moduleID) == modules.end() ) {
2712
913
        return nullptr;
2713
913
    }
2714
2715
70
    return modules.at(moduleID);
2716
983
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
840
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
840
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
840
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
840
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
840
    if ( modules.find(moduleID) == modules.end() ) {
2712
720
        return nullptr;
2713
720
    }
2714
2715
120
    return modules.at(moduleID);
2716
840
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
762
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
762
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
762
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
762
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
762
    if ( modules.find(moduleID) == modules.end() ) {
2712
638
        return nullptr;
2713
638
    }
2714
2715
124
    return modules.at(moduleID);
2716
762
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
738
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
738
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
738
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
738
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
738
    if ( modules.find(moduleID) == modules.end() ) {
2712
653
        return nullptr;
2713
653
    }
2714
2715
85
    return modules.at(moduleID);
2716
738
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
577
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
577
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
577
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
577
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
577
    if ( modules.find(moduleID) == modules.end() ) {
2712
507
        return nullptr;
2713
507
    }
2714
2715
70
    return modules.at(moduleID);
2716
577
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
808
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
808
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
808
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
808
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
808
    if ( modules.find(moduleID) == modules.end() ) {
2712
620
        return nullptr;
2713
620
    }
2714
2715
188
    return modules.at(moduleID);
2716
808
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
869
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
869
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
869
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
869
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
869
    if ( modules.find(moduleID) == modules.end() ) {
2712
728
        return nullptr;
2713
728
    }
2714
2715
141
    return modules.at(moduleID);
2716
869
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.06k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.06k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.06k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.06k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.06k
    if ( modules.find(moduleID) == modules.end() ) {
2712
790
        return nullptr;
2713
790
    }
2714
2715
277
    return modules.at(moduleID);
2716
1.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
859
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
859
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
859
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
859
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
859
    if ( modules.find(moduleID) == modules.end() ) {
2712
656
        return nullptr;
2713
656
    }
2714
2715
203
    return modules.at(moduleID);
2716
859
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.41k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.41k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.41k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.41k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.41k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.09k
        return nullptr;
2713
1.09k
    }
2714
2715
323
    return modules.at(moduleID);
2716
1.41k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
741
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
741
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
741
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
741
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
741
    if ( modules.find(moduleID) == modules.end() ) {
2712
537
        return nullptr;
2713
537
    }
2714
2715
204
    return modules.at(moduleID);
2716
741
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
881
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
881
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
881
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
881
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
881
    if ( modules.find(moduleID) == modules.end() ) {
2712
666
        return nullptr;
2713
666
    }
2714
2715
215
    return modules.at(moduleID);
2716
881
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.21k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.21k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.21k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.21k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.21k
    if ( modules.find(moduleID) == modules.end() ) {
2712
963
        return nullptr;
2713
963
    }
2714
2715
247
    return modules.at(moduleID);
2716
1.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
26.8k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
26.8k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
26.8k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
26.8k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
26.8k
    if ( modules.find(moduleID) == modules.end() ) {
2712
10.5k
        return nullptr;
2713
10.5k
    }
2714
2715
16.2k
    return modules.at(moduleID);
2716
26.8k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
350
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
350
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
350
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
350
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
350
    if ( modules.find(moduleID) == modules.end() ) {
2712
275
        return nullptr;
2713
275
    }
2714
2715
75
    return modules.at(moduleID);
2716
350
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
494
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
494
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
494
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
494
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
494
    if ( modules.find(moduleID) == modules.end() ) {
2712
353
        return nullptr;
2713
353
    }
2714
2715
141
    return modules.at(moduleID);
2716
494
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
546
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
546
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
546
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
546
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
546
    if ( modules.find(moduleID) == modules.end() ) {
2712
429
        return nullptr;
2713
429
    }
2714
2715
117
    return modules.at(moduleID);
2716
546
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
522
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
522
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
522
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
522
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
522
    if ( modules.find(moduleID) == modules.end() ) {
2712
414
        return nullptr;
2713
414
    }
2714
2715
108
    return modules.at(moduleID);
2716
522
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
561
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
561
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
561
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
561
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
561
    if ( modules.find(moduleID) == modules.end() ) {
2712
488
        return nullptr;
2713
488
    }
2714
2715
73
    return modules.at(moduleID);
2716
561
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
814
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
814
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
814
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
814
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
814
    if ( modules.find(moduleID) == modules.end() ) {
2712
762
        return nullptr;
2713
762
    }
2714
2715
52
    return modules.at(moduleID);
2716
814
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
989
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
989
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
989
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
989
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
989
    if ( modules.find(moduleID) == modules.end() ) {
2712
888
        return nullptr;
2713
888
    }
2714
2715
101
    return modules.at(moduleID);
2716
989
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
874
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
874
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
874
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
874
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
874
    if ( modules.find(moduleID) == modules.end() ) {
2712
764
        return nullptr;
2713
764
    }
2714
2715
110
    return modules.at(moduleID);
2716
874
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.51k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.51k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.51k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.51k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.51k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.41k
        return nullptr;
2713
1.41k
    }
2714
2715
101
    return modules.at(moduleID);
2716
1.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
594
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
594
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
594
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
594
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
594
    if ( modules.find(moduleID) == modules.end() ) {
2712
482
        return nullptr;
2713
482
    }
2714
2715
112
    return modules.at(moduleID);
2716
594
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
674
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
674
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
674
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
674
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
674
    if ( modules.find(moduleID) == modules.end() ) {
2712
575
        return nullptr;
2713
575
    }
2714
2715
99
    return modules.at(moduleID);
2716
674
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
623
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
623
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
623
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
623
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
623
    if ( modules.find(moduleID) == modules.end() ) {
2712
541
        return nullptr;
2713
541
    }
2714
2715
82
    return modules.at(moduleID);
2716
623
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
476
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
476
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
476
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
476
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
476
    if ( modules.find(moduleID) == modules.end() ) {
2712
358
        return nullptr;
2713
358
    }
2714
2715
118
    return modules.at(moduleID);
2716
476
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
879
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
879
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
879
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
879
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
879
    if ( modules.find(moduleID) == modules.end() ) {
2712
778
        return nullptr;
2713
778
    }
2714
2715
101
    return modules.at(moduleID);
2716
879
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.00k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.00k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.00k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.00k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.00k
    if ( modules.find(moduleID) == modules.end() ) {
2712
898
        return nullptr;
2713
898
    }
2714
2715
109
    return modules.at(moduleID);
2716
1.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.06k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.06k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.06k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.06k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.06k
    if ( modules.find(moduleID) == modules.end() ) {
2712
981
        return nullptr;
2713
981
    }
2714
2715
82
    return modules.at(moduleID);
2716
1.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
693
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
693
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
693
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
693
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
693
    if ( modules.find(moduleID) == modules.end() ) {
2712
585
        return nullptr;
2713
585
    }
2714
2715
108
    return modules.at(moduleID);
2716
693
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
733
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
733
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
733
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
733
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
733
    if ( modules.find(moduleID) == modules.end() ) {
2712
648
        return nullptr;
2713
648
    }
2714
2715
85
    return modules.at(moduleID);
2716
733
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
584
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
584
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
584
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
584
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
584
    if ( modules.find(moduleID) == modules.end() ) {
2712
482
        return nullptr;
2713
482
    }
2714
2715
102
    return modules.at(moduleID);
2716
584
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
820
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
820
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
820
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
820
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
820
    if ( modules.find(moduleID) == modules.end() ) {
2712
713
        return nullptr;
2713
713
    }
2714
2715
107
    return modules.at(moduleID);
2716
820
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
590
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
590
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
590
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
590
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
590
    if ( modules.find(moduleID) == modules.end() ) {
2712
467
        return nullptr;
2713
467
    }
2714
2715
123
    return modules.at(moduleID);
2716
590
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
934
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
934
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
934
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
934
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
934
    if ( modules.find(moduleID) == modules.end() ) {
2712
811
        return nullptr;
2713
811
    }
2714
2715
123
    return modules.at(moduleID);
2716
934
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
619
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
619
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
619
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
619
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
619
    if ( modules.find(moduleID) == modules.end() ) {
2712
524
        return nullptr;
2713
524
    }
2714
2715
95
    return modules.at(moduleID);
2716
619
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.01k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.01k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.01k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.01k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.01k
    if ( modules.find(moduleID) == modules.end() ) {
2712
902
        return nullptr;
2713
902
    }
2714
2715
110
    return modules.at(moduleID);
2716
1.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
955
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
955
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
955
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
955
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
955
    if ( modules.find(moduleID) == modules.end() ) {
2712
849
        return nullptr;
2713
849
    }
2714
2715
106
    return modules.at(moduleID);
2716
955
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
861
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
861
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
861
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
861
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
861
    if ( modules.find(moduleID) == modules.end() ) {
2712
773
        return nullptr;
2713
773
    }
2714
2715
88
    return modules.at(moduleID);
2716
861
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
892
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
892
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
892
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
892
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
892
    if ( modules.find(moduleID) == modules.end() ) {
2712
772
        return nullptr;
2713
772
    }
2714
2715
120
    return modules.at(moduleID);
2716
892
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
619
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
619
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
619
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
619
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
619
    if ( modules.find(moduleID) == modules.end() ) {
2712
533
        return nullptr;
2713
533
    }
2714
2715
86
    return modules.at(moduleID);
2716
619
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
893
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
893
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
893
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
893
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
893
    if ( modules.find(moduleID) == modules.end() ) {
2712
783
        return nullptr;
2713
783
    }
2714
2715
110
    return modules.at(moduleID);
2716
893
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
616
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
616
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
616
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
616
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
616
    if ( modules.find(moduleID) == modules.end() ) {
2712
537
        return nullptr;
2713
537
    }
2714
2715
79
    return modules.at(moduleID);
2716
616
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
850
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
850
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
850
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
850
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
850
    if ( modules.find(moduleID) == modules.end() ) {
2712
720
        return nullptr;
2713
720
    }
2714
2715
130
    return modules.at(moduleID);
2716
850
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
684
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
684
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
684
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
684
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
684
    if ( modules.find(moduleID) == modules.end() ) {
2712
576
        return nullptr;
2713
576
    }
2714
2715
108
    return modules.at(moduleID);
2716
684
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
606
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
606
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
606
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
606
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
606
    if ( modules.find(moduleID) == modules.end() ) {
2712
473
        return nullptr;
2713
473
    }
2714
2715
133
    return modules.at(moduleID);
2716
606
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
611
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
611
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
611
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
611
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
611
    if ( modules.find(moduleID) == modules.end() ) {
2712
516
        return nullptr;
2713
516
    }
2714
2715
95
    return modules.at(moduleID);
2716
611
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
638
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
638
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
638
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
638
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
638
    if ( modules.find(moduleID) == modules.end() ) {
2712
523
        return nullptr;
2713
523
    }
2714
2715
115
    return modules.at(moduleID);
2716
638
}
2717
2718
template <class ResultType, class OperationType>
2719
22.0k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
22.0k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
22.0k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
119k
    do {
2725
119k
        auto op = getOp(&parentDs, data, size);
2726
119k
        auto module = getModule(parentDs);
2727
119k
        if ( module == nullptr ) {
2728
75.8k
            continue;
2729
75.8k
        }
2730
2731
43.2k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
43.2k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
925
            break;
2736
925
        }
2737
118k
    } while ( parentDs.Get<bool>() == true );
2738
2739
22.0k
    if ( operations.empty() == true ) {
2740
972
        return;
2741
972
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
21.0k
#if 1
2745
21.0k
    {
2746
21.0k
        std::set<uint64_t> moduleIDs;
2747
54.7k
        for (const auto& m : modules ) {
2748
54.7k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
54.7k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
54.7k
            moduleIDs.insert(moduleID);
2756
54.7k
        }
2757
2758
21.0k
        std::set<uint64_t> operationModuleIDs;
2759
38.5k
        for (const auto& op : operations) {
2760
38.5k
            operationModuleIDs.insert(op.first->ID);
2761
38.5k
        }
2762
2763
21.0k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
21.0k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
21.0k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
35.6k
        for (const auto& id : addModuleIDs) {
2768
35.6k
            operations.push_back({ modules.at(id), operations[0].second});
2769
35.6k
        }
2770
21.0k
    }
2771
21.0k
#endif
2772
2773
21.0k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
21.0k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
95.3k
    for (size_t i = 0; i < operations.size(); i++) {
2781
74.2k
        auto& operation = operations[i];
2782
2783
74.2k
        auto& module = operation.first;
2784
74.2k
        auto& op = operation.second;
2785
2786
74.2k
        if ( i > 0 ) {
2787
55.9k
            auto& prevModule = operations[i-1].first;
2788
55.9k
            auto& prevOp = operations[i].second;
2789
2790
55.9k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
18.9k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
18.9k
                if ( curModifier.size() == 0 ) {
2793
5.35M
                    for (size_t j = 0; j < 512; j++) {
2794
5.34M
                        curModifier.push_back(1);
2795
5.34M
                    }
2796
10.4k
                } else {
2797
1.27M
                    for (auto& c : curModifier) {
2798
1.27M
                        c++;
2799
1.27M
                    }
2800
8.53k
                }
2801
18.9k
            }
2802
55.9k
        }
2803
2804
74.2k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
74.2k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
74.2k
        const auto& result = results.back();
2811
2812
74.2k
        if ( result.second != std::nullopt ) {
2813
30.5k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
30.5k
        }
2820
2821
74.2k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
74.2k
        if ( options.disableTests == false ) {
2830
74.2k
            tests::test(op, result.second);
2831
74.2k
        }
2832
2833
74.2k
        postprocess(module, op, result);
2834
74.2k
    }
2835
2836
21.0k
    if ( options.noCompare == false ) {
2837
18.2k
        compare(operations, results, data, size);
2838
18.2k
    }
2839
21.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
586
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
586
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
586
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.28k
    do {
2725
2.28k
        auto op = getOp(&parentDs, data, size);
2726
2.28k
        auto module = getModule(parentDs);
2727
2.28k
        if ( module == nullptr ) {
2728
1.07k
            continue;
2729
1.07k
        }
2730
2731
1.21k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.21k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
2.28k
    } while ( parentDs.Get<bool>() == true );
2738
2739
586
    if ( operations.empty() == true ) {
2740
23
        return;
2741
23
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
563
#if 1
2745
563
    {
2746
563
        std::set<uint64_t> moduleIDs;
2747
1.56k
        for (const auto& m : modules ) {
2748
1.56k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.56k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.56k
            moduleIDs.insert(moduleID);
2756
1.56k
        }
2757
2758
563
        std::set<uint64_t> operationModuleIDs;
2759
1.11k
        for (const auto& op : operations) {
2760
1.11k
            operationModuleIDs.insert(op.first->ID);
2761
1.11k
        }
2762
2763
563
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
563
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
563
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.03k
        for (const auto& id : addModuleIDs) {
2768
1.03k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.03k
        }
2770
563
    }
2771
563
#endif
2772
2773
563
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
563
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.71k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.14k
        auto& operation = operations[i];
2782
2783
2.14k
        auto& module = operation.first;
2784
2.14k
        auto& op = operation.second;
2785
2786
2.14k
        if ( i > 0 ) {
2787
1.62k
            auto& prevModule = operations[i-1].first;
2788
1.62k
            auto& prevOp = operations[i].second;
2789
2790
1.62k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
571
                auto& curModifier = op.modifier.GetVectorPtr();
2792
571
                if ( curModifier.size() == 0 ) {
2793
259k
                    for (size_t j = 0; j < 512; j++) {
2794
259k
                        curModifier.push_back(1);
2795
259k
                    }
2796
506
                } else {
2797
5.85k
                    for (auto& c : curModifier) {
2798
5.85k
                        c++;
2799
5.85k
                    }
2800
65
                }
2801
571
            }
2802
1.62k
        }
2803
2804
2.14k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.14k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.14k
        const auto& result = results.back();
2811
2812
2.14k
        if ( result.second != std::nullopt ) {
2813
1.12k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
1.12k
        }
2820
2821
2.14k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2.14k
        if ( options.disableTests == false ) {
2830
2.14k
            tests::test(op, result.second);
2831
2.14k
        }
2832
2833
2.14k
        postprocess(module, op, result);
2834
2.14k
    }
2835
2836
563
    if ( options.noCompare == false ) {
2837
521
        compare(operations, results, data, size);
2838
521
    }
2839
563
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
491
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
491
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
491
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.28k
    do {
2725
2.28k
        auto op = getOp(&parentDs, data, size);
2726
2.28k
        auto module = getModule(parentDs);
2727
2.28k
        if ( module == nullptr ) {
2728
909
            continue;
2729
909
        }
2730
2731
1.37k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.37k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
2.28k
    } while ( parentDs.Get<bool>() == true );
2738
2739
491
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
484
#if 1
2745
484
    {
2746
484
        std::set<uint64_t> moduleIDs;
2747
1.33k
        for (const auto& m : modules ) {
2748
1.33k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.33k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.33k
            moduleIDs.insert(moduleID);
2756
1.33k
        }
2757
2758
484
        std::set<uint64_t> operationModuleIDs;
2759
1.21k
        for (const auto& op : operations) {
2760
1.21k
            operationModuleIDs.insert(op.first->ID);
2761
1.21k
        }
2762
2763
484
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
484
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
484
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
869
        for (const auto& id : addModuleIDs) {
2768
869
            operations.push_back({ modules.at(id), operations[0].second});
2769
869
        }
2770
484
    }
2771
484
#endif
2772
2773
484
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
484
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.56k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.08k
        auto& operation = operations[i];
2782
2783
2.08k
        auto& module = operation.first;
2784
2.08k
        auto& op = operation.second;
2785
2786
2.08k
        if ( i > 0 ) {
2787
1.63k
            auto& prevModule = operations[i-1].first;
2788
1.63k
            auto& prevOp = operations[i].second;
2789
2790
1.63k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
738
                auto& curModifier = op.modifier.GetVectorPtr();
2792
738
                if ( curModifier.size() == 0 ) {
2793
302k
                    for (size_t j = 0; j < 512; j++) {
2794
301k
                        curModifier.push_back(1);
2795
301k
                    }
2796
589
                } else {
2797
52.9k
                    for (auto& c : curModifier) {
2798
52.9k
                        c++;
2799
52.9k
                    }
2800
149
                }
2801
738
            }
2802
1.63k
        }
2803
2804
2.08k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.08k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.08k
        const auto& result = results.back();
2811
2812
2.08k
        if ( result.second != std::nullopt ) {
2813
1.23k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
1.23k
        }
2820
2821
2.08k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2.08k
        if ( options.disableTests == false ) {
2830
2.08k
            tests::test(op, result.second);
2831
2.08k
        }
2832
2833
2.08k
        postprocess(module, op, result);
2834
2.08k
    }
2835
2836
484
    if ( options.noCompare == false ) {
2837
444
        compare(operations, results, data, size);
2838
444
    }
2839
484
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
77
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
77
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
77
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
926
    do {
2725
926
        auto op = getOp(&parentDs, data, size);
2726
926
        auto module = getModule(parentDs);
2727
926
        if ( module == nullptr ) {
2728
613
            continue;
2729
613
        }
2730
2731
313
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
313
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
925
    } while ( parentDs.Get<bool>() == true );
2738
2739
77
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
71
#if 1
2745
71
    {
2746
71
        std::set<uint64_t> moduleIDs;
2747
96
        for (const auto& m : modules ) {
2748
96
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
96
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
96
            moduleIDs.insert(moduleID);
2756
96
        }
2757
2758
71
        std::set<uint64_t> operationModuleIDs;
2759
190
        for (const auto& op : operations) {
2760
190
            operationModuleIDs.insert(op.first->ID);
2761
190
        }
2762
2763
71
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
71
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
71
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
71
        for (const auto& id : addModuleIDs) {
2768
48
            operations.push_back({ modules.at(id), operations[0].second});
2769
48
        }
2770
71
    }
2771
71
#endif
2772
2773
71
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
71
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
309
    for (size_t i = 0; i < operations.size(); i++) {
2781
238
        auto& operation = operations[i];
2782
2783
238
        auto& module = operation.first;
2784
238
        auto& op = operation.second;
2785
2786
238
        if ( i > 0 ) {
2787
206
            auto& prevModule = operations[i-1].first;
2788
206
            auto& prevOp = operations[i].second;
2789
2790
206
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
137
                auto& curModifier = op.modifier.GetVectorPtr();
2792
137
                if ( curModifier.size() == 0 ) {
2793
9.74k
                    for (size_t j = 0; j < 512; j++) {
2794
9.72k
                        curModifier.push_back(1);
2795
9.72k
                    }
2796
118
                } else {
2797
1.08k
                    for (auto& c : curModifier) {
2798
1.08k
                        c++;
2799
1.08k
                    }
2800
118
                }
2801
137
            }
2802
206
        }
2803
2804
238
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
238
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
238
        const auto& result = results.back();
2811
2812
238
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
238
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
238
        if ( options.disableTests == false ) {
2830
238
            tests::test(op, result.second);
2831
238
        }
2832
2833
238
        postprocess(module, op, result);
2834
238
    }
2835
2836
71
    if ( options.noCompare == false ) {
2837
32
        compare(operations, results, data, size);
2838
32
    }
2839
71
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.11k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.11k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.11k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.45k
    do {
2725
5.45k
        auto op = getOp(&parentDs, data, size);
2726
5.45k
        auto module = getModule(parentDs);
2727
5.45k
        if ( module == nullptr ) {
2728
2.35k
            continue;
2729
2.35k
        }
2730
2731
3.09k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.09k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
5.45k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.11k
    if ( operations.empty() == true ) {
2740
27
        return;
2741
27
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.08k
#if 1
2745
1.08k
    {
2746
1.08k
        std::set<uint64_t> moduleIDs;
2747
3.09k
        for (const auto& m : modules ) {
2748
3.09k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.09k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.09k
            moduleIDs.insert(moduleID);
2756
3.09k
        }
2757
2758
1.08k
        std::set<uint64_t> operationModuleIDs;
2759
2.88k
        for (const auto& op : operations) {
2760
2.88k
            operationModuleIDs.insert(op.first->ID);
2761
2.88k
        }
2762
2763
1.08k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.08k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.08k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.04k
        for (const auto& id : addModuleIDs) {
2768
2.04k
            operations.push_back({ modules.at(id), operations[0].second});
2769
2.04k
        }
2770
1.08k
    }
2771
1.08k
#endif
2772
2773
1.08k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.08k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
6.01k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.92k
        auto& operation = operations[i];
2782
2783
4.92k
        auto& module = operation.first;
2784
4.92k
        auto& op = operation.second;
2785
2786
4.92k
        if ( i > 0 ) {
2787
3.89k
            auto& prevModule = operations[i-1].first;
2788
3.89k
            auto& prevOp = operations[i].second;
2789
2790
3.89k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.78k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.78k
                if ( curModifier.size() == 0 ) {
2793
849k
                    for (size_t j = 0; j < 512; j++) {
2794
847k
                        curModifier.push_back(1);
2795
847k
                    }
2796
1.65k
                } else {
2797
20.6k
                    for (auto& c : curModifier) {
2798
20.6k
                        c++;
2799
20.6k
                    }
2800
125
                }
2801
1.78k
            }
2802
3.89k
        }
2803
2804
4.92k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.92k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.92k
        const auto& result = results.back();
2811
2812
4.92k
        if ( result.second != std::nullopt ) {
2813
864
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
864
        }
2820
2821
4.92k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
4.92k
        if ( options.disableTests == false ) {
2830
4.92k
            tests::test(op, result.second);
2831
4.92k
        }
2832
2833
4.92k
        postprocess(module, op, result);
2834
4.92k
    }
2835
2836
1.08k
    if ( options.noCompare == false ) {
2837
1.03k
        compare(operations, results, data, size);
2838
1.03k
    }
2839
1.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
800
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
800
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
800
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.70k
    do {
2725
5.70k
        auto op = getOp(&parentDs, data, size);
2726
5.70k
        auto module = getModule(parentDs);
2727
5.70k
        if ( module == nullptr ) {
2728
3.27k
            continue;
2729
3.27k
        }
2730
2731
2.43k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.43k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
5.69k
    } while ( parentDs.Get<bool>() == true );
2738
2739
800
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
786
#if 1
2745
786
    {
2746
786
        std::set<uint64_t> moduleIDs;
2747
2.24k
        for (const auto& m : modules ) {
2748
2.24k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.24k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.24k
            moduleIDs.insert(moduleID);
2756
2.24k
        }
2757
2758
786
        std::set<uint64_t> operationModuleIDs;
2759
2.33k
        for (const auto& op : operations) {
2760
2.33k
            operationModuleIDs.insert(op.first->ID);
2761
2.33k
        }
2762
2763
786
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
786
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
786
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.48k
        for (const auto& id : addModuleIDs) {
2768
1.48k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.48k
        }
2770
786
    }
2771
786
#endif
2772
2773
786
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
786
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
4.60k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.81k
        auto& operation = operations[i];
2782
2783
3.81k
        auto& module = operation.first;
2784
3.81k
        auto& op = operation.second;
2785
2786
3.81k
        if ( i > 0 ) {
2787
3.07k
            auto& prevModule = operations[i-1].first;
2788
3.07k
            auto& prevOp = operations[i].second;
2789
2790
3.07k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.56k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.56k
                if ( curModifier.size() == 0 ) {
2793
568k
                    for (size_t j = 0; j < 512; j++) {
2794
567k
                        curModifier.push_back(1);
2795
567k
                    }
2796
1.10k
                } else {
2797
9.20k
                    for (auto& c : curModifier) {
2798
9.20k
                        c++;
2799
9.20k
                    }
2800
458
                }
2801
1.56k
            }
2802
3.07k
        }
2803
2804
3.81k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.81k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.81k
        const auto& result = results.back();
2811
2812
3.81k
        if ( result.second != std::nullopt ) {
2813
962
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
962
        }
2820
2821
3.81k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
3.81k
        if ( options.disableTests == false ) {
2830
3.81k
            tests::test(op, result.second);
2831
3.81k
        }
2832
2833
3.81k
        postprocess(module, op, result);
2834
3.81k
    }
2835
2836
786
    if ( options.noCompare == false ) {
2837
749
        compare(operations, results, data, size);
2838
749
    }
2839
786
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
656
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
656
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
656
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.68k
    do {
2725
3.68k
        auto op = getOp(&parentDs, data, size);
2726
3.68k
        auto module = getModule(parentDs);
2727
3.68k
        if ( module == nullptr ) {
2728
1.79k
            continue;
2729
1.79k
        }
2730
2731
1.89k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.89k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
3.68k
    } while ( parentDs.Get<bool>() == true );
2738
2739
656
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
641
#if 1
2745
641
    {
2746
641
        std::set<uint64_t> moduleIDs;
2747
1.79k
        for (const auto& m : modules ) {
2748
1.79k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.79k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.79k
            moduleIDs.insert(moduleID);
2756
1.79k
        }
2757
2758
641
        std::set<uint64_t> operationModuleIDs;
2759
1.77k
        for (const auto& op : operations) {
2760
1.77k
            operationModuleIDs.insert(op.first->ID);
2761
1.77k
        }
2762
2763
641
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
641
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
641
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.18k
        for (const auto& id : addModuleIDs) {
2768
1.18k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.18k
        }
2770
641
    }
2771
641
#endif
2772
2773
641
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
641
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.59k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.95k
        auto& operation = operations[i];
2782
2783
2.95k
        auto& module = operation.first;
2784
2.95k
        auto& op = operation.second;
2785
2786
2.95k
        if ( i > 0 ) {
2787
2.35k
            auto& prevModule = operations[i-1].first;
2788
2.35k
            auto& prevOp = operations[i].second;
2789
2790
2.35k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.14k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.14k
                if ( curModifier.size() == 0 ) {
2793
446k
                    for (size_t j = 0; j < 512; j++) {
2794
445k
                        curModifier.push_back(1);
2795
445k
                    }
2796
870
                } else {
2797
8.00k
                    for (auto& c : curModifier) {
2798
8.00k
                        c++;
2799
8.00k
                    }
2800
278
                }
2801
1.14k
            }
2802
2.35k
        }
2803
2804
2.95k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.95k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.95k
        const auto& result = results.back();
2811
2812
2.95k
        if ( result.second != std::nullopt ) {
2813
333
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
333
        }
2820
2821
2.95k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2.95k
        if ( options.disableTests == false ) {
2830
2.95k
            tests::test(op, result.second);
2831
2.95k
        }
2832
2833
2.95k
        postprocess(module, op, result);
2834
2.95k
    }
2835
2836
641
    if ( options.noCompare == false ) {
2837
598
        compare(operations, results, data, size);
2838
598
    }
2839
641
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
149
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
149
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
149
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.14k
    do {
2725
1.14k
        auto op = getOp(&parentDs, data, size);
2726
1.14k
        auto module = getModule(parentDs);
2727
1.14k
        if ( module == nullptr ) {
2728
719
            continue;
2729
719
        }
2730
2731
430
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
430
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
1.14k
    } while ( parentDs.Get<bool>() == true );
2738
2739
149
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
131
#if 1
2745
131
    {
2746
131
        std::set<uint64_t> moduleIDs;
2747
285
        for (const auto& m : modules ) {
2748
285
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
285
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
285
            moduleIDs.insert(moduleID);
2756
285
        }
2757
2758
131
        std::set<uint64_t> operationModuleIDs;
2759
360
        for (const auto& op : operations) {
2760
360
            operationModuleIDs.insert(op.first->ID);
2761
360
        }
2762
2763
131
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
131
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
131
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
173
        for (const auto& id : addModuleIDs) {
2768
173
            operations.push_back({ modules.at(id), operations[0].second});
2769
173
        }
2770
131
    }
2771
131
#endif
2772
2773
131
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
131
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
664
    for (size_t i = 0; i < operations.size(); i++) {
2781
533
        auto& operation = operations[i];
2782
2783
533
        auto& module = operation.first;
2784
533
        auto& op = operation.second;
2785
2786
533
        if ( i > 0 ) {
2787
438
            auto& prevModule = operations[i-1].first;
2788
438
            auto& prevOp = operations[i].second;
2789
2790
438
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
234
                auto& curModifier = op.modifier.GetVectorPtr();
2792
234
                if ( curModifier.size() == 0 ) {
2793
100k
                    for (size_t j = 0; j < 512; j++) {
2794
100k
                        curModifier.push_back(1);
2795
100k
                    }
2796
196
                } else {
2797
3.07k
                    for (auto& c : curModifier) {
2798
3.07k
                        c++;
2799
3.07k
                    }
2800
38
                }
2801
234
            }
2802
438
        }
2803
2804
533
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
533
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
533
        const auto& result = results.back();
2811
2812
533
        if ( result.second != std::nullopt ) {
2813
126
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
126
        }
2820
2821
533
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
533
        if ( options.disableTests == false ) {
2830
533
            tests::test(op, result.second);
2831
533
        }
2832
2833
533
        postprocess(module, op, result);
2834
533
    }
2835
2836
131
    if ( options.noCompare == false ) {
2837
95
        compare(operations, results, data, size);
2838
95
    }
2839
131
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
273
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
273
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
273
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.57k
    do {
2725
1.57k
        auto op = getOp(&parentDs, data, size);
2726
1.57k
        auto module = getModule(parentDs);
2727
1.57k
        if ( module == nullptr ) {
2728
1.01k
            continue;
2729
1.01k
        }
2730
2731
560
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
560
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
1.57k
    } while ( parentDs.Get<bool>() == true );
2738
2739
273
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
258
#if 1
2745
258
    {
2746
258
        std::set<uint64_t> moduleIDs;
2747
642
        for (const auto& m : modules ) {
2748
642
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
642
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
642
            moduleIDs.insert(moduleID);
2756
642
        }
2757
2758
258
        std::set<uint64_t> operationModuleIDs;
2759
487
        for (const auto& op : operations) {
2760
487
            operationModuleIDs.insert(op.first->ID);
2761
487
        }
2762
2763
258
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
258
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
258
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
408
        for (const auto& id : addModuleIDs) {
2768
408
            operations.push_back({ modules.at(id), operations[0].second});
2769
408
        }
2770
258
    }
2771
258
#endif
2772
2773
258
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
258
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.15k
    for (size_t i = 0; i < operations.size(); i++) {
2781
895
        auto& operation = operations[i];
2782
2783
895
        auto& module = operation.first;
2784
895
        auto& op = operation.second;
2785
2786
895
        if ( i > 0 ) {
2787
681
            auto& prevModule = operations[i-1].first;
2788
681
            auto& prevOp = operations[i].second;
2789
2790
681
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
214
                auto& curModifier = op.modifier.GetVectorPtr();
2792
214
                if ( curModifier.size() == 0 ) {
2793
57.4k
                    for (size_t j = 0; j < 512; j++) {
2794
57.3k
                        curModifier.push_back(1);
2795
57.3k
                    }
2796
112
                } else {
2797
21.6k
                    for (auto& c : curModifier) {
2798
21.6k
                        c++;
2799
21.6k
                    }
2800
102
                }
2801
214
            }
2802
681
        }
2803
2804
895
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
895
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
895
        const auto& result = results.back();
2811
2812
895
        if ( result.second != std::nullopt ) {
2813
267
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
267
        }
2820
2821
895
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
895
        if ( options.disableTests == false ) {
2830
895
            tests::test(op, result.second);
2831
895
        }
2832
2833
895
        postprocess(module, op, result);
2834
895
    }
2835
2836
258
    if ( options.noCompare == false ) {
2837
214
        compare(operations, results, data, size);
2838
214
    }
2839
258
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
90
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
90
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
90
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.05k
    do {
2725
1.05k
        auto op = getOp(&parentDs, data, size);
2726
1.05k
        auto module = getModule(parentDs);
2727
1.05k
        if ( module == nullptr ) {
2728
711
            continue;
2729
711
        }
2730
2731
345
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
345
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
1.05k
    } while ( parentDs.Get<bool>() == true );
2738
2739
90
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
85
#if 1
2745
85
    {
2746
85
        std::set<uint64_t> moduleIDs;
2747
147
        for (const auto& m : modules ) {
2748
147
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
147
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
147
            moduleIDs.insert(moduleID);
2756
147
        }
2757
2758
85
        std::set<uint64_t> operationModuleIDs;
2759
224
        for (const auto& op : operations) {
2760
224
            operationModuleIDs.insert(op.first->ID);
2761
224
        }
2762
2763
85
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
85
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
85
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
87
        for (const auto& id : addModuleIDs) {
2768
87
            operations.push_back({ modules.at(id), operations[0].second});
2769
87
        }
2770
85
    }
2771
85
#endif
2772
2773
85
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
85
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
396
    for (size_t i = 0; i < operations.size(); i++) {
2781
311
        auto& operation = operations[i];
2782
2783
311
        auto& module = operation.first;
2784
311
        auto& op = operation.second;
2785
2786
311
        if ( i > 0 ) {
2787
262
            auto& prevModule = operations[i-1].first;
2788
262
            auto& prevOp = operations[i].second;
2789
2790
262
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
163
                auto& curModifier = op.modifier.GetVectorPtr();
2792
163
                if ( curModifier.size() == 0 ) {
2793
51.3k
                    for (size_t j = 0; j < 512; j++) {
2794
51.2k
                        curModifier.push_back(1);
2795
51.2k
                    }
2796
100
                } else {
2797
1.59k
                    for (auto& c : curModifier) {
2798
1.59k
                        c++;
2799
1.59k
                    }
2800
63
                }
2801
163
            }
2802
262
        }
2803
2804
311
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
311
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
311
        const auto& result = results.back();
2811
2812
311
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
311
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
311
        if ( options.disableTests == false ) {
2830
311
            tests::test(op, result.second);
2831
311
        }
2832
2833
311
        postprocess(module, op, result);
2834
311
    }
2835
2836
85
    if ( options.noCompare == false ) {
2837
49
        compare(operations, results, data, size);
2838
49
    }
2839
85
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
75
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
75
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
75
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
863
    do {
2725
863
        auto op = getOp(&parentDs, data, size);
2726
863
        auto module = getModule(parentDs);
2727
863
        if ( module == nullptr ) {
2728
609
            continue;
2729
609
        }
2730
2731
254
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
254
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
863
    } while ( parentDs.Get<bool>() == true );
2738
2739
75
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
65
#if 1
2745
65
    {
2746
65
        std::set<uint64_t> moduleIDs;
2747
105
        for (const auto& m : modules ) {
2748
105
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
105
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
105
            moduleIDs.insert(moduleID);
2756
105
        }
2757
2758
65
        std::set<uint64_t> operationModuleIDs;
2759
172
        for (const auto& op : operations) {
2760
172
            operationModuleIDs.insert(op.first->ID);
2761
172
        }
2762
2763
65
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
65
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
65
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
65
        for (const auto& id : addModuleIDs) {
2768
63
            operations.push_back({ modules.at(id), operations[0].second});
2769
63
        }
2770
65
    }
2771
65
#endif
2772
2773
65
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
65
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
300
    for (size_t i = 0; i < operations.size(); i++) {
2781
235
        auto& operation = operations[i];
2782
2783
235
        auto& module = operation.first;
2784
235
        auto& op = operation.second;
2785
2786
235
        if ( i > 0 ) {
2787
200
            auto& prevModule = operations[i-1].first;
2788
200
            auto& prevOp = operations[i].second;
2789
2790
200
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
119
                auto& curModifier = op.modifier.GetVectorPtr();
2792
119
                if ( curModifier.size() == 0 ) {
2793
17.4k
                    for (size_t j = 0; j < 512; j++) {
2794
17.4k
                        curModifier.push_back(1);
2795
17.4k
                    }
2796
85
                } else {
2797
11.6k
                    for (auto& c : curModifier) {
2798
11.6k
                        c++;
2799
11.6k
                    }
2800
85
                }
2801
119
            }
2802
200
        }
2803
2804
235
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
235
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
235
        const auto& result = results.back();
2811
2812
235
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
235
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
235
        if ( options.disableTests == false ) {
2830
235
            tests::test(op, result.second);
2831
235
        }
2832
2833
235
        postprocess(module, op, result);
2834
235
    }
2835
2836
65
    if ( options.noCompare == false ) {
2837
35
        compare(operations, results, data, size);
2838
35
    }
2839
65
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
82
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
82
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
82
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.38k
    do {
2725
1.38k
        auto op = getOp(&parentDs, data, size);
2726
1.38k
        auto module = getModule(parentDs);
2727
1.38k
        if ( module == nullptr ) {
2728
1.10k
            continue;
2729
1.10k
        }
2730
2731
281
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
281
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
1.38k
    } while ( parentDs.Get<bool>() == true );
2738
2739
82
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
69
#if 1
2745
69
    {
2746
69
        std::set<uint64_t> moduleIDs;
2747
114
        for (const auto& m : modules ) {
2748
114
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
114
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
114
            moduleIDs.insert(moduleID);
2756
114
        }
2757
2758
69
        std::set<uint64_t> operationModuleIDs;
2759
210
        for (const auto& op : operations) {
2760
210
            operationModuleIDs.insert(op.first->ID);
2761
210
        }
2762
2763
69
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
69
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
69
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
69
        for (const auto& id : addModuleIDs) {
2768
63
            operations.push_back({ modules.at(id), operations[0].second});
2769
63
        }
2770
69
    }
2771
69
#endif
2772
2773
69
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
69
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
342
    for (size_t i = 0; i < operations.size(); i++) {
2781
273
        auto& operation = operations[i];
2782
2783
273
        auto& module = operation.first;
2784
273
        auto& op = operation.second;
2785
2786
273
        if ( i > 0 ) {
2787
235
            auto& prevModule = operations[i-1].first;
2788
235
            auto& prevOp = operations[i].second;
2789
2790
235
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
147
                auto& curModifier = op.modifier.GetVectorPtr();
2792
147
                if ( curModifier.size() == 0 ) {
2793
37.4k
                    for (size_t j = 0; j < 512; j++) {
2794
37.3k
                        curModifier.push_back(1);
2795
37.3k
                    }
2796
74
                } else {
2797
425
                    for (auto& c : curModifier) {
2798
425
                        c++;
2799
425
                    }
2800
74
                }
2801
147
            }
2802
235
        }
2803
2804
273
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
273
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
273
        const auto& result = results.back();
2811
2812
273
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
273
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
273
        if ( options.disableTests == false ) {
2830
273
            tests::test(op, result.second);
2831
273
        }
2832
2833
273
        postprocess(module, op, result);
2834
273
    }
2835
2836
69
    if ( options.noCompare == false ) {
2837
38
        compare(operations, results, data, size);
2838
38
    }
2839
69
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
316
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
316
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
316
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.27k
    do {
2725
1.27k
        auto op = getOp(&parentDs, data, size);
2726
1.27k
        auto module = getModule(parentDs);
2727
1.27k
        if ( module == nullptr ) {
2728
710
            continue;
2729
710
        }
2730
2731
561
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
561
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
1.27k
    } while ( parentDs.Get<bool>() == true );
2738
2739
316
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
304
#if 1
2745
304
    {
2746
304
        std::set<uint64_t> moduleIDs;
2747
795
        for (const auto& m : modules ) {
2748
795
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
795
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
795
            moduleIDs.insert(moduleID);
2756
795
        }
2757
2758
304
        std::set<uint64_t> operationModuleIDs;
2759
502
        for (const auto& op : operations) {
2760
502
            operationModuleIDs.insert(op.first->ID);
2761
502
        }
2762
2763
304
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
304
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
304
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
522
        for (const auto& id : addModuleIDs) {
2768
522
            operations.push_back({ modules.at(id), operations[0].second});
2769
522
        }
2770
304
    }
2771
304
#endif
2772
2773
304
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
304
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.32k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.02k
        auto& operation = operations[i];
2782
2783
1.02k
        auto& module = operation.first;
2784
1.02k
        auto& op = operation.second;
2785
2786
1.02k
        if ( i > 0 ) {
2787
759
            auto& prevModule = operations[i-1].first;
2788
759
            auto& prevOp = operations[i].second;
2789
2790
759
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
226
                auto& curModifier = op.modifier.GetVectorPtr();
2792
226
                if ( curModifier.size() == 0 ) {
2793
64.1k
                    for (size_t j = 0; j < 512; j++) {
2794
64.0k
                        curModifier.push_back(1);
2795
64.0k
                    }
2796
125
                } else {
2797
23.4k
                    for (auto& c : curModifier) {
2798
23.4k
                        c++;
2799
23.4k
                    }
2800
101
                }
2801
226
            }
2802
759
        }
2803
2804
1.02k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.02k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.02k
        const auto& result = results.back();
2811
2812
1.02k
        if ( result.second != std::nullopt ) {
2813
330
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
330
        }
2820
2821
1.02k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.02k
        if ( options.disableTests == false ) {
2830
1.02k
            tests::test(op, result.second);
2831
1.02k
        }
2832
2833
1.02k
        postprocess(module, op, result);
2834
1.02k
    }
2835
2836
304
    if ( options.noCompare == false ) {
2837
265
        compare(operations, results, data, size);
2838
265
    }
2839
304
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
265
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
265
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
265
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.07k
    do {
2725
2.07k
        auto op = getOp(&parentDs, data, size);
2726
2.07k
        auto module = getModule(parentDs);
2727
2.07k
        if ( module == nullptr ) {
2728
1.71k
            continue;
2729
1.71k
        }
2730
2731
354
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
354
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
40
            break;
2736
40
        }
2737
2.03k
    } while ( parentDs.Get<bool>() == true );
2738
2739
265
    if ( operations.empty() == true ) {
2740
20
        return;
2741
20
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
245
#if 1
2745
245
    {
2746
245
        std::set<uint64_t> moduleIDs;
2747
612
        for (const auto& m : modules ) {
2748
612
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
612
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
612
            moduleIDs.insert(moduleID);
2756
612
        }
2757
2758
245
        std::set<uint64_t> operationModuleIDs;
2759
314
        for (const auto& op : operations) {
2760
314
            operationModuleIDs.insert(op.first->ID);
2761
314
        }
2762
2763
245
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
245
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
245
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
403
        for (const auto& id : addModuleIDs) {
2768
403
            operations.push_back({ modules.at(id), operations[0].second});
2769
403
        }
2770
245
    }
2771
245
#endif
2772
2773
245
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
245
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
962
    for (size_t i = 0; i < operations.size(); i++) {
2781
717
        auto& operation = operations[i];
2782
2783
717
        auto& module = operation.first;
2784
717
        auto& op = operation.second;
2785
2786
717
        if ( i > 0 ) {
2787
513
            auto& prevModule = operations[i-1].first;
2788
513
            auto& prevOp = operations[i].second;
2789
2790
513
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
104
                auto& curModifier = op.modifier.GetVectorPtr();
2792
104
                if ( curModifier.size() == 0 ) {
2793
16.4k
                    for (size_t j = 0; j < 512; j++) {
2794
16.3k
                        curModifier.push_back(1);
2795
16.3k
                    }
2796
72
                } else {
2797
5.18k
                    for (auto& c : curModifier) {
2798
5.18k
                        c++;
2799
5.18k
                    }
2800
72
                }
2801
104
            }
2802
513
        }
2803
2804
717
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
717
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
717
        const auto& result = results.back();
2811
2812
717
        if ( result.second != std::nullopt ) {
2813
244
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
244
        }
2820
2821
717
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
717
        if ( options.disableTests == false ) {
2830
717
            tests::test(op, result.second);
2831
717
        }
2832
2833
717
        postprocess(module, op, result);
2834
717
    }
2835
2836
245
    if ( options.noCompare == false ) {
2837
204
        compare(operations, results, data, size);
2838
204
    }
2839
245
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
56
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
56
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
56
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
650
    do {
2725
650
        auto op = getOp(&parentDs, data, size);
2726
650
        auto module = getModule(parentDs);
2727
650
        if ( module == nullptr ) {
2728
508
            continue;
2729
508
        }
2730
2731
142
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
142
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
650
    } while ( parentDs.Get<bool>() == true );
2738
2739
56
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
49
#if 1
2745
49
    {
2746
49
        std::set<uint64_t> moduleIDs;
2747
81
        for (const auto& m : modules ) {
2748
81
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
81
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
81
            moduleIDs.insert(moduleID);
2756
81
        }
2757
2758
49
        std::set<uint64_t> operationModuleIDs;
2759
107
        for (const auto& op : operations) {
2760
107
            operationModuleIDs.insert(op.first->ID);
2761
107
        }
2762
2763
49
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
49
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
49
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
49
        for (const auto& id : addModuleIDs) {
2768
47
            operations.push_back({ modules.at(id), operations[0].second});
2769
47
        }
2770
49
    }
2771
49
#endif
2772
2773
49
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
49
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
203
    for (size_t i = 0; i < operations.size(); i++) {
2781
154
        auto& operation = operations[i];
2782
2783
154
        auto& module = operation.first;
2784
154
        auto& op = operation.second;
2785
2786
154
        if ( i > 0 ) {
2787
127
            auto& prevModule = operations[i-1].first;
2788
127
            auto& prevOp = operations[i].second;
2789
2790
127
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
62
                auto& curModifier = op.modifier.GetVectorPtr();
2792
62
                if ( curModifier.size() == 0 ) {
2793
22.5k
                    for (size_t j = 0; j < 512; j++) {
2794
22.5k
                        curModifier.push_back(1);
2795
22.5k
                    }
2796
44
                } else {
2797
5.37k
                    for (auto& c : curModifier) {
2798
5.37k
                        c++;
2799
5.37k
                    }
2800
18
                }
2801
62
            }
2802
127
        }
2803
2804
154
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
154
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
154
        const auto& result = results.back();
2811
2812
154
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
154
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
154
        if ( options.disableTests == false ) {
2830
154
            tests::test(op, result.second);
2831
154
        }
2832
2833
154
        postprocess(module, op, result);
2834
154
    }
2835
2836
49
    if ( options.noCompare == false ) {
2837
27
        compare(operations, results, data, size);
2838
27
    }
2839
49
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
65
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
65
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
65
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
954
    do {
2725
954
        auto op = getOp(&parentDs, data, size);
2726
954
        auto module = getModule(parentDs);
2727
954
        if ( module == nullptr ) {
2728
718
            continue;
2729
718
        }
2730
2731
236
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
236
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
953
    } while ( parentDs.Get<bool>() == true );
2738
2739
65
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
54
#if 1
2745
54
    {
2746
54
        std::set<uint64_t> moduleIDs;
2747
81
        for (const auto& m : modules ) {
2748
81
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
81
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
81
            moduleIDs.insert(moduleID);
2756
81
        }
2757
2758
54
        std::set<uint64_t> operationModuleIDs;
2759
169
        for (const auto& op : operations) {
2760
169
            operationModuleIDs.insert(op.first->ID);
2761
169
        }
2762
2763
54
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
54
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
54
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
54
        for (const auto& id : addModuleIDs) {
2768
37
            operations.push_back({ modules.at(id), operations[0].second});
2769
37
        }
2770
54
    }
2771
54
#endif
2772
2773
54
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
54
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
260
    for (size_t i = 0; i < operations.size(); i++) {
2781
206
        auto& operation = operations[i];
2782
2783
206
        auto& module = operation.first;
2784
206
        auto& op = operation.second;
2785
2786
206
        if ( i > 0 ) {
2787
179
            auto& prevModule = operations[i-1].first;
2788
179
            auto& prevOp = operations[i].second;
2789
2790
179
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
76
                auto& curModifier = op.modifier.GetVectorPtr();
2792
76
                if ( curModifier.size() == 0 ) {
2793
10.2k
                    for (size_t j = 0; j < 512; j++) {
2794
10.2k
                        curModifier.push_back(1);
2795
10.2k
                    }
2796
56
                } else {
2797
29.7k
                    for (auto& c : curModifier) {
2798
29.7k
                        c++;
2799
29.7k
                    }
2800
56
                }
2801
76
            }
2802
179
        }
2803
2804
206
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
206
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
206
        const auto& result = results.back();
2811
2812
206
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
206
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
206
        if ( options.disableTests == false ) {
2830
206
            tests::test(op, result.second);
2831
206
        }
2832
2833
206
        postprocess(module, op, result);
2834
206
    }
2835
2836
54
    if ( options.noCompare == false ) {
2837
27
        compare(operations, results, data, size);
2838
27
    }
2839
54
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
44
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
44
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
44
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
449
    do {
2725
449
        auto op = getOp(&parentDs, data, size);
2726
449
        auto module = getModule(parentDs);
2727
449
        if ( module == nullptr ) {
2728
403
            continue;
2729
403
        }
2730
2731
46
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
46
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
443
    } while ( parentDs.Get<bool>() == true );
2738
2739
44
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
40
#if 1
2745
40
    {
2746
40
        std::set<uint64_t> moduleIDs;
2747
40
        for (const auto& m : modules ) {
2748
30
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
30
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
30
            moduleIDs.insert(moduleID);
2756
30
        }
2757
2758
40
        std::set<uint64_t> operationModuleIDs;
2759
40
        for (const auto& op : operations) {
2760
16
            operationModuleIDs.insert(op.first->ID);
2761
16
        }
2762
2763
40
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
40
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
40
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
40
        for (const auto& id : addModuleIDs) {
2768
18
            operations.push_back({ modules.at(id), operations[0].second});
2769
18
        }
2770
40
    }
2771
40
#endif
2772
2773
40
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
40
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
74
    for (size_t i = 0; i < operations.size(); i++) {
2781
34
        auto& operation = operations[i];
2782
2783
34
        auto& module = operation.first;
2784
34
        auto& op = operation.second;
2785
2786
34
        if ( i > 0 ) {
2787
24
            auto& prevModule = operations[i-1].first;
2788
24
            auto& prevOp = operations[i].second;
2789
2790
24
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
4
                auto& curModifier = op.modifier.GetVectorPtr();
2792
4
                if ( curModifier.size() == 0 ) {
2793
1.53k
                    for (size_t j = 0; j < 512; j++) {
2794
1.53k
                        curModifier.push_back(1);
2795
1.53k
                    }
2796
3
                } else {
2797
1
                    for (auto& c : curModifier) {
2798
1
                        c++;
2799
1
                    }
2800
1
                }
2801
4
            }
2802
24
        }
2803
2804
34
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
34
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
34
        const auto& result = results.back();
2811
2812
34
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
34
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
34
        if ( options.disableTests == false ) {
2830
34
            tests::test(op, result.second);
2831
34
        }
2832
2833
34
        postprocess(module, op, result);
2834
34
    }
2835
2836
40
    if ( options.noCompare == false ) {
2837
10
        compare(operations, results, data, size);
2838
10
    }
2839
40
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
275
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
275
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
275
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.64k
    do {
2725
1.64k
        auto op = getOp(&parentDs, data, size);
2726
1.64k
        auto module = getModule(parentDs);
2727
1.64k
        if ( module == nullptr ) {
2728
1.19k
            continue;
2729
1.19k
        }
2730
2731
449
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
449
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
1.64k
    } while ( parentDs.Get<bool>() == true );
2738
2739
275
    if ( operations.empty() == true ) {
2740
16
        return;
2741
16
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
259
#if 1
2745
259
    {
2746
259
        std::set<uint64_t> moduleIDs;
2747
672
        for (const auto& m : modules ) {
2748
672
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
672
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
672
            moduleIDs.insert(moduleID);
2756
672
        }
2757
2758
259
        std::set<uint64_t> operationModuleIDs;
2759
386
        for (const auto& op : operations) {
2760
386
            operationModuleIDs.insert(op.first->ID);
2761
386
        }
2762
2763
259
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
259
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
259
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
432
        for (const auto& id : addModuleIDs) {
2768
432
            operations.push_back({ modules.at(id), operations[0].second});
2769
432
        }
2770
259
    }
2771
259
#endif
2772
2773
259
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
259
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.07k
    for (size_t i = 0; i < operations.size(); i++) {
2781
818
        auto& operation = operations[i];
2782
2783
818
        auto& module = operation.first;
2784
818
        auto& op = operation.second;
2785
2786
818
        if ( i > 0 ) {
2787
594
            auto& prevModule = operations[i-1].first;
2788
594
            auto& prevOp = operations[i].second;
2789
2790
594
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
139
                auto& curModifier = op.modifier.GetVectorPtr();
2792
139
                if ( curModifier.size() == 0 ) {
2793
38.9k
                    for (size_t j = 0; j < 512; j++) {
2794
38.9k
                        curModifier.push_back(1);
2795
38.9k
                    }
2796
76
                } else {
2797
24.0k
                    for (auto& c : curModifier) {
2798
24.0k
                        c++;
2799
24.0k
                    }
2800
63
                }
2801
139
            }
2802
594
        }
2803
2804
818
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
818
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
818
        const auto& result = results.back();
2811
2812
818
        if ( result.second != std::nullopt ) {
2813
224
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
224
        }
2820
2821
818
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
818
        if ( options.disableTests == false ) {
2830
818
            tests::test(op, result.second);
2831
818
        }
2832
2833
818
        postprocess(module, op, result);
2834
818
    }
2835
2836
259
    if ( options.noCompare == false ) {
2837
224
        compare(operations, results, data, size);
2838
224
    }
2839
259
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
66
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
66
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
66
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
553
    do {
2725
553
        auto op = getOp(&parentDs, data, size);
2726
553
        auto module = getModule(parentDs);
2727
553
        if ( module == nullptr ) {
2728
353
            continue;
2729
353
        }
2730
2731
200
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
200
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
553
    } while ( parentDs.Get<bool>() == true );
2738
2739
66
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
59
#if 1
2745
59
    {
2746
59
        std::set<uint64_t> moduleIDs;
2747
78
        for (const auto& m : modules ) {
2748
78
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
78
            moduleIDs.insert(moduleID);
2756
78
        }
2757
2758
59
        std::set<uint64_t> operationModuleIDs;
2759
128
        for (const auto& op : operations) {
2760
128
            operationModuleIDs.insert(op.first->ID);
2761
128
        }
2762
2763
59
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
59
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
59
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
59
        for (const auto& id : addModuleIDs) {
2768
42
            operations.push_back({ modules.at(id), operations[0].second});
2769
42
        }
2770
59
    }
2771
59
#endif
2772
2773
59
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
59
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
229
    for (size_t i = 0; i < operations.size(); i++) {
2781
170
        auto& operation = operations[i];
2782
2783
170
        auto& module = operation.first;
2784
170
        auto& op = operation.second;
2785
2786
170
        if ( i > 0 ) {
2787
144
            auto& prevModule = operations[i-1].first;
2788
144
            auto& prevOp = operations[i].second;
2789
2790
144
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
75
                auto& curModifier = op.modifier.GetVectorPtr();
2792
75
                if ( curModifier.size() == 0 ) {
2793
24.6k
                    for (size_t j = 0; j < 512; j++) {
2794
24.5k
                        curModifier.push_back(1);
2795
24.5k
                    }
2796
48
                } else {
2797
219
                    for (auto& c : curModifier) {
2798
219
                        c++;
2799
219
                    }
2800
27
                }
2801
75
            }
2802
144
        }
2803
2804
170
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
170
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
170
        const auto& result = results.back();
2811
2812
170
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
170
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
170
        if ( options.disableTests == false ) {
2830
170
            tests::test(op, result.second);
2831
170
        }
2832
2833
170
        postprocess(module, op, result);
2834
170
    }
2835
2836
59
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
59
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
56
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
56
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
56
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
589
    do {
2725
589
        auto op = getOp(&parentDs, data, size);
2726
589
        auto module = getModule(parentDs);
2727
589
        if ( module == nullptr ) {
2728
414
            continue;
2729
414
        }
2730
2731
175
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
175
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
589
    } while ( parentDs.Get<bool>() == true );
2738
2739
56
    if ( operations.empty() == true ) {
2740
2
        return;
2741
2
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
54
#if 1
2745
54
    {
2746
54
        std::set<uint64_t> moduleIDs;
2747
66
        for (const auto& m : modules ) {
2748
66
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
66
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
66
            moduleIDs.insert(moduleID);
2756
66
        }
2757
2758
54
        std::set<uint64_t> operationModuleIDs;
2759
97
        for (const auto& op : operations) {
2760
97
            operationModuleIDs.insert(op.first->ID);
2761
97
        }
2762
2763
54
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
54
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
54
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
54
        for (const auto& id : addModuleIDs) {
2768
31
            operations.push_back({ modules.at(id), operations[0].second});
2769
31
        }
2770
54
    }
2771
54
#endif
2772
2773
54
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
54
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
182
    for (size_t i = 0; i < operations.size(); i++) {
2781
128
        auto& operation = operations[i];
2782
2783
128
        auto& module = operation.first;
2784
128
        auto& op = operation.second;
2785
2786
128
        if ( i > 0 ) {
2787
106
            auto& prevModule = operations[i-1].first;
2788
106
            auto& prevOp = operations[i].second;
2789
2790
106
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                if ( curModifier.size() == 0 ) {
2793
12.8k
                    for (size_t j = 0; j < 512; j++) {
2794
12.8k
                        curModifier.push_back(1);
2795
12.8k
                    }
2796
25
                } else {
2797
94
                    for (auto& c : curModifier) {
2798
94
                        c++;
2799
94
                    }
2800
18
                }
2801
43
            }
2802
106
        }
2803
2804
128
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
128
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
128
        const auto& result = results.back();
2811
2812
128
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
128
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
128
        if ( options.disableTests == false ) {
2830
128
            tests::test(op, result.second);
2831
128
        }
2832
2833
128
        postprocess(module, op, result);
2834
128
    }
2835
2836
54
    if ( options.noCompare == false ) {
2837
22
        compare(operations, results, data, size);
2838
22
    }
2839
54
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
205
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
205
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
205
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.04k
    do {
2725
1.04k
        auto op = getOp(&parentDs, data, size);
2726
1.04k
        auto module = getModule(parentDs);
2727
1.04k
        if ( module == nullptr ) {
2728
718
            continue;
2729
718
        }
2730
2731
330
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
330
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
1.03k
    } while ( parentDs.Get<bool>() == true );
2738
2739
205
    if ( operations.empty() == true ) {
2740
26
        return;
2741
26
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
179
#if 1
2745
179
    {
2746
179
        std::set<uint64_t> moduleIDs;
2747
441
        for (const auto& m : modules ) {
2748
441
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
441
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
441
            moduleIDs.insert(moduleID);
2756
441
        }
2757
2758
179
        std::set<uint64_t> operationModuleIDs;
2759
279
        for (const auto& op : operations) {
2760
279
            operationModuleIDs.insert(op.first->ID);
2761
279
        }
2762
2763
179
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
179
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
179
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
279
        for (const auto& id : addModuleIDs) {
2768
279
            operations.push_back({ modules.at(id), operations[0].second});
2769
279
        }
2770
179
    }
2771
179
#endif
2772
2773
179
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
179
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
737
    for (size_t i = 0; i < operations.size(); i++) {
2781
558
        auto& operation = operations[i];
2782
2783
558
        auto& module = operation.first;
2784
558
        auto& op = operation.second;
2785
2786
558
        if ( i > 0 ) {
2787
411
            auto& prevModule = operations[i-1].first;
2788
411
            auto& prevOp = operations[i].second;
2789
2790
411
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
109
                auto& curModifier = op.modifier.GetVectorPtr();
2792
109
                if ( curModifier.size() == 0 ) {
2793
23.0k
                    for (size_t j = 0; j < 512; j++) {
2794
23.0k
                        curModifier.push_back(1);
2795
23.0k
                    }
2796
64
                } else {
2797
29.3k
                    for (auto& c : curModifier) {
2798
29.3k
                        c++;
2799
29.3k
                    }
2800
64
                }
2801
109
            }
2802
411
        }
2803
2804
558
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
558
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
558
        const auto& result = results.back();
2811
2812
558
        if ( result.second != std::nullopt ) {
2813
170
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
170
        }
2820
2821
558
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
558
        if ( options.disableTests == false ) {
2830
558
            tests::test(op, result.second);
2831
558
        }
2832
2833
558
        postprocess(module, op, result);
2834
558
    }
2835
2836
179
    if ( options.noCompare == false ) {
2837
147
        compare(operations, results, data, size);
2838
147
    }
2839
179
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
139
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
139
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
139
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
983
    do {
2725
983
        auto op = getOp(&parentDs, data, size);
2726
983
        auto module = getModule(parentDs);
2727
983
        if ( module == nullptr ) {
2728
793
            continue;
2729
793
        }
2730
2731
190
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
190
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
978
    } while ( parentDs.Get<bool>() == true );
2738
2739
139
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
127
#if 1
2745
127
    {
2746
127
        std::set<uint64_t> moduleIDs;
2747
270
        for (const auto& m : modules ) {
2748
270
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
270
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
270
            moduleIDs.insert(moduleID);
2756
270
        }
2757
2758
127
        std::set<uint64_t> operationModuleIDs;
2759
146
        for (const auto& op : operations) {
2760
146
            operationModuleIDs.insert(op.first->ID);
2761
146
        }
2762
2763
127
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
127
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
127
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
177
        for (const auto& id : addModuleIDs) {
2768
177
            operations.push_back({ modules.at(id), operations[0].second});
2769
177
        }
2770
127
    }
2771
127
#endif
2772
2773
127
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
127
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
450
    for (size_t i = 0; i < operations.size(); i++) {
2781
323
        auto& operation = operations[i];
2782
2783
323
        auto& module = operation.first;
2784
323
        auto& op = operation.second;
2785
2786
323
        if ( i > 0 ) {
2787
233
            auto& prevModule = operations[i-1].first;
2788
233
            auto& prevOp = operations[i].second;
2789
2790
233
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
50
                auto& curModifier = op.modifier.GetVectorPtr();
2792
50
                if ( curModifier.size() == 0 ) {
2793
14.8k
                    for (size_t j = 0; j < 512; j++) {
2794
14.8k
                        curModifier.push_back(1);
2795
14.8k
                    }
2796
29
                } else {
2797
21.0k
                    for (auto& c : curModifier) {
2798
21.0k
                        c++;
2799
21.0k
                    }
2800
21
                }
2801
50
            }
2802
233
        }
2803
2804
323
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
323
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
323
        const auto& result = results.back();
2811
2812
323
        if ( result.second != std::nullopt ) {
2813
26
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
26
        }
2820
2821
323
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
323
        if ( options.disableTests == false ) {
2830
323
            tests::test(op, result.second);
2831
323
        }
2832
2833
323
        postprocess(module, op, result);
2834
323
    }
2835
2836
127
    if ( options.noCompare == false ) {
2837
90
        compare(operations, results, data, size);
2838
90
    }
2839
127
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
320
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
320
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
320
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
968
    do {
2725
968
        auto op = getOp(&parentDs, data, size);
2726
968
        auto module = getModule(parentDs);
2727
968
        if ( module == nullptr ) {
2728
560
            continue;
2729
560
        }
2730
2731
408
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
408
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
963
    } while ( parentDs.Get<bool>() == true );
2738
2739
320
    if ( operations.empty() == true ) {
2740
35
        return;
2741
35
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
285
#if 1
2745
285
    {
2746
285
        std::set<uint64_t> moduleIDs;
2747
750
        for (const auto& m : modules ) {
2748
750
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
750
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
750
            moduleIDs.insert(moduleID);
2756
750
        }
2757
2758
285
        std::set<uint64_t> operationModuleIDs;
2759
363
        for (const auto& op : operations) {
2760
363
            operationModuleIDs.insert(op.first->ID);
2761
363
        }
2762
2763
285
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
285
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
285
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
488
        for (const auto& id : addModuleIDs) {
2768
488
            operations.push_back({ modules.at(id), operations[0].second});
2769
488
        }
2770
285
    }
2771
285
#endif
2772
2773
285
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
285
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.13k
    for (size_t i = 0; i < operations.size(); i++) {
2781
851
        auto& operation = operations[i];
2782
2783
851
        auto& module = operation.first;
2784
851
        auto& op = operation.second;
2785
2786
851
        if ( i > 0 ) {
2787
601
            auto& prevModule = operations[i-1].first;
2788
601
            auto& prevOp = operations[i].second;
2789
2790
601
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
99
                auto& curModifier = op.modifier.GetVectorPtr();
2792
99
                if ( curModifier.size() == 0 ) {
2793
29.7k
                    for (size_t j = 0; j < 512; j++) {
2794
29.6k
                        curModifier.push_back(1);
2795
29.6k
                    }
2796
58
                } else {
2797
37.0k
                    for (auto& c : curModifier) {
2798
37.0k
                        c++;
2799
37.0k
                    }
2800
41
                }
2801
99
            }
2802
601
        }
2803
2804
851
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
851
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
851
        const auto& result = results.back();
2811
2812
851
        if ( result.second != std::nullopt ) {
2813
360
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
360
        }
2820
2821
851
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
851
        if ( options.disableTests == false ) {
2830
851
            tests::test(op, result.second);
2831
851
        }
2832
2833
851
        postprocess(module, op, result);
2834
851
    }
2835
2836
285
    if ( options.noCompare == false ) {
2837
250
        compare(operations, results, data, size);
2838
250
    }
2839
285
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
54
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
54
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
54
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
510
    do {
2725
510
        auto op = getOp(&parentDs, data, size);
2726
510
        auto module = getModule(parentDs);
2727
510
        if ( module == nullptr ) {
2728
404
            continue;
2729
404
        }
2730
2731
106
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
106
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
505
    } while ( parentDs.Get<bool>() == true );
2738
2739
54
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
48
#if 1
2745
48
    {
2746
48
        std::set<uint64_t> moduleIDs;
2747
72
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
48
        std::set<uint64_t> operationModuleIDs;
2759
74
        for (const auto& op : operations) {
2760
74
            operationModuleIDs.insert(op.first->ID);
2761
74
        }
2762
2763
48
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
48
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
48
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
48
        for (const auto& id : addModuleIDs) {
2768
40
            operations.push_back({ modules.at(id), operations[0].second});
2769
40
        }
2770
48
    }
2771
48
#endif
2772
2773
48
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
48
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
162
    for (size_t i = 0; i < operations.size(); i++) {
2781
114
        auto& operation = operations[i];
2782
2783
114
        auto& module = operation.first;
2784
114
        auto& op = operation.second;
2785
2786
114
        if ( i > 0 ) {
2787
90
            auto& prevModule = operations[i-1].first;
2788
90
            auto& prevOp = operations[i].second;
2789
2790
90
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
39
                auto& curModifier = op.modifier.GetVectorPtr();
2792
39
                if ( curModifier.size() == 0 ) {
2793
8.72k
                    for (size_t j = 0; j < 512; j++) {
2794
8.70k
                        curModifier.push_back(1);
2795
8.70k
                    }
2796
22
                } else {
2797
1.18k
                    for (auto& c : curModifier) {
2798
1.18k
                        c++;
2799
1.18k
                    }
2800
22
                }
2801
39
            }
2802
90
        }
2803
2804
114
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
114
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
114
        const auto& result = results.back();
2811
2812
114
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
114
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
114
        if ( options.disableTests == false ) {
2830
114
            tests::test(op, result.second);
2831
114
        }
2832
2833
114
        postprocess(module, op, result);
2834
114
    }
2835
2836
48
    if ( options.noCompare == false ) {
2837
24
        compare(operations, results, data, size);
2838
24
    }
2839
48
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
615
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
615
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
615
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.44k
    do {
2725
2.44k
        auto op = getOp(&parentDs, data, size);
2726
2.44k
        auto module = getModule(parentDs);
2727
2.44k
        if ( module == nullptr ) {
2728
921
            continue;
2729
921
        }
2730
2731
1.52k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.52k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
97
            break;
2736
97
        }
2737
2.35k
    } while ( parentDs.Get<bool>() == true );
2738
2739
615
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
604
#if 1
2745
604
    {
2746
604
        std::set<uint64_t> moduleIDs;
2747
1.74k
        for (const auto& m : modules ) {
2748
1.74k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.74k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.74k
            moduleIDs.insert(moduleID);
2756
1.74k
        }
2757
2758
604
        std::set<uint64_t> operationModuleIDs;
2759
1.49k
        for (const auto& op : operations) {
2760
1.49k
            operationModuleIDs.insert(op.first->ID);
2761
1.49k
        }
2762
2763
604
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
604
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
604
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.15k
        for (const auto& id : addModuleIDs) {
2768
1.15k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.15k
        }
2770
604
    }
2771
604
#endif
2772
2773
604
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
604
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.24k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.64k
        auto& operation = operations[i];
2782
2783
2.64k
        auto& module = operation.first;
2784
2.64k
        auto& op = operation.second;
2785
2786
2.64k
        if ( i > 0 ) {
2787
2.06k
            auto& prevModule = operations[i-1].first;
2788
2.06k
            auto& prevOp = operations[i].second;
2789
2790
2.06k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
898
                auto& curModifier = op.modifier.GetVectorPtr();
2792
898
                if ( curModifier.size() == 0 ) {
2793
194k
                    for (size_t j = 0; j < 512; j++) {
2794
194k
                        curModifier.push_back(1);
2795
194k
                    }
2796
518
                } else {
2797
19.3k
                    for (auto& c : curModifier) {
2798
19.3k
                        c++;
2799
19.3k
                    }
2800
518
                }
2801
898
            }
2802
2.06k
        }
2803
2804
2.64k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.64k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.64k
        const auto& result = results.back();
2811
2812
2.64k
        if ( result.second != std::nullopt ) {
2813
1.32k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
1.32k
        }
2820
2821
2.64k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2.64k
        if ( options.disableTests == false ) {
2830
2.64k
            tests::test(op, result.second);
2831
2.64k
        }
2832
2833
2.64k
        postprocess(module, op, result);
2834
2.64k
    }
2835
2836
604
    if ( options.noCompare == false ) {
2837
580
        compare(operations, results, data, size);
2838
580
    }
2839
604
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
95
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
95
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
95
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.69k
    do {
2725
1.69k
        auto op = getOp(&parentDs, data, size);
2726
1.69k
        auto module = getModule(parentDs);
2727
1.69k
        if ( module == nullptr ) {
2728
1.49k
            continue;
2729
1.49k
        }
2730
2731
201
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
201
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
1.68k
    } while ( parentDs.Get<bool>() == true );
2738
2739
95
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
87
#if 1
2745
87
    {
2746
87
        std::set<uint64_t> moduleIDs;
2747
189
        for (const auto& m : modules ) {
2748
189
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
189
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
189
            moduleIDs.insert(moduleID);
2756
189
        }
2757
2758
87
        std::set<uint64_t> operationModuleIDs;
2759
156
        for (const auto& op : operations) {
2760
156
            operationModuleIDs.insert(op.first->ID);
2761
156
        }
2762
2763
87
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
87
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
87
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
121
        for (const auto& id : addModuleIDs) {
2768
121
            operations.push_back({ modules.at(id), operations[0].second});
2769
121
        }
2770
87
    }
2771
87
#endif
2772
2773
87
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
87
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
364
    for (size_t i = 0; i < operations.size(); i++) {
2781
277
        auto& operation = operations[i];
2782
2783
277
        auto& module = operation.first;
2784
277
        auto& op = operation.second;
2785
2786
277
        if ( i > 0 ) {
2787
214
            auto& prevModule = operations[i-1].first;
2788
214
            auto& prevOp = operations[i].second;
2789
2790
214
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
88
                auto& curModifier = op.modifier.GetVectorPtr();
2792
88
                if ( curModifier.size() == 0 ) {
2793
29.2k
                    for (size_t j = 0; j < 512; j++) {
2794
29.1k
                        curModifier.push_back(1);
2795
29.1k
                    }
2796
57
                } else {
2797
9.31k
                    for (auto& c : curModifier) {
2798
9.31k
                        c++;
2799
9.31k
                    }
2800
31
                }
2801
88
            }
2802
214
        }
2803
2804
277
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
277
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
277
        const auto& result = results.back();
2811
2812
277
        if ( result.second != std::nullopt ) {
2813
81
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
81
        }
2820
2821
277
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
277
        if ( options.disableTests == false ) {
2830
277
            tests::test(op, result.second);
2831
277
        }
2832
2833
277
        postprocess(module, op, result);
2834
277
    }
2835
2836
87
    if ( options.noCompare == false ) {
2837
63
        compare(operations, results, data, size);
2838
63
    }
2839
87
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
58
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
58
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
58
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
486
    do {
2725
486
        auto op = getOp(&parentDs, data, size);
2726
486
        auto module = getModule(parentDs);
2727
486
        if ( module == nullptr ) {
2728
391
            continue;
2729
391
        }
2730
2731
95
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
95
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
481
    } while ( parentDs.Get<bool>() == true );
2738
2739
58
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
48
#if 1
2745
48
    {
2746
48
        std::set<uint64_t> moduleIDs;
2747
75
        for (const auto& m : modules ) {
2748
75
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
75
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
75
            moduleIDs.insert(moduleID);
2756
75
        }
2757
2758
48
        std::set<uint64_t> operationModuleIDs;
2759
67
        for (const auto& op : operations) {
2760
67
            operationModuleIDs.insert(op.first->ID);
2761
67
        }
2762
2763
48
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
48
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
48
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
48
        for (const auto& id : addModuleIDs) {
2768
45
            operations.push_back({ modules.at(id), operations[0].second});
2769
45
        }
2770
48
    }
2771
48
#endif
2772
2773
48
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
48
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
160
    for (size_t i = 0; i < operations.size(); i++) {
2781
112
        auto& operation = operations[i];
2782
2783
112
        auto& module = operation.first;
2784
112
        auto& op = operation.second;
2785
2786
112
        if ( i > 0 ) {
2787
87
            auto& prevModule = operations[i-1].first;
2788
87
            auto& prevOp = operations[i].second;
2789
2790
87
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
35
                auto& curModifier = op.modifier.GetVectorPtr();
2792
35
                if ( curModifier.size() == 0 ) {
2793
5.64k
                    for (size_t j = 0; j < 512; j++) {
2794
5.63k
                        curModifier.push_back(1);
2795
5.63k
                    }
2796
24
                } else {
2797
427
                    for (auto& c : curModifier) {
2798
427
                        c++;
2799
427
                    }
2800
24
                }
2801
35
            }
2802
87
        }
2803
2804
112
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
112
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
112
        const auto& result = results.back();
2811
2812
112
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
112
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
112
        if ( options.disableTests == false ) {
2830
112
            tests::test(op, result.second);
2831
112
        }
2832
2833
112
        postprocess(module, op, result);
2834
112
    }
2835
2836
48
    if ( options.noCompare == false ) {
2837
25
        compare(operations, results, data, size);
2838
25
    }
2839
48
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
56
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
56
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
56
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
776
    do {
2725
776
        auto op = getOp(&parentDs, data, size);
2726
776
        auto module = getModule(parentDs);
2727
776
        if ( module == nullptr ) {
2728
698
            continue;
2729
698
        }
2730
2731
78
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
78
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
774
    } while ( parentDs.Get<bool>() == true );
2738
2739
56
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
42
#if 1
2745
42
    {
2746
42
        std::set<uint64_t> moduleIDs;
2747
72
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
42
        std::set<uint64_t> operationModuleIDs;
2759
59
        for (const auto& op : operations) {
2760
59
            operationModuleIDs.insert(op.first->ID);
2761
59
        }
2762
2763
42
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
42
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
42
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
44
        for (const auto& id : addModuleIDs) {
2768
44
            operations.push_back({ modules.at(id), operations[0].second});
2769
44
        }
2770
42
    }
2771
42
#endif
2772
2773
42
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
42
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
145
    for (size_t i = 0; i < operations.size(); i++) {
2781
103
        auto& operation = operations[i];
2782
2783
103
        auto& module = operation.first;
2784
103
        auto& op = operation.second;
2785
2786
103
        if ( i > 0 ) {
2787
79
            auto& prevModule = operations[i-1].first;
2788
79
            auto& prevOp = operations[i].second;
2789
2790
79
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
30
                auto& curModifier = op.modifier.GetVectorPtr();
2792
30
                if ( curModifier.size() == 0 ) {
2793
6.15k
                    for (size_t j = 0; j < 512; j++) {
2794
6.14k
                        curModifier.push_back(1);
2795
6.14k
                    }
2796
18
                } else {
2797
2.60k
                    for (auto& c : curModifier) {
2798
2.60k
                        c++;
2799
2.60k
                    }
2800
18
                }
2801
30
            }
2802
79
        }
2803
2804
103
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
103
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
103
        const auto& result = results.back();
2811
2812
103
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
103
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
103
        if ( options.disableTests == false ) {
2830
103
            tests::test(op, result.second);
2831
103
        }
2832
2833
103
        postprocess(module, op, result);
2834
103
    }
2835
2836
42
    if ( options.noCompare == false ) {
2837
24
        compare(operations, results, data, size);
2838
24
    }
2839
42
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
54
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
54
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
54
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
583
    do {
2725
583
        auto op = getOp(&parentDs, data, size);
2726
583
        auto module = getModule(parentDs);
2727
583
        if ( module == nullptr ) {
2728
497
            continue;
2729
497
        }
2730
2731
86
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
86
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
582
    } while ( parentDs.Get<bool>() == true );
2738
2739
54
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
49
#if 1
2745
49
    {
2746
49
        std::set<uint64_t> moduleIDs;
2747
63
        for (const auto& m : modules ) {
2748
63
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
63
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
63
            moduleIDs.insert(moduleID);
2756
63
        }
2757
2758
49
        std::set<uint64_t> operationModuleIDs;
2759
49
        for (const auto& op : operations) {
2760
49
            operationModuleIDs.insert(op.first->ID);
2761
49
        }
2762
2763
49
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
49
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
49
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
49
        for (const auto& id : addModuleIDs) {
2768
40
            operations.push_back({ modules.at(id), operations[0].second});
2769
40
        }
2770
49
    }
2771
49
#endif
2772
2773
49
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
49
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
138
    for (size_t i = 0; i < operations.size(); i++) {
2781
89
        auto& operation = operations[i];
2782
2783
89
        auto& module = operation.first;
2784
89
        auto& op = operation.second;
2785
2786
89
        if ( i > 0 ) {
2787
68
            auto& prevModule = operations[i-1].first;
2788
68
            auto& prevOp = operations[i].second;
2789
2790
68
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
26
                auto& curModifier = op.modifier.GetVectorPtr();
2792
26
                if ( curModifier.size() == 0 ) {
2793
2.56k
                    for (size_t j = 0; j < 512; j++) {
2794
2.56k
                        curModifier.push_back(1);
2795
2.56k
                    }
2796
21
                } else {
2797
16.7k
                    for (auto& c : curModifier) {
2798
16.7k
                        c++;
2799
16.7k
                    }
2800
21
                }
2801
26
            }
2802
68
        }
2803
2804
89
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
89
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
89
        const auto& result = results.back();
2811
2812
89
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
89
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
89
        if ( options.disableTests == false ) {
2830
89
            tests::test(op, result.second);
2831
89
        }
2832
2833
89
        postprocess(module, op, result);
2834
89
    }
2835
2836
49
    if ( options.noCompare == false ) {
2837
21
        compare(operations, results, data, size);
2838
21
    }
2839
49
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
199
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
199
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
199
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.11k
    do {
2725
1.11k
        auto op = getOp(&parentDs, data, size);
2726
1.11k
        auto module = getModule(parentDs);
2727
1.11k
        if ( module == nullptr ) {
2728
806
            continue;
2729
806
        }
2730
2731
309
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
309
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.10k
    } while ( parentDs.Get<bool>() == true );
2738
2739
199
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
192
#if 1
2745
192
    {
2746
192
        std::set<uint64_t> moduleIDs;
2747
534
        for (const auto& m : modules ) {
2748
534
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
534
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
534
            moduleIDs.insert(moduleID);
2756
534
        }
2757
2758
192
        std::set<uint64_t> operationModuleIDs;
2759
292
        for (const auto& op : operations) {
2760
292
            operationModuleIDs.insert(op.first->ID);
2761
292
        }
2762
2763
192
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
192
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
192
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
351
        for (const auto& id : addModuleIDs) {
2768
351
            operations.push_back({ modules.at(id), operations[0].second});
2769
351
        }
2770
192
    }
2771
192
#endif
2772
2773
192
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
192
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
835
    for (size_t i = 0; i < operations.size(); i++) {
2781
643
        auto& operation = operations[i];
2782
2783
643
        auto& module = operation.first;
2784
643
        auto& op = operation.second;
2785
2786
643
        if ( i > 0 ) {
2787
465
            auto& prevModule = operations[i-1].first;
2788
465
            auto& prevOp = operations[i].second;
2789
2790
465
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
104
                auto& curModifier = op.modifier.GetVectorPtr();
2792
104
                if ( curModifier.size() == 0 ) {
2793
28.2k
                    for (size_t j = 0; j < 512; j++) {
2794
28.1k
                        curModifier.push_back(1);
2795
28.1k
                    }
2796
55
                } else {
2797
6.88k
                    for (auto& c : curModifier) {
2798
6.88k
                        c++;
2799
6.88k
                    }
2800
49
                }
2801
104
            }
2802
465
        }
2803
2804
643
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
643
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
643
        const auto& result = results.back();
2811
2812
643
        if ( result.second != std::nullopt ) {
2813
195
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
195
        }
2820
2821
643
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
643
        if ( options.disableTests == false ) {
2830
643
            tests::test(op, result.second);
2831
643
        }
2832
2833
643
        postprocess(module, op, result);
2834
643
    }
2835
2836
192
    if ( options.noCompare == false ) {
2837
178
        compare(operations, results, data, size);
2838
178
    }
2839
192
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
138
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
138
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
138
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
890
    do {
2725
890
        auto op = getOp(&parentDs, data, size);
2726
890
        auto module = getModule(parentDs);
2727
890
        if ( module == nullptr ) {
2728
649
            continue;
2729
649
        }
2730
2731
241
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
241
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
880
    } while ( parentDs.Get<bool>() == true );
2738
2739
138
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
131
#if 1
2745
131
    {
2746
131
        std::set<uint64_t> moduleIDs;
2747
330
        for (const auto& m : modules ) {
2748
330
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
330
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
330
            moduleIDs.insert(moduleID);
2756
330
        }
2757
2758
131
        std::set<uint64_t> operationModuleIDs;
2759
212
        for (const auto& op : operations) {
2760
212
            operationModuleIDs.insert(op.first->ID);
2761
212
        }
2762
2763
131
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
131
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
131
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
204
        for (const auto& id : addModuleIDs) {
2768
204
            operations.push_back({ modules.at(id), operations[0].second});
2769
204
        }
2770
131
    }
2771
131
#endif
2772
2773
131
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
131
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
547
    for (size_t i = 0; i < operations.size(); i++) {
2781
416
        auto& operation = operations[i];
2782
2783
416
        auto& module = operation.first;
2784
416
        auto& op = operation.second;
2785
2786
416
        if ( i > 0 ) {
2787
306
            auto& prevModule = operations[i-1].first;
2788
306
            auto& prevOp = operations[i].second;
2789
2790
306
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
83
                auto& curModifier = op.modifier.GetVectorPtr();
2792
83
                if ( curModifier.size() == 0 ) {
2793
26.1k
                    for (size_t j = 0; j < 512; j++) {
2794
26.1k
                        curModifier.push_back(1);
2795
26.1k
                    }
2796
51
                } else {
2797
342
                    for (auto& c : curModifier) {
2798
342
                        c++;
2799
342
                    }
2800
32
                }
2801
83
            }
2802
306
        }
2803
2804
416
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
416
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
416
        const auto& result = results.back();
2811
2812
416
        if ( result.second != std::nullopt ) {
2813
130
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
130
        }
2820
2821
416
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
416
        if ( options.disableTests == false ) {
2830
416
            tests::test(op, result.second);
2831
416
        }
2832
2833
416
        postprocess(module, op, result);
2834
416
    }
2835
2836
131
    if ( options.noCompare == false ) {
2837
110
        compare(operations, results, data, size);
2838
110
    }
2839
131
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
53
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
53
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
53
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
868
    do {
2725
868
        auto op = getOp(&parentDs, data, size);
2726
868
        auto module = getModule(parentDs);
2727
868
        if ( module == nullptr ) {
2728
775
            continue;
2729
775
        }
2730
2731
93
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
93
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
866
    } while ( parentDs.Get<bool>() == true );
2738
2739
53
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
48
#if 1
2745
48
    {
2746
48
        std::set<uint64_t> moduleIDs;
2747
75
        for (const auto& m : modules ) {
2748
75
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
75
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
75
            moduleIDs.insert(moduleID);
2756
75
        }
2757
2758
48
        std::set<uint64_t> operationModuleIDs;
2759
60
        for (const auto& op : operations) {
2760
60
            operationModuleIDs.insert(op.first->ID);
2761
60
        }
2762
2763
48
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
48
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
48
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
48
        for (const auto& id : addModuleIDs) {
2768
44
            operations.push_back({ modules.at(id), operations[0].second});
2769
44
        }
2770
48
    }
2771
48
#endif
2772
2773
48
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
48
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
152
    for (size_t i = 0; i < operations.size(); i++) {
2781
104
        auto& operation = operations[i];
2782
2783
104
        auto& module = operation.first;
2784
104
        auto& op = operation.second;
2785
2786
104
        if ( i > 0 ) {
2787
79
            auto& prevModule = operations[i-1].first;
2788
79
            auto& prevOp = operations[i].second;
2789
2790
79
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
26
                auto& curModifier = op.modifier.GetVectorPtr();
2792
26
                if ( curModifier.size() == 0 ) {
2793
7.69k
                    for (size_t j = 0; j < 512; j++) {
2794
7.68k
                        curModifier.push_back(1);
2795
7.68k
                    }
2796
15
                } else {
2797
3.93k
                    for (auto& c : curModifier) {
2798
3.93k
                        c++;
2799
3.93k
                    }
2800
11
                }
2801
26
            }
2802
79
        }
2803
2804
104
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
104
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
104
        const auto& result = results.back();
2811
2812
104
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
104
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
104
        if ( options.disableTests == false ) {
2830
104
            tests::test(op, result.second);
2831
104
        }
2832
2833
104
        postprocess(module, op, result);
2834
104
    }
2835
2836
48
    if ( options.noCompare == false ) {
2837
25
        compare(operations, results, data, size);
2838
25
    }
2839
48
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
53
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
53
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
53
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
744
    do {
2725
744
        auto op = getOp(&parentDs, data, size);
2726
744
        auto module = getModule(parentDs);
2727
744
        if ( module == nullptr ) {
2728
654
            continue;
2729
654
        }
2730
2731
90
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
90
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
739
    } while ( parentDs.Get<bool>() == true );
2738
2739
53
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
48
#if 1
2745
48
    {
2746
48
        std::set<uint64_t> moduleIDs;
2747
69
        for (const auto& m : modules ) {
2748
69
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
69
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
69
            moduleIDs.insert(moduleID);
2756
69
        }
2757
2758
48
        std::set<uint64_t> operationModuleIDs;
2759
65
        for (const auto& op : operations) {
2760
65
            operationModuleIDs.insert(op.first->ID);
2761
65
        }
2762
2763
48
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
48
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
48
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
48
        for (const auto& id : addModuleIDs) {
2768
38
            operations.push_back({ modules.at(id), operations[0].second});
2769
38
        }
2770
48
    }
2771
48
#endif
2772
2773
48
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
48
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
151
    for (size_t i = 0; i < operations.size(); i++) {
2781
103
        auto& operation = operations[i];
2782
2783
103
        auto& module = operation.first;
2784
103
        auto& op = operation.second;
2785
2786
103
        if ( i > 0 ) {
2787
80
            auto& prevModule = operations[i-1].first;
2788
80
            auto& prevOp = operations[i].second;
2789
2790
80
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
24
                auto& curModifier = op.modifier.GetVectorPtr();
2792
24
                if ( curModifier.size() == 0 ) {
2793
5.64k
                    for (size_t j = 0; j < 512; j++) {
2794
5.63k
                        curModifier.push_back(1);
2795
5.63k
                    }
2796
13
                } else {
2797
29.5k
                    for (auto& c : curModifier) {
2798
29.5k
                        c++;
2799
29.5k
                    }
2800
13
                }
2801
24
            }
2802
80
        }
2803
2804
103
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
103
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
103
        const auto& result = results.back();
2811
2812
103
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
103
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
103
        if ( options.disableTests == false ) {
2830
103
            tests::test(op, result.second);
2831
103
        }
2832
2833
103
        postprocess(module, op, result);
2834
103
    }
2835
2836
48
    if ( options.noCompare == false ) {
2837
23
        compare(operations, results, data, size);
2838
23
    }
2839
48
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
469
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
469
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
469
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.15k
    do {
2725
2.15k
        auto op = getOp(&parentDs, data, size);
2726
2.15k
        auto module = getModule(parentDs);
2727
2.15k
        if ( module == nullptr ) {
2728
1.37k
            continue;
2729
1.37k
        }
2730
2731
782
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
782
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
17
            break;
2736
17
        }
2737
2.13k
    } while ( parentDs.Get<bool>() == true );
2738
2739
469
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
464
#if 1
2745
464
    {
2746
464
        std::set<uint64_t> moduleIDs;
2747
1.34k
        for (const auto& m : modules ) {
2748
1.34k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.34k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.34k
            moduleIDs.insert(moduleID);
2756
1.34k
        }
2757
2758
464
        std::set<uint64_t> operationModuleIDs;
2759
756
        for (const auto& op : operations) {
2760
756
            operationModuleIDs.insert(op.first->ID);
2761
756
        }
2762
2763
464
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
464
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
464
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
881
        for (const auto& id : addModuleIDs) {
2768
881
            operations.push_back({ modules.at(id), operations[0].second});
2769
881
        }
2770
464
    }
2771
464
#endif
2772
2773
464
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
464
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.10k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.63k
        auto& operation = operations[i];
2782
2783
1.63k
        auto& module = operation.first;
2784
1.63k
        auto& op = operation.second;
2785
2786
1.63k
        if ( i > 0 ) {
2787
1.19k
            auto& prevModule = operations[i-1].first;
2788
1.19k
            auto& prevOp = operations[i].second;
2789
2790
1.19k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
294
                auto& curModifier = op.modifier.GetVectorPtr();
2792
294
                if ( curModifier.size() == 0 ) {
2793
93.8k
                    for (size_t j = 0; j < 512; j++) {
2794
93.6k
                        curModifier.push_back(1);
2795
93.6k
                    }
2796
183
                } else {
2797
8.75k
                    for (auto& c : curModifier) {
2798
8.75k
                        c++;
2799
8.75k
                    }
2800
111
                }
2801
294
            }
2802
1.19k
        }
2803
2804
1.63k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.63k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.63k
        const auto& result = results.back();
2811
2812
1.63k
        if ( result.second != std::nullopt ) {
2813
503
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
503
        }
2820
2821
1.63k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.63k
        if ( options.disableTests == false ) {
2830
1.63k
            tests::test(op, result.second);
2831
1.63k
        }
2832
2833
1.63k
        postprocess(module, op, result);
2834
1.63k
    }
2835
2836
464
    if ( options.noCompare == false ) {
2837
447
        compare(operations, results, data, size);
2838
447
    }
2839
464
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
236
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
236
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
236
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.06k
    do {
2725
1.06k
        auto op = getOp(&parentDs, data, size);
2726
1.06k
        auto module = getModule(parentDs);
2727
1.06k
        if ( module == nullptr ) {
2728
685
            continue;
2729
685
        }
2730
2731
377
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
377
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
1.05k
    } while ( parentDs.Get<bool>() == true );
2738
2739
236
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
226
#if 1
2745
226
    {
2746
226
        std::set<uint64_t> moduleIDs;
2747
558
        for (const auto& m : modules ) {
2748
558
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
558
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
558
            moduleIDs.insert(moduleID);
2756
558
        }
2757
2758
226
        std::set<uint64_t> operationModuleIDs;
2759
322
        for (const auto& op : operations) {
2760
322
            operationModuleIDs.insert(op.first->ID);
2761
322
        }
2762
2763
226
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
226
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
226
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
368
        for (const auto& id : addModuleIDs) {
2768
368
            operations.push_back({ modules.at(id), operations[0].second});
2769
368
        }
2770
226
    }
2771
226
#endif
2772
2773
226
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
226
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
916
    for (size_t i = 0; i < operations.size(); i++) {
2781
690
        auto& operation = operations[i];
2782
2783
690
        auto& module = operation.first;
2784
690
        auto& op = operation.second;
2785
2786
690
        if ( i > 0 ) {
2787
504
            auto& prevModule = operations[i-1].first;
2788
504
            auto& prevOp = operations[i].second;
2789
2790
504
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
128
                auto& curModifier = op.modifier.GetVectorPtr();
2792
128
                if ( curModifier.size() == 0 ) {
2793
30.2k
                    for (size_t j = 0; j < 512; j++) {
2794
30.2k
                        curModifier.push_back(1);
2795
30.2k
                    }
2796
69
                } else {
2797
45.1k
                    for (auto& c : curModifier) {
2798
45.1k
                        c++;
2799
45.1k
                    }
2800
69
                }
2801
128
            }
2802
504
        }
2803
2804
690
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
690
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
690
        const auto& result = results.back();
2811
2812
690
        if ( result.second != std::nullopt ) {
2813
44
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
44
        }
2820
2821
690
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
690
        if ( options.disableTests == false ) {
2830
690
            tests::test(op, result.second);
2831
690
        }
2832
2833
690
        postprocess(module, op, result);
2834
690
    }
2835
2836
226
    if ( options.noCompare == false ) {
2837
186
        compare(operations, results, data, size);
2838
186
    }
2839
226
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
116
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
116
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
116
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.06k
    do {
2725
1.06k
        auto op = getOp(&parentDs, data, size);
2726
1.06k
        auto module = getModule(parentDs);
2727
1.06k
        if ( module == nullptr ) {
2728
889
            continue;
2729
889
        }
2730
2731
176
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
176
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
1.06k
    } while ( parentDs.Get<bool>() == true );
2738
2739
116
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
110
#if 1
2745
110
    {
2746
110
        std::set<uint64_t> moduleIDs;
2747
249
        for (const auto& m : modules ) {
2748
249
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
249
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
249
            moduleIDs.insert(moduleID);
2756
249
        }
2757
2758
110
        std::set<uint64_t> operationModuleIDs;
2759
139
        for (const auto& op : operations) {
2760
139
            operationModuleIDs.insert(op.first->ID);
2761
139
        }
2762
2763
110
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
110
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
110
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
156
        for (const auto& id : addModuleIDs) {
2768
156
            operations.push_back({ modules.at(id), operations[0].second});
2769
156
        }
2770
110
    }
2771
110
#endif
2772
2773
110
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
110
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
405
    for (size_t i = 0; i < operations.size(); i++) {
2781
295
        auto& operation = operations[i];
2782
2783
295
        auto& module = operation.first;
2784
295
        auto& op = operation.second;
2785
2786
295
        if ( i > 0 ) {
2787
212
            auto& prevModule = operations[i-1].first;
2788
212
            auto& prevOp = operations[i].second;
2789
2790
212
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
42
                auto& curModifier = op.modifier.GetVectorPtr();
2792
42
                if ( curModifier.size() == 0 ) {
2793
8.20k
                    for (size_t j = 0; j < 512; j++) {
2794
8.19k
                        curModifier.push_back(1);
2795
8.19k
                    }
2796
26
                } else {
2797
23.3k
                    for (auto& c : curModifier) {
2798
23.3k
                        c++;
2799
23.3k
                    }
2800
26
                }
2801
42
            }
2802
212
        }
2803
2804
295
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
295
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
295
        const auto& result = results.back();
2811
2812
295
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
295
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
295
        if ( options.disableTests == false ) {
2830
295
            tests::test(op, result.second);
2831
295
        }
2832
2833
295
        postprocess(module, op, result);
2834
295
    }
2835
2836
110
    if ( options.noCompare == false ) {
2837
83
        compare(operations, results, data, size);
2838
83
    }
2839
110
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
428
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
428
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
428
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.39k
    do {
2725
1.39k
        auto op = getOp(&parentDs, data, size);
2726
1.39k
        auto module = getModule(parentDs);
2727
1.39k
        if ( module == nullptr ) {
2728
676
            continue;
2729
676
        }
2730
2731
718
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
718
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
40
            break;
2736
40
        }
2737
1.35k
    } while ( parentDs.Get<bool>() == true );
2738
2739
428
    if ( operations.empty() == true ) {
2740
33
        return;
2741
33
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
395
#if 1
2745
395
    {
2746
395
        std::set<uint64_t> moduleIDs;
2747
1.01k
        for (const auto& m : modules ) {
2748
1.01k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.01k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.01k
            moduleIDs.insert(moduleID);
2756
1.01k
        }
2757
2758
395
        std::set<uint64_t> operationModuleIDs;
2759
663
        for (const auto& op : operations) {
2760
663
            operationModuleIDs.insert(op.first->ID);
2761
663
        }
2762
2763
395
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
395
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
395
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
663
        for (const auto& id : addModuleIDs) {
2768
663
            operations.push_back({ modules.at(id), operations[0].second});
2769
663
        }
2770
395
    }
2771
395
#endif
2772
2773
395
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
395
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.72k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.32k
        auto& operation = operations[i];
2782
2783
1.32k
        auto& module = operation.first;
2784
1.32k
        auto& op = operation.second;
2785
2786
1.32k
        if ( i > 0 ) {
2787
989
            auto& prevModule = operations[i-1].first;
2788
989
            auto& prevOp = operations[i].second;
2789
2790
989
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
309
                auto& curModifier = op.modifier.GetVectorPtr();
2792
309
                if ( curModifier.size() == 0 ) {
2793
116k
                    for (size_t j = 0; j < 512; j++) {
2794
116k
                        curModifier.push_back(1);
2795
116k
                    }
2796
228
                } else {
2797
892
                    for (auto& c : curModifier) {
2798
892
                        c++;
2799
892
                    }
2800
81
                }
2801
309
            }
2802
989
        }
2803
2804
1.32k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.32k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.32k
        const auto& result = results.back();
2811
2812
1.32k
        if ( result.second != std::nullopt ) {
2813
623
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
623
        }
2820
2821
1.32k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.32k
        if ( options.disableTests == false ) {
2830
1.32k
            tests::test(op, result.second);
2831
1.32k
        }
2832
2833
1.32k
        postprocess(module, op, result);
2834
1.32k
    }
2835
2836
395
    if ( options.noCompare == false ) {
2837
337
        compare(operations, results, data, size);
2838
337
    }
2839
395
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
66
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
66
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
66
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.00k
    do {
2725
1.00k
        auto op = getOp(&parentDs, data, size);
2726
1.00k
        auto module = getModule(parentDs);
2727
1.00k
        if ( module == nullptr ) {
2728
913
            continue;
2729
913
        }
2730
2731
88
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
88
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
1.00k
    } while ( parentDs.Get<bool>() == true );
2738
2739
66
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
55
#if 1
2745
55
    {
2746
55
        std::set<uint64_t> moduleIDs;
2747
55
        for (const auto& m : modules ) {
2748
48
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
48
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
48
            moduleIDs.insert(moduleID);
2756
48
        }
2757
2758
55
        std::set<uint64_t> operationModuleIDs;
2759
55
        for (const auto& op : operations) {
2760
36
            operationModuleIDs.insert(op.first->ID);
2761
36
        }
2762
2763
55
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
55
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
55
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
55
        for (const auto& id : addModuleIDs) {
2768
30
            operations.push_back({ modules.at(id), operations[0].second});
2769
30
        }
2770
55
    }
2771
55
#endif
2772
2773
55
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
55
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
121
    for (size_t i = 0; i < operations.size(); i++) {
2781
66
        auto& operation = operations[i];
2782
2783
66
        auto& module = operation.first;
2784
66
        auto& op = operation.second;
2785
2786
66
        if ( i > 0 ) {
2787
50
            auto& prevModule = operations[i-1].first;
2788
50
            auto& prevOp = operations[i].second;
2789
2790
50
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
18
                auto& curModifier = op.modifier.GetVectorPtr();
2792
18
                if ( curModifier.size() == 0 ) {
2793
7.69k
                    for (size_t j = 0; j < 512; j++) {
2794
7.68k
                        curModifier.push_back(1);
2795
7.68k
                    }
2796
15
                } else {
2797
91
                    for (auto& c : curModifier) {
2798
91
                        c++;
2799
91
                    }
2800
3
                }
2801
18
            }
2802
50
        }
2803
2804
66
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
66
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
66
        const auto& result = results.back();
2811
2812
66
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
66
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
66
        if ( options.disableTests == false ) {
2830
66
            tests::test(op, result.second);
2831
66
        }
2832
2833
66
        postprocess(module, op, result);
2834
66
    }
2835
2836
55
    if ( options.noCompare == false ) {
2837
16
        compare(operations, results, data, size);
2838
16
    }
2839
55
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
68
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
68
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
68
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
855
    do {
2725
855
        auto op = getOp(&parentDs, data, size);
2726
855
        auto module = getModule(parentDs);
2727
855
        if ( module == nullptr ) {
2728
720
            continue;
2729
720
        }
2730
2731
135
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
135
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
850
    } while ( parentDs.Get<bool>() == true );
2738
2739
68
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
61
#if 1
2745
61
    {
2746
61
        std::set<uint64_t> moduleIDs;
2747
105
        for (const auto& m : modules ) {
2748
105
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
105
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
105
            moduleIDs.insert(moduleID);
2756
105
        }
2757
2758
61
        std::set<uint64_t> operationModuleIDs;
2759
90
        for (const auto& op : operations) {
2760
90
            operationModuleIDs.insert(op.first->ID);
2761
90
        }
2762
2763
61
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
61
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
61
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
61
        for (const auto& id : addModuleIDs) {
2768
61
            operations.push_back({ modules.at(id), operations[0].second});
2769
61
        }
2770
61
    }
2771
61
#endif
2772
2773
61
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
61
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
212
    for (size_t i = 0; i < operations.size(); i++) {
2781
151
        auto& operation = operations[i];
2782
2783
151
        auto& module = operation.first;
2784
151
        auto& op = operation.second;
2785
2786
151
        if ( i > 0 ) {
2787
116
            auto& prevModule = operations[i-1].first;
2788
116
            auto& prevOp = operations[i].second;
2789
2790
116
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
42
                auto& curModifier = op.modifier.GetVectorPtr();
2792
42
                if ( curModifier.size() == 0 ) {
2793
6.66k
                    for (size_t j = 0; j < 512; j++) {
2794
6.65k
                        curModifier.push_back(1);
2795
6.65k
                    }
2796
29
                } else {
2797
1.06k
                    for (auto& c : curModifier) {
2798
1.06k
                        c++;
2799
1.06k
                    }
2800
29
                }
2801
42
            }
2802
116
        }
2803
2804
151
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
151
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
151
        const auto& result = results.back();
2811
2812
151
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
151
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
151
        if ( options.disableTests == false ) {
2830
151
            tests::test(op, result.second);
2831
151
        }
2832
2833
151
        postprocess(module, op, result);
2834
151
    }
2835
2836
61
    if ( options.noCompare == false ) {
2837
35
        compare(operations, results, data, size);
2838
35
    }
2839
61
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
91
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
91
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
91
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
782
    do {
2725
782
        auto op = getOp(&parentDs, data, size);
2726
782
        auto module = getModule(parentDs);
2727
782
        if ( module == nullptr ) {
2728
638
            continue;
2729
638
        }
2730
2731
144
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
144
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
774
    } while ( parentDs.Get<bool>() == true );
2738
2739
91
    if ( operations.empty() == true ) {
2740
19
        return;
2741
19
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
72
#if 1
2745
72
    {
2746
72
        std::set<uint64_t> moduleIDs;
2747
102
        for (const auto& m : modules ) {
2748
102
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
102
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
102
            moduleIDs.insert(moduleID);
2756
102
        }
2757
2758
72
        std::set<uint64_t> operationModuleIDs;
2759
103
        for (const auto& op : operations) {
2760
103
            operationModuleIDs.insert(op.first->ID);
2761
103
        }
2762
2763
72
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
72
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
72
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
72
        for (const auto& id : addModuleIDs) {
2768
55
            operations.push_back({ modules.at(id), operations[0].second});
2769
55
        }
2770
72
    }
2771
72
#endif
2772
2773
72
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
72
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
230
    for (size_t i = 0; i < operations.size(); i++) {
2781
158
        auto& operation = operations[i];
2782
2783
158
        auto& module = operation.first;
2784
158
        auto& op = operation.second;
2785
2786
158
        if ( i > 0 ) {
2787
124
            auto& prevModule = operations[i-1].first;
2788
124
            auto& prevOp = operations[i].second;
2789
2790
124
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
54
                auto& curModifier = op.modifier.GetVectorPtr();
2792
54
                if ( curModifier.size() == 0 ) {
2793
9.23k
                    for (size_t j = 0; j < 512; j++) {
2794
9.21k
                        curModifier.push_back(1);
2795
9.21k
                    }
2796
36
                } else {
2797
1.75k
                    for (auto& c : curModifier) {
2798
1.75k
                        c++;
2799
1.75k
                    }
2800
36
                }
2801
54
            }
2802
124
        }
2803
2804
158
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
158
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
158
        const auto& result = results.back();
2811
2812
158
        if ( result.second != std::nullopt ) {
2813
4
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
4
        }
2820
2821
158
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
158
        if ( options.disableTests == false ) {
2830
158
            tests::test(op, result.second);
2831
158
        }
2832
2833
158
        postprocess(module, op, result);
2834
158
    }
2835
2836
72
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
72
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
61
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
61
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
61
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
752
    do {
2725
752
        auto op = getOp(&parentDs, data, size);
2726
752
        auto module = getModule(parentDs);
2727
752
        if ( module == nullptr ) {
2728
653
            continue;
2729
653
        }
2730
2731
99
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
99
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
747
    } while ( parentDs.Get<bool>() == true );
2738
2739
61
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
49
#if 1
2745
49
    {
2746
49
        std::set<uint64_t> moduleIDs;
2747
84
        for (const auto& m : modules ) {
2748
84
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
84
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
84
            moduleIDs.insert(moduleID);
2756
84
        }
2757
2758
49
        std::set<uint64_t> operationModuleIDs;
2759
74
        for (const auto& op : operations) {
2760
74
            operationModuleIDs.insert(op.first->ID);
2761
74
        }
2762
2763
49
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
49
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
49
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
49
        for (const auto& id : addModuleIDs) {
2768
49
            operations.push_back({ modules.at(id), operations[0].second});
2769
49
        }
2770
49
    }
2771
49
#endif
2772
2773
49
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
49
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
172
    for (size_t i = 0; i < operations.size(); i++) {
2781
123
        auto& operation = operations[i];
2782
2783
123
        auto& module = operation.first;
2784
123
        auto& op = operation.second;
2785
2786
123
        if ( i > 0 ) {
2787
95
            auto& prevModule = operations[i-1].first;
2788
95
            auto& prevOp = operations[i].second;
2789
2790
95
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
35
                auto& curModifier = op.modifier.GetVectorPtr();
2792
35
                if ( curModifier.size() == 0 ) {
2793
6.15k
                    for (size_t j = 0; j < 512; j++) {
2794
6.14k
                        curModifier.push_back(1);
2795
6.14k
                    }
2796
23
                } else {
2797
1.02k
                    for (auto& c : curModifier) {
2798
1.02k
                        c++;
2799
1.02k
                    }
2800
23
                }
2801
35
            }
2802
95
        }
2803
2804
123
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
123
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
123
        const auto& result = results.back();
2811
2812
123
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
123
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
123
        if ( options.disableTests == false ) {
2830
123
            tests::test(op, result.second);
2831
123
        }
2832
2833
123
        postprocess(module, op, result);
2834
123
    }
2835
2836
49
    if ( options.noCompare == false ) {
2837
28
        compare(operations, results, data, size);
2838
28
    }
2839
49
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
52
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
52
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
52
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
594
    do {
2725
594
        auto op = getOp(&parentDs, data, size);
2726
594
        auto module = getModule(parentDs);
2727
594
        if ( module == nullptr ) {
2728
507
            continue;
2729
507
        }
2730
2731
87
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
87
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
589
    } while ( parentDs.Get<bool>() == true );
2738
2739
52
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
43
#if 1
2745
43
    {
2746
43
        std::set<uint64_t> moduleIDs;
2747
54
        for (const auto& m : modules ) {
2748
54
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
54
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
54
            moduleIDs.insert(moduleID);
2756
54
        }
2757
2758
43
        std::set<uint64_t> operationModuleIDs;
2759
55
        for (const auto& op : operations) {
2760
55
            operationModuleIDs.insert(op.first->ID);
2761
55
        }
2762
2763
43
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
43
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
43
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
43
        for (const auto& id : addModuleIDs) {
2768
28
            operations.push_back({ modules.at(id), operations[0].second});
2769
28
        }
2770
43
    }
2771
43
#endif
2772
2773
43
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
43
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
126
    for (size_t i = 0; i < operations.size(); i++) {
2781
83
        auto& operation = operations[i];
2782
2783
83
        auto& module = operation.first;
2784
83
        auto& op = operation.second;
2785
2786
83
        if ( i > 0 ) {
2787
65
            auto& prevModule = operations[i-1].first;
2788
65
            auto& prevOp = operations[i].second;
2789
2790
65
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
28
                auto& curModifier = op.modifier.GetVectorPtr();
2792
28
                if ( curModifier.size() == 0 ) {
2793
513
                    for (size_t j = 0; j < 512; j++) {
2794
512
                        curModifier.push_back(1);
2795
512
                    }
2796
27
                } else {
2797
1.07k
                    for (auto& c : curModifier) {
2798
1.07k
                        c++;
2799
1.07k
                    }
2800
27
                }
2801
28
            }
2802
65
        }
2803
2804
83
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
83
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
83
        const auto& result = results.back();
2811
2812
83
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
83
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
83
        if ( options.disableTests == false ) {
2830
83
            tests::test(op, result.second);
2831
83
        }
2832
2833
83
        postprocess(module, op, result);
2834
83
    }
2835
2836
43
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
43
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
111
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
111
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
111
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
822
    do {
2725
822
        auto op = getOp(&parentDs, data, size);
2726
822
        auto module = getModule(parentDs);
2727
822
        if ( module == nullptr ) {
2728
620
            continue;
2729
620
        }
2730
2731
202
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
202
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
817
    } while ( parentDs.Get<bool>() == true );
2738
2739
111
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
104
#if 1
2745
104
    {
2746
104
        std::set<uint64_t> moduleIDs;
2747
234
        for (const auto& m : modules ) {
2748
234
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
234
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
234
            moduleIDs.insert(moduleID);
2756
234
        }
2757
2758
104
        std::set<uint64_t> operationModuleIDs;
2759
166
        for (const auto& op : operations) {
2760
166
            operationModuleIDs.insert(op.first->ID);
2761
166
        }
2762
2763
104
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
104
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
104
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
152
        for (const auto& id : addModuleIDs) {
2768
152
            operations.push_back({ modules.at(id), operations[0].second});
2769
152
        }
2770
104
    }
2771
104
#endif
2772
2773
104
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
104
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
422
    for (size_t i = 0; i < operations.size(); i++) {
2781
318
        auto& operation = operations[i];
2782
2783
318
        auto& module = operation.first;
2784
318
        auto& op = operation.second;
2785
2786
318
        if ( i > 0 ) {
2787
240
            auto& prevModule = operations[i-1].first;
2788
240
            auto& prevOp = operations[i].second;
2789
2790
240
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
82
                auto& curModifier = op.modifier.GetVectorPtr();
2792
82
                if ( curModifier.size() == 0 ) {
2793
16.9k
                    for (size_t j = 0; j < 512; j++) {
2794
16.8k
                        curModifier.push_back(1);
2795
16.8k
                    }
2796
49
                } else {
2797
4.94k
                    for (auto& c : curModifier) {
2798
4.94k
                        c++;
2799
4.94k
                    }
2800
49
                }
2801
82
            }
2802
240
        }
2803
2804
318
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
318
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
318
        const auto& result = results.back();
2811
2812
318
        if ( result.second != std::nullopt ) {
2813
18
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
18
        }
2820
2821
318
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
318
        if ( options.disableTests == false ) {
2830
318
            tests::test(op, result.second);
2831
318
        }
2832
2833
318
        postprocess(module, op, result);
2834
318
    }
2835
2836
104
    if ( options.noCompare == false ) {
2837
78
        compare(operations, results, data, size);
2838
78
    }
2839
104
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
86
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
86
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
86
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
887
    do {
2725
887
        auto op = getOp(&parentDs, data, size);
2726
887
        auto module = getModule(parentDs);
2727
887
        if ( module == nullptr ) {
2728
728
            continue;
2729
728
        }
2730
2731
159
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
159
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
882
    } while ( parentDs.Get<bool>() == true );
2738
2739
86
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
79
#if 1
2745
79
    {
2746
79
        std::set<uint64_t> moduleIDs;
2747
144
        for (const auto& m : modules ) {
2748
144
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
144
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
144
            moduleIDs.insert(moduleID);
2756
144
        }
2757
2758
79
        std::set<uint64_t> operationModuleIDs;
2759
111
        for (const auto& op : operations) {
2760
111
            operationModuleIDs.insert(op.first->ID);
2761
111
        }
2762
2763
79
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
79
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
79
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
90
        for (const auto& id : addModuleIDs) {
2768
90
            operations.push_back({ modules.at(id), operations[0].second});
2769
90
        }
2770
79
    }
2771
79
#endif
2772
2773
79
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
79
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
280
    for (size_t i = 0; i < operations.size(); i++) {
2781
201
        auto& operation = operations[i];
2782
2783
201
        auto& module = operation.first;
2784
201
        auto& op = operation.second;
2785
2786
201
        if ( i > 0 ) {
2787
153
            auto& prevModule = operations[i-1].first;
2788
153
            auto& prevOp = operations[i].second;
2789
2790
153
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
54
                auto& curModifier = op.modifier.GetVectorPtr();
2792
54
                if ( curModifier.size() == 0 ) {
2793
14.3k
                    for (size_t j = 0; j < 512; j++) {
2794
14.3k
                        curModifier.push_back(1);
2795
14.3k
                    }
2796
28
                } else {
2797
778
                    for (auto& c : curModifier) {
2798
778
                        c++;
2799
778
                    }
2800
26
                }
2801
54
            }
2802
153
        }
2803
2804
201
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
201
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
201
        const auto& result = results.back();
2811
2812
201
        if ( result.second != std::nullopt ) {
2813
5
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
5
        }
2820
2821
201
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
201
        if ( options.disableTests == false ) {
2830
201
            tests::test(op, result.second);
2831
201
        }
2832
2833
201
        postprocess(module, op, result);
2834
201
    }
2835
2836
79
    if ( options.noCompare == false ) {
2837
48
        compare(operations, results, data, size);
2838
48
    }
2839
79
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
177
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
177
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
177
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.08k
    do {
2725
1.08k
        auto op = getOp(&parentDs, data, size);
2726
1.08k
        auto module = getModule(parentDs);
2727
1.08k
        if ( module == nullptr ) {
2728
790
            continue;
2729
790
        }
2730
2731
292
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
292
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
1.07k
    } while ( parentDs.Get<bool>() == true );
2738
2739
177
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
171
#if 1
2745
171
    {
2746
171
        std::set<uint64_t> moduleIDs;
2747
420
        for (const auto& m : modules ) {
2748
420
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
420
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
420
            moduleIDs.insert(moduleID);
2756
420
        }
2757
2758
171
        std::set<uint64_t> operationModuleIDs;
2759
244
        for (const auto& op : operations) {
2760
244
            operationModuleIDs.insert(op.first->ID);
2761
244
        }
2762
2763
171
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
171
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
171
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
268
        for (const auto& id : addModuleIDs) {
2768
268
            operations.push_back({ modules.at(id), operations[0].second});
2769
268
        }
2770
171
    }
2771
171
#endif
2772
2773
171
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
171
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
683
    for (size_t i = 0; i < operations.size(); i++) {
2781
512
        auto& operation = operations[i];
2782
2783
512
        auto& module = operation.first;
2784
512
        auto& op = operation.second;
2785
2786
512
        if ( i > 0 ) {
2787
372
            auto& prevModule = operations[i-1].first;
2788
372
            auto& prevOp = operations[i].second;
2789
2790
372
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
83
                auto& curModifier = op.modifier.GetVectorPtr();
2792
83
                if ( curModifier.size() == 0 ) {
2793
14.8k
                    for (size_t j = 0; j < 512; j++) {
2794
14.8k
                        curModifier.push_back(1);
2795
14.8k
                    }
2796
54
                } else {
2797
38.4k
                    for (auto& c : curModifier) {
2798
38.4k
                        c++;
2799
38.4k
                    }
2800
54
                }
2801
83
            }
2802
372
        }
2803
2804
512
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
512
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
512
        const auto& result = results.back();
2811
2812
512
        if ( result.second != std::nullopt ) {
2813
112
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
112
        }
2820
2821
512
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
512
        if ( options.disableTests == false ) {
2830
512
            tests::test(op, result.second);
2831
512
        }
2832
2833
512
        postprocess(module, op, result);
2834
512
    }
2835
2836
171
    if ( options.noCompare == false ) {
2837
140
        compare(operations, results, data, size);
2838
140
    }
2839
171
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
138
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
138
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
138
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
873
    do {
2725
873
        auto op = getOp(&parentDs, data, size);
2726
873
        auto module = getModule(parentDs);
2727
873
        if ( module == nullptr ) {
2728
656
            continue;
2729
656
        }
2730
2731
217
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
217
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
867
    } while ( parentDs.Get<bool>() == true );
2738
2739
138
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
127
#if 1
2745
127
    {
2746
127
        std::set<uint64_t> moduleIDs;
2747
306
        for (const auto& m : modules ) {
2748
306
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
306
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
306
            moduleIDs.insert(moduleID);
2756
306
        }
2757
2758
127
        std::set<uint64_t> operationModuleIDs;
2759
180
        for (const auto& op : operations) {
2760
180
            operationModuleIDs.insert(op.first->ID);
2761
180
        }
2762
2763
127
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
127
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
127
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
198
        for (const auto& id : addModuleIDs) {
2768
198
            operations.push_back({ modules.at(id), operations[0].second});
2769
198
        }
2770
127
    }
2771
127
#endif
2772
2773
127
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
127
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
505
    for (size_t i = 0; i < operations.size(); i++) {
2781
378
        auto& operation = operations[i];
2782
2783
378
        auto& module = operation.first;
2784
378
        auto& op = operation.second;
2785
2786
378
        if ( i > 0 ) {
2787
276
            auto& prevModule = operations[i-1].first;
2788
276
            auto& prevOp = operations[i].second;
2789
2790
276
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
72
                auto& curModifier = op.modifier.GetVectorPtr();
2792
72
                if ( curModifier.size() == 0 ) {
2793
17.9k
                    for (size_t j = 0; j < 512; j++) {
2794
17.9k
                        curModifier.push_back(1);
2795
17.9k
                    }
2796
37
                } else {
2797
1.97k
                    for (auto& c : curModifier) {
2798
1.97k
                        c++;
2799
1.97k
                    }
2800
37
                }
2801
72
            }
2802
276
        }
2803
2804
378
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
378
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
378
        const auto& result = results.back();
2811
2812
378
        if ( result.second != std::nullopt ) {
2813
19
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
19
        }
2820
2821
378
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
378
        if ( options.disableTests == false ) {
2830
378
            tests::test(op, result.second);
2831
378
        }
2832
2833
378
        postprocess(module, op, result);
2834
378
    }
2835
2836
127
    if ( options.noCompare == false ) {
2837
102
        compare(operations, results, data, size);
2838
102
    }
2839
127
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
223
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
223
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
223
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.43k
    do {
2725
1.43k
        auto op = getOp(&parentDs, data, size);
2726
1.43k
        auto module = getModule(parentDs);
2727
1.43k
        if ( module == nullptr ) {
2728
1.09k
            continue;
2729
1.09k
        }
2730
2731
341
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
341
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
1.42k
    } while ( parentDs.Get<bool>() == true );
2738
2739
223
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
213
#if 1
2745
213
    {
2746
213
        std::set<uint64_t> moduleIDs;
2747
558
        for (const auto& m : modules ) {
2748
558
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
558
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
558
            moduleIDs.insert(moduleID);
2756
558
        }
2757
2758
213
        std::set<uint64_t> operationModuleIDs;
2759
301
        for (const auto& op : operations) {
2760
301
            operationModuleIDs.insert(op.first->ID);
2761
301
        }
2762
2763
213
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
213
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
213
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
360
        for (const auto& id : addModuleIDs) {
2768
360
            operations.push_back({ modules.at(id), operations[0].second});
2769
360
        }
2770
213
    }
2771
213
#endif
2772
2773
213
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
213
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
874
    for (size_t i = 0; i < operations.size(); i++) {
2781
661
        auto& operation = operations[i];
2782
2783
661
        auto& module = operation.first;
2784
661
        auto& op = operation.second;
2785
2786
661
        if ( i > 0 ) {
2787
475
            auto& prevModule = operations[i-1].first;
2788
475
            auto& prevOp = operations[i].second;
2789
2790
475
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
99
                auto& curModifier = op.modifier.GetVectorPtr();
2792
99
                if ( curModifier.size() == 0 ) {
2793
26.1k
                    for (size_t j = 0; j < 512; j++) {
2794
26.1k
                        curModifier.push_back(1);
2795
26.1k
                    }
2796
51
                } else {
2797
6.53k
                    for (auto& c : curModifier) {
2798
6.53k
                        c++;
2799
6.53k
                    }
2800
48
                }
2801
99
            }
2802
475
        }
2803
2804
661
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
661
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
661
        const auto& result = results.back();
2811
2812
661
        if ( result.second != std::nullopt ) {
2813
46
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
46
        }
2820
2821
661
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
661
        if ( options.disableTests == false ) {
2830
661
            tests::test(op, result.second);
2831
661
        }
2832
2833
661
        postprocess(module, op, result);
2834
661
    }
2835
2836
213
    if ( options.noCompare == false ) {
2837
186
        compare(operations, results, data, size);
2838
186
    }
2839
213
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
128
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
128
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
128
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
760
    do {
2725
760
        auto op = getOp(&parentDs, data, size);
2726
760
        auto module = getModule(parentDs);
2727
760
        if ( module == nullptr ) {
2728
537
            continue;
2729
537
        }
2730
2731
223
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
223
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
755
    } while ( parentDs.Get<bool>() == true );
2738
2739
128
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
122
#if 1
2745
122
    {
2746
122
        std::set<uint64_t> moduleIDs;
2747
261
        for (const auto& m : modules ) {
2748
261
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
261
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
261
            moduleIDs.insert(moduleID);
2756
261
        }
2757
2758
122
        std::set<uint64_t> operationModuleIDs;
2759
173
        for (const auto& op : operations) {
2760
173
            operationModuleIDs.insert(op.first->ID);
2761
173
        }
2762
2763
122
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
122
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
122
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
169
        for (const auto& id : addModuleIDs) {
2768
169
            operations.push_back({ modules.at(id), operations[0].second});
2769
169
        }
2770
122
    }
2771
122
#endif
2772
2773
122
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
122
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
464
    for (size_t i = 0; i < operations.size(); i++) {
2781
342
        auto& operation = operations[i];
2782
2783
342
        auto& module = operation.first;
2784
342
        auto& op = operation.second;
2785
2786
342
        if ( i > 0 ) {
2787
255
            auto& prevModule = operations[i-1].first;
2788
255
            auto& prevOp = operations[i].second;
2789
2790
255
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
81
                auto& curModifier = op.modifier.GetVectorPtr();
2792
81
                if ( curModifier.size() == 0 ) {
2793
18.9k
                    for (size_t j = 0; j < 512; j++) {
2794
18.9k
                        curModifier.push_back(1);
2795
18.9k
                    }
2796
44
                } else {
2797
25.9k
                    for (auto& c : curModifier) {
2798
25.9k
                        c++;
2799
25.9k
                    }
2800
44
                }
2801
81
            }
2802
255
        }
2803
2804
342
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
342
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
342
        const auto& result = results.back();
2811
2812
342
        if ( result.second != std::nullopt ) {
2813
25
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
25
        }
2820
2821
342
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
342
        if ( options.disableTests == false ) {
2830
342
            tests::test(op, result.second);
2831
342
        }
2832
2833
342
        postprocess(module, op, result);
2834
342
    }
2835
2836
122
    if ( options.noCompare == false ) {
2837
87
        compare(operations, results, data, size);
2838
87
    }
2839
122
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
150
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
150
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
150
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
890
    do {
2725
890
        auto op = getOp(&parentDs, data, size);
2726
890
        auto module = getModule(parentDs);
2727
890
        if ( module == nullptr ) {
2728
666
            continue;
2729
666
        }
2730
2731
224
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
224
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
883
    } while ( parentDs.Get<bool>() == true );
2738
2739
150
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
141
#if 1
2745
141
    {
2746
141
        std::set<uint64_t> moduleIDs;
2747
360
        for (const auto& m : modules ) {
2748
360
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
360
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
360
            moduleIDs.insert(moduleID);
2756
360
        }
2757
2758
141
        std::set<uint64_t> operationModuleIDs;
2759
198
        for (const auto& op : operations) {
2760
198
            operationModuleIDs.insert(op.first->ID);
2761
198
        }
2762
2763
141
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
141
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
141
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
234
        for (const auto& id : addModuleIDs) {
2768
234
            operations.push_back({ modules.at(id), operations[0].second});
2769
234
        }
2770
141
    }
2771
141
#endif
2772
2773
141
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
141
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
573
    for (size_t i = 0; i < operations.size(); i++) {
2781
432
        auto& operation = operations[i];
2782
2783
432
        auto& module = operation.first;
2784
432
        auto& op = operation.second;
2785
2786
432
        if ( i > 0 ) {
2787
312
            auto& prevModule = operations[i-1].first;
2788
312
            auto& prevOp = operations[i].second;
2789
2790
312
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
68
                auto& curModifier = op.modifier.GetVectorPtr();
2792
68
                if ( curModifier.size() == 0 ) {
2793
20.5k
                    for (size_t j = 0; j < 512; j++) {
2794
20.4k
                        curModifier.push_back(1);
2795
20.4k
                    }
2796
40
                } else {
2797
30.9k
                    for (auto& c : curModifier) {
2798
30.9k
                        c++;
2799
30.9k
                    }
2800
28
                }
2801
68
            }
2802
312
        }
2803
2804
432
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
432
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
432
        const auto& result = results.back();
2811
2812
432
        if ( result.second != std::nullopt ) {
2813
118
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
118
        }
2820
2821
432
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
432
        if ( options.disableTests == false ) {
2830
432
            tests::test(op, result.second);
2831
432
        }
2832
2833
432
        postprocess(module, op, result);
2834
432
    }
2835
2836
141
    if ( options.noCompare == false ) {
2837
120
        compare(operations, results, data, size);
2838
120
    }
2839
141
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
165
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
165
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
165
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.23k
    do {
2725
1.23k
        auto op = getOp(&parentDs, data, size);
2726
1.23k
        auto module = getModule(parentDs);
2727
1.23k
        if ( module == nullptr ) {
2728
963
            continue;
2729
963
        }
2730
2731
268
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
268
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
1.22k
    } while ( parentDs.Get<bool>() == true );
2738
2739
165
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
159
#if 1
2745
159
    {
2746
159
        std::set<uint64_t> moduleIDs;
2747
384
        for (const auto& m : modules ) {
2748
384
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
384
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
384
            moduleIDs.insert(moduleID);
2756
384
        }
2757
2758
159
        std::set<uint64_t> operationModuleIDs;
2759
228
        for (const auto& op : operations) {
2760
228
            operationModuleIDs.insert(op.first->ID);
2761
228
        }
2762
2763
159
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
159
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
159
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
247
        for (const auto& id : addModuleIDs) {
2768
247
            operations.push_back({ modules.at(id), operations[0].second});
2769
247
        }
2770
159
    }
2771
159
#endif
2772
2773
159
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
159
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
634
    for (size_t i = 0; i < operations.size(); i++) {
2781
475
        auto& operation = operations[i];
2782
2783
475
        auto& module = operation.first;
2784
475
        auto& op = operation.second;
2785
2786
475
        if ( i > 0 ) {
2787
347
            auto& prevModule = operations[i-1].first;
2788
347
            auto& prevOp = operations[i].second;
2789
2790
347
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
84
                auto& curModifier = op.modifier.GetVectorPtr();
2792
84
                if ( curModifier.size() == 0 ) {
2793
27.1k
                    for (size_t j = 0; j < 512; j++) {
2794
27.1k
                        curModifier.push_back(1);
2795
27.1k
                    }
2796
53
                } else {
2797
33.5k
                    for (auto& c : curModifier) {
2798
33.5k
                        c++;
2799
33.5k
                    }
2800
31
                }
2801
84
            }
2802
347
        }
2803
2804
475
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
475
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
475
        const auto& result = results.back();
2811
2812
475
        if ( result.second != std::nullopt ) {
2813
40
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
40
        }
2820
2821
475
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
475
        if ( options.disableTests == false ) {
2830
475
            tests::test(op, result.second);
2831
475
        }
2832
2833
475
        postprocess(module, op, result);
2834
475
    }
2835
2836
159
    if ( options.noCompare == false ) {
2837
128
        compare(operations, results, data, size);
2838
128
    }
2839
159
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
9.22k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
9.22k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
9.22k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
26.9k
    do {
2725
26.9k
        auto op = getOp(&parentDs, data, size);
2726
26.9k
        auto module = getModule(parentDs);
2727
26.9k
        if ( module == nullptr ) {
2728
10.5k
            continue;
2729
10.5k
        }
2730
2731
16.3k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
16.3k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
404
            break;
2736
404
        }
2737
26.5k
    } while ( parentDs.Get<bool>() == true );
2738
2739
9.22k
    if ( operations.empty() == true ) {
2740
67
        return;
2741
67
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
9.15k
#if 1
2745
9.15k
    {
2746
9.15k
        std::set<uint64_t> moduleIDs;
2747
27.0k
        for (const auto& m : modules ) {
2748
27.0k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
27.0k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
27.0k
            moduleIDs.insert(moduleID);
2756
27.0k
        }
2757
2758
9.15k
        std::set<uint64_t> operationModuleIDs;
2759
16.2k
        for (const auto& op : operations) {
2760
16.2k
            operationModuleIDs.insert(op.first->ID);
2761
16.2k
        }
2762
2763
9.15k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
9.15k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
9.15k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
17.9k
        for (const auto& id : addModuleIDs) {
2768
17.9k
            operations.push_back({ modules.at(id), operations[0].second});
2769
17.9k
        }
2770
9.15k
    }
2771
9.15k
#endif
2772
2773
9.15k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
9.15k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
43.3k
    for (size_t i = 0; i < operations.size(); i++) {
2781
34.1k
        auto& operation = operations[i];
2782
2783
34.1k
        auto& module = operation.first;
2784
34.1k
        auto& op = operation.second;
2785
2786
34.1k
        if ( i > 0 ) {
2787
25.1k
            auto& prevModule = operations[i-1].first;
2788
25.1k
            auto& prevOp = operations[i].second;
2789
2790
25.1k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
7.06k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
7.06k
                if ( curModifier.size() == 0 ) {
2793
1.38M
                    for (size_t j = 0; j < 512; j++) {
2794
1.38M
                        curModifier.push_back(1);
2795
1.38M
                    }
2796
4.35k
                } else {
2797
420k
                    for (auto& c : curModifier) {
2798
420k
                        c++;
2799
420k
                    }
2800
4.35k
                }
2801
7.06k
            }
2802
25.1k
        }
2803
2804
34.1k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
34.1k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
34.1k
        const auto& result = results.back();
2811
2812
34.1k
        if ( result.second != std::nullopt ) {
2813
21.0k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
21.0k
        }
2820
2821
34.1k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
34.1k
        if ( options.disableTests == false ) {
2830
34.1k
            tests::test(op, result.second);
2831
34.1k
        }
2832
2833
34.1k
        postprocess(module, op, result);
2834
34.1k
    }
2835
2836
9.15k
    if ( options.noCompare == false ) {
2837
9.02k
        compare(operations, results, data, size);
2838
9.02k
    }
2839
9.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
52
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
52
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
52
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
363
    do {
2725
363
        auto op = getOp(&parentDs, data, size);
2726
363
        auto module = getModule(parentDs);
2727
363
        if ( module == nullptr ) {
2728
275
            continue;
2729
275
        }
2730
2731
88
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
88
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
361
    } while ( parentDs.Get<bool>() == true );
2738
2739
52
    if ( operations.empty() == true ) {
2740
3
        return;
2741
3
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
49
#if 1
2745
49
    {
2746
49
        std::set<uint64_t> moduleIDs;
2747
84
        for (const auto& m : modules ) {
2748
84
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
84
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
84
            moduleIDs.insert(moduleID);
2756
84
        }
2757
2758
49
        std::set<uint64_t> operationModuleIDs;
2759
60
        for (const auto& op : operations) {
2760
60
            operationModuleIDs.insert(op.first->ID);
2761
60
        }
2762
2763
49
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
49
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
49
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
49
        for (const auto& id : addModuleIDs) {
2768
49
            operations.push_back({ modules.at(id), operations[0].second});
2769
49
        }
2770
49
    }
2771
49
#endif
2772
2773
49
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
49
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
158
    for (size_t i = 0; i < operations.size(); i++) {
2781
109
        auto& operation = operations[i];
2782
2783
109
        auto& module = operation.first;
2784
109
        auto& op = operation.second;
2785
2786
109
        if ( i > 0 ) {
2787
81
            auto& prevModule = operations[i-1].first;
2788
81
            auto& prevOp = operations[i].second;
2789
2790
81
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
22
                auto& curModifier = op.modifier.GetVectorPtr();
2792
22
                if ( curModifier.size() == 0 ) {
2793
4.10k
                    for (size_t j = 0; j < 512; j++) {
2794
4.09k
                        curModifier.push_back(1);
2795
4.09k
                    }
2796
14
                } else {
2797
2.56k
                    for (auto& c : curModifier) {
2798
2.56k
                        c++;
2799
2.56k
                    }
2800
14
                }
2801
22
            }
2802
81
        }
2803
2804
109
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
109
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
109
        const auto& result = results.back();
2811
2812
109
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
109
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
109
        if ( options.disableTests == false ) {
2830
109
            tests::test(op, result.second);
2831
109
        }
2832
2833
109
        postprocess(module, op, result);
2834
109
    }
2835
2836
49
    if ( options.noCompare == false ) {
2837
28
        compare(operations, results, data, size);
2838
28
    }
2839
49
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
99
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
99
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
99
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
526
    do {
2725
526
        auto op = getOp(&parentDs, data, size);
2726
526
        auto module = getModule(parentDs);
2727
526
        if ( module == nullptr ) {
2728
353
            continue;
2729
353
        }
2730
2731
173
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
173
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
521
    } while ( parentDs.Get<bool>() == true );
2738
2739
99
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
95
#if 1
2745
95
    {
2746
95
        std::set<uint64_t> moduleIDs;
2747
183
        for (const auto& m : modules ) {
2748
183
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
183
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
183
            moduleIDs.insert(moduleID);
2756
183
        }
2757
2758
95
        std::set<uint64_t> operationModuleIDs;
2759
120
        for (const auto& op : operations) {
2760
120
            operationModuleIDs.insert(op.first->ID);
2761
120
        }
2762
2763
95
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
95
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
95
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
120
        for (const auto& id : addModuleIDs) {
2768
120
            operations.push_back({ modules.at(id), operations[0].second});
2769
120
        }
2770
95
    }
2771
95
#endif
2772
2773
95
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
95
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
335
    for (size_t i = 0; i < operations.size(); i++) {
2781
240
        auto& operation = operations[i];
2782
2783
240
        auto& module = operation.first;
2784
240
        auto& op = operation.second;
2785
2786
240
        if ( i > 0 ) {
2787
179
            auto& prevModule = operations[i-1].first;
2788
179
            auto& prevOp = operations[i].second;
2789
2790
179
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
57
                auto& curModifier = op.modifier.GetVectorPtr();
2792
57
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
51
                } else {
2797
12.7k
                    for (auto& c : curModifier) {
2798
12.7k
                        c++;
2799
12.7k
                    }
2800
51
                }
2801
57
            }
2802
179
        }
2803
2804
240
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
240
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
240
        const auto& result = results.back();
2811
2812
240
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
240
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
240
        if ( options.disableTests == false ) {
2830
240
            tests::test(op, result.second);
2831
240
        }
2832
2833
240
        postprocess(module, op, result);
2834
240
    }
2835
2836
95
    if ( options.noCompare == false ) {
2837
61
        compare(operations, results, data, size);
2838
61
    }
2839
95
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
70
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
70
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
70
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
564
    do {
2725
564
        auto op = getOp(&parentDs, data, size);
2726
564
        auto module = getModule(parentDs);
2727
564
        if ( module == nullptr ) {
2728
429
            continue;
2729
429
        }
2730
2731
135
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
135
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
559
    } while ( parentDs.Get<bool>() == true );
2738
2739
70
    if ( operations.empty() == true ) {
2740
3
        return;
2741
3
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
67
#if 1
2745
67
    {
2746
67
        std::set<uint64_t> moduleIDs;
2747
102
        for (const auto& m : modules ) {
2748
102
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
102
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
102
            moduleIDs.insert(moduleID);
2756
102
        }
2757
2758
67
        std::set<uint64_t> operationModuleIDs;
2759
88
        for (const auto& op : operations) {
2760
88
            operationModuleIDs.insert(op.first->ID);
2761
88
        }
2762
2763
67
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
67
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
67
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
67
        for (const auto& id : addModuleIDs) {
2768
58
            operations.push_back({ modules.at(id), operations[0].second});
2769
58
        }
2770
67
    }
2771
67
#endif
2772
2773
67
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
67
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
213
    for (size_t i = 0; i < operations.size(); i++) {
2781
146
        auto& operation = operations[i];
2782
2783
146
        auto& module = operation.first;
2784
146
        auto& op = operation.second;
2785
2786
146
        if ( i > 0 ) {
2787
112
            auto& prevModule = operations[i-1].first;
2788
112
            auto& prevOp = operations[i].second;
2789
2790
112
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
39
                auto& curModifier = op.modifier.GetVectorPtr();
2792
39
                if ( curModifier.size() == 0 ) {
2793
9.74k
                    for (size_t j = 0; j < 512; j++) {
2794
9.72k
                        curModifier.push_back(1);
2795
9.72k
                    }
2796
20
                } else {
2797
365
                    for (auto& c : curModifier) {
2798
365
                        c++;
2799
365
                    }
2800
20
                }
2801
39
            }
2802
112
        }
2803
2804
146
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
146
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
146
        const auto& result = results.back();
2811
2812
146
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
146
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
146
        if ( options.disableTests == false ) {
2830
146
            tests::test(op, result.second);
2831
146
        }
2832
2833
146
        postprocess(module, op, result);
2834
146
    }
2835
2836
67
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
67
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
64
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
64
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
64
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
537
    do {
2725
537
        auto op = getOp(&parentDs, data, size);
2726
537
        auto module = getModule(parentDs);
2727
537
        if ( module == nullptr ) {
2728
414
            continue;
2729
414
        }
2730
2731
123
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
123
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
534
    } while ( parentDs.Get<bool>() == true );
2738
2739
64
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
57
#if 1
2745
57
    {
2746
57
        std::set<uint64_t> moduleIDs;
2747
96
        for (const auto& m : modules ) {
2748
96
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
96
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
96
            moduleIDs.insert(moduleID);
2756
96
        }
2757
2758
57
        std::set<uint64_t> operationModuleIDs;
2759
80
        for (const auto& op : operations) {
2760
80
            operationModuleIDs.insert(op.first->ID);
2761
80
        }
2762
2763
57
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
57
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
57
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
57
        for (const auto& id : addModuleIDs) {
2768
55
            operations.push_back({ modules.at(id), operations[0].second});
2769
55
        }
2770
57
    }
2771
57
#endif
2772
2773
57
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
57
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
192
    for (size_t i = 0; i < operations.size(); i++) {
2781
135
        auto& operation = operations[i];
2782
2783
135
        auto& module = operation.first;
2784
135
        auto& op = operation.second;
2785
2786
135
        if ( i > 0 ) {
2787
103
            auto& prevModule = operations[i-1].first;
2788
103
            auto& prevOp = operations[i].second;
2789
2790
103
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
36
                auto& curModifier = op.modifier.GetVectorPtr();
2792
36
                if ( curModifier.size() == 0 ) {
2793
7.69k
                    for (size_t j = 0; j < 512; j++) {
2794
7.68k
                        curModifier.push_back(1);
2795
7.68k
                    }
2796
21
                } else {
2797
928
                    for (auto& c : curModifier) {
2798
928
                        c++;
2799
928
                    }
2800
21
                }
2801
36
            }
2802
103
        }
2803
2804
135
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
135
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
135
        const auto& result = results.back();
2811
2812
135
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
135
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
135
        if ( options.disableTests == false ) {
2830
135
            tests::test(op, result.second);
2831
135
        }
2832
2833
135
        postprocess(module, op, result);
2834
135
    }
2835
2836
57
    if ( options.noCompare == false ) {
2837
32
        compare(operations, results, data, size);
2838
32
    }
2839
57
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
65
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
65
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
65
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
578
    do {
2725
578
        auto op = getOp(&parentDs, data, size);
2726
578
        auto module = getModule(parentDs);
2727
578
        if ( module == nullptr ) {
2728
488
            continue;
2729
488
        }
2730
2731
90
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
90
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
575
    } while ( parentDs.Get<bool>() == true );
2738
2739
65
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
51
#if 1
2745
51
    {
2746
51
        std::set<uint64_t> moduleIDs;
2747
75
        for (const auto& m : modules ) {
2748
75
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
75
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
75
            moduleIDs.insert(moduleID);
2756
75
        }
2757
2758
51
        std::set<uint64_t> operationModuleIDs;
2759
57
        for (const auto& op : operations) {
2760
57
            operationModuleIDs.insert(op.first->ID);
2761
57
        }
2762
2763
51
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
51
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
51
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
51
        for (const auto& id : addModuleIDs) {
2768
48
            operations.push_back({ modules.at(id), operations[0].second});
2769
48
        }
2770
51
    }
2771
51
#endif
2772
2773
51
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
51
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
156
    for (size_t i = 0; i < operations.size(); i++) {
2781
105
        auto& operation = operations[i];
2782
2783
105
        auto& module = operation.first;
2784
105
        auto& op = operation.second;
2785
2786
105
        if ( i > 0 ) {
2787
80
            auto& prevModule = operations[i-1].first;
2788
80
            auto& prevOp = operations[i].second;
2789
2790
80
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
30
                auto& curModifier = op.modifier.GetVectorPtr();
2792
30
                if ( curModifier.size() == 0 ) {
2793
5.13k
                    for (size_t j = 0; j < 512; j++) {
2794
5.12k
                        curModifier.push_back(1);
2795
5.12k
                    }
2796
20
                } else {
2797
1.84k
                    for (auto& c : curModifier) {
2798
1.84k
                        c++;
2799
1.84k
                    }
2800
20
                }
2801
30
            }
2802
80
        }
2803
2804
105
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
105
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
105
        const auto& result = results.back();
2811
2812
105
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
105
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
105
        if ( options.disableTests == false ) {
2830
105
            tests::test(op, result.second);
2831
105
        }
2832
2833
105
        postprocess(module, op, result);
2834
105
    }
2835
2836
51
    if ( options.noCompare == false ) {
2837
25
        compare(operations, results, data, size);
2838
25
    }
2839
51
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
55
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
55
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
55
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
834
    do {
2725
834
        auto op = getOp(&parentDs, data, size);
2726
834
        auto module = getModule(parentDs);
2727
834
        if ( module == nullptr ) {
2728
762
            continue;
2729
762
        }
2730
2731
72
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
72
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
833
    } while ( parentDs.Get<bool>() == true );
2738
2739
55
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
45
#if 1
2745
45
    {
2746
45
        std::set<uint64_t> moduleIDs;
2747
48
        for (const auto& m : modules ) {
2748
48
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
48
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
48
            moduleIDs.insert(moduleID);
2756
48
        }
2757
2758
45
        std::set<uint64_t> operationModuleIDs;
2759
45
        for (const auto& op : operations) {
2760
38
            operationModuleIDs.insert(op.first->ID);
2761
38
        }
2762
2763
45
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
45
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
45
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
45
        for (const auto& id : addModuleIDs) {
2768
25
            operations.push_back({ modules.at(id), operations[0].second});
2769
25
        }
2770
45
    }
2771
45
#endif
2772
2773
45
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
45
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
108
    for (size_t i = 0; i < operations.size(); i++) {
2781
63
        auto& operation = operations[i];
2782
2783
63
        auto& module = operation.first;
2784
63
        auto& op = operation.second;
2785
2786
63
        if ( i > 0 ) {
2787
47
            auto& prevModule = operations[i-1].first;
2788
47
            auto& prevOp = operations[i].second;
2789
2790
47
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
12
                auto& curModifier = op.modifier.GetVectorPtr();
2792
12
                if ( curModifier.size() == 0 ) {
2793
2.05k
                    for (size_t j = 0; j < 512; j++) {
2794
2.04k
                        curModifier.push_back(1);
2795
2.04k
                    }
2796
8
                } else {
2797
1.61k
                    for (auto& c : curModifier) {
2798
1.61k
                        c++;
2799
1.61k
                    }
2800
8
                }
2801
12
            }
2802
47
        }
2803
2804
63
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
63
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
63
        const auto& result = results.back();
2811
2812
63
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
63
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
63
        if ( options.disableTests == false ) {
2830
63
            tests::test(op, result.second);
2831
63
        }
2832
2833
63
        postprocess(module, op, result);
2834
63
    }
2835
2836
45
    if ( options.noCompare == false ) {
2837
16
        compare(operations, results, data, size);
2838
16
    }
2839
45
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
98
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
98
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
98
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.02k
    do {
2725
1.02k
        auto op = getOp(&parentDs, data, size);
2726
1.02k
        auto module = getModule(parentDs);
2727
1.02k
        if ( module == nullptr ) {
2728
888
            continue;
2729
888
        }
2730
2731
135
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
135
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
1.01k
    } while ( parentDs.Get<bool>() == true );
2738
2739
98
    if ( operations.empty() == true ) {
2740
20
        return;
2741
20
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
78
#if 1
2745
78
    {
2746
78
        std::set<uint64_t> moduleIDs;
2747
78
        for (const auto& m : modules ) {
2748
75
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
75
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
75
            moduleIDs.insert(moduleID);
2756
75
        }
2757
2758
78
        std::set<uint64_t> operationModuleIDs;
2759
78
        for (const auto& op : operations) {
2760
65
            operationModuleIDs.insert(op.first->ID);
2761
65
        }
2762
2763
78
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
78
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
78
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
78
        for (const auto& id : addModuleIDs) {
2768
43
            operations.push_back({ modules.at(id), operations[0].second});
2769
43
        }
2770
78
    }
2771
78
#endif
2772
2773
78
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
78
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
186
    for (size_t i = 0; i < operations.size(); i++) {
2781
108
        auto& operation = operations[i];
2782
2783
108
        auto& module = operation.first;
2784
108
        auto& op = operation.second;
2785
2786
108
        if ( i > 0 ) {
2787
83
            auto& prevModule = operations[i-1].first;
2788
83
            auto& prevOp = operations[i].second;
2789
2790
83
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
32
                auto& curModifier = op.modifier.GetVectorPtr();
2792
32
                if ( curModifier.size() == 0 ) {
2793
5.64k
                    for (size_t j = 0; j < 512; j++) {
2794
5.63k
                        curModifier.push_back(1);
2795
5.63k
                    }
2796
21
                } else {
2797
696
                    for (auto& c : curModifier) {
2798
696
                        c++;
2799
696
                    }
2800
21
                }
2801
32
            }
2802
83
        }
2803
2804
108
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
108
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
108
        const auto& result = results.back();
2811
2812
108
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
108
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
108
        if ( options.disableTests == false ) {
2830
108
            tests::test(op, result.second);
2831
108
        }
2832
2833
108
        postprocess(module, op, result);
2834
108
    }
2835
2836
78
    if ( options.noCompare == false ) {
2837
25
        compare(operations, results, data, size);
2838
25
    }
2839
78
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
103
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
103
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
103
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
912
    do {
2725
912
        auto op = getOp(&parentDs, data, size);
2726
912
        auto module = getModule(parentDs);
2727
912
        if ( module == nullptr ) {
2728
764
            continue;
2729
764
        }
2730
2731
148
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
148
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
908
    } while ( parentDs.Get<bool>() == true );
2738
2739
103
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
92
#if 1
2745
92
    {
2746
92
        std::set<uint64_t> moduleIDs;
2747
92
        for (const auto& m : modules ) {
2748
81
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
81
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
81
            moduleIDs.insert(moduleID);
2756
81
        }
2757
2758
92
        std::set<uint64_t> operationModuleIDs;
2759
92
        for (const auto& op : operations) {
2760
73
            operationModuleIDs.insert(op.first->ID);
2761
73
        }
2762
2763
92
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
92
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
92
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
92
        for (const auto& id : addModuleIDs) {
2768
44
            operations.push_back({ modules.at(id), operations[0].second});
2769
44
        }
2770
92
    }
2771
92
#endif
2772
2773
92
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
92
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
209
    for (size_t i = 0; i < operations.size(); i++) {
2781
117
        auto& operation = operations[i];
2782
2783
117
        auto& module = operation.first;
2784
117
        auto& op = operation.second;
2785
2786
117
        if ( i > 0 ) {
2787
90
            auto& prevModule = operations[i-1].first;
2788
90
            auto& prevOp = operations[i].second;
2789
2790
90
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
36
                auto& curModifier = op.modifier.GetVectorPtr();
2792
36
                if ( curModifier.size() == 0 ) {
2793
8.20k
                    for (size_t j = 0; j < 512; j++) {
2794
8.19k
                        curModifier.push_back(1);
2795
8.19k
                    }
2796
20
                } else {
2797
97
                    for (auto& c : curModifier) {
2798
97
                        c++;
2799
97
                    }
2800
20
                }
2801
36
            }
2802
90
        }
2803
2804
117
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
117
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
117
        const auto& result = results.back();
2811
2812
117
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
117
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
117
        if ( options.disableTests == false ) {
2830
117
            tests::test(op, result.second);
2831
117
        }
2832
2833
117
        postprocess(module, op, result);
2834
117
    }
2835
2836
92
    if ( options.noCompare == false ) {
2837
27
        compare(operations, results, data, size);
2838
27
    }
2839
92
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
86
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
86
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
86
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.54k
    do {
2725
1.54k
        auto op = getOp(&parentDs, data, size);
2726
1.54k
        auto module = getModule(parentDs);
2727
1.54k
        if ( module == nullptr ) {
2728
1.41k
            continue;
2729
1.41k
        }
2730
2731
134
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
134
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
1.53k
    } while ( parentDs.Get<bool>() == true );
2738
2739
86
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
73
#if 1
2745
73
    {
2746
73
        std::set<uint64_t> moduleIDs;
2747
73
        for (const auto& m : modules ) {
2748
51
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
51
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
51
            moduleIDs.insert(moduleID);
2756
51
        }
2757
2758
73
        std::set<uint64_t> operationModuleIDs;
2759
73
        for (const auto& op : operations) {
2760
54
            operationModuleIDs.insert(op.first->ID);
2761
54
        }
2762
2763
73
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
73
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
73
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
73
        for (const auto& id : addModuleIDs) {
2768
28
            operations.push_back({ modules.at(id), operations[0].second});
2769
28
        }
2770
73
    }
2771
73
#endif
2772
2773
73
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
73
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
155
    for (size_t i = 0; i < operations.size(); i++) {
2781
82
        auto& operation = operations[i];
2782
2783
82
        auto& module = operation.first;
2784
82
        auto& op = operation.second;
2785
2786
82
        if ( i > 0 ) {
2787
65
            auto& prevModule = operations[i-1].first;
2788
65
            auto& prevOp = operations[i].second;
2789
2790
65
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
28
                auto& curModifier = op.modifier.GetVectorPtr();
2792
28
                if ( curModifier.size() == 0 ) {
2793
5.13k
                    for (size_t j = 0; j < 512; j++) {
2794
5.12k
                        curModifier.push_back(1);
2795
5.12k
                    }
2796
18
                } else {
2797
69
                    for (auto& c : curModifier) {
2798
69
                        c++;
2799
69
                    }
2800
18
                }
2801
28
            }
2802
65
        }
2803
2804
82
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
82
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
82
        const auto& result = results.back();
2811
2812
82
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
82
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
82
        if ( options.disableTests == false ) {
2830
82
            tests::test(op, result.second);
2831
82
        }
2832
2833
82
        postprocess(module, op, result);
2834
82
    }
2835
2836
73
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
73
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
74
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
74
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
74
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
628
    do {
2725
628
        auto op = getOp(&parentDs, data, size);
2726
628
        auto module = getModule(parentDs);
2727
628
        if ( module == nullptr ) {
2728
482
            continue;
2729
482
        }
2730
2731
146
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
146
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
621
    } while ( parentDs.Get<bool>() == true );
2738
2739
74
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
69
#if 1
2745
69
    {
2746
69
        std::set<uint64_t> moduleIDs;
2747
69
        for (const auto& m : modules ) {
2748
63
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
63
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
63
            moduleIDs.insert(moduleID);
2756
63
        }
2757
2758
69
        std::set<uint64_t> operationModuleIDs;
2759
70
        for (const auto& op : operations) {
2760
70
            operationModuleIDs.insert(op.first->ID);
2761
70
        }
2762
2763
69
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
69
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
69
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
69
        for (const auto& id : addModuleIDs) {
2768
30
            operations.push_back({ modules.at(id), operations[0].second});
2769
30
        }
2770
69
    }
2771
69
#endif
2772
2773
69
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
69
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
169
    for (size_t i = 0; i < operations.size(); i++) {
2781
100
        auto& operation = operations[i];
2782
2783
100
        auto& module = operation.first;
2784
100
        auto& op = operation.second;
2785
2786
100
        if ( i > 0 ) {
2787
79
            auto& prevModule = operations[i-1].first;
2788
79
            auto& prevOp = operations[i].second;
2789
2790
79
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
36
                auto& curModifier = op.modifier.GetVectorPtr();
2792
36
                if ( curModifier.size() == 0 ) {
2793
11.2k
                    for (size_t j = 0; j < 512; j++) {
2794
11.2k
                        curModifier.push_back(1);
2795
11.2k
                    }
2796
22
                } else {
2797
80
                    for (auto& c : curModifier) {
2798
80
                        c++;
2799
80
                    }
2800
14
                }
2801
36
            }
2802
79
        }
2803
2804
100
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
100
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
100
        const auto& result = results.back();
2811
2812
100
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
100
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
100
        if ( options.disableTests == false ) {
2830
100
            tests::test(op, result.second);
2831
100
        }
2832
2833
100
        postprocess(module, op, result);
2834
100
    }
2835
2836
69
    if ( options.noCompare == false ) {
2837
21
        compare(operations, results, data, size);
2838
21
    }
2839
69
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
74
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
74
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
74
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
697
    do {
2725
697
        auto op = getOp(&parentDs, data, size);
2726
697
        auto module = getModule(parentDs);
2727
697
        if ( module == nullptr ) {
2728
575
            continue;
2729
575
        }
2730
2731
122
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
122
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
694
    } while ( parentDs.Get<bool>() == true );
2738
2739
74
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
65
#if 1
2745
65
    {
2746
65
        std::set<uint64_t> moduleIDs;
2747
65
        for (const auto& m : modules ) {
2748
63
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
63
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
63
            moduleIDs.insert(moduleID);
2756
63
        }
2757
2758
65
        std::set<uint64_t> operationModuleIDs;
2759
65
        for (const auto& op : operations) {
2760
55
            operationModuleIDs.insert(op.first->ID);
2761
55
        }
2762
2763
65
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
65
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
65
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
65
        for (const auto& id : addModuleIDs) {
2768
38
            operations.push_back({ modules.at(id), operations[0].second});
2769
38
        }
2770
65
    }
2771
65
#endif
2772
2773
65
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
65
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
158
    for (size_t i = 0; i < operations.size(); i++) {
2781
93
        auto& operation = operations[i];
2782
2783
93
        auto& module = operation.first;
2784
93
        auto& op = operation.second;
2785
2786
93
        if ( i > 0 ) {
2787
72
            auto& prevModule = operations[i-1].first;
2788
72
            auto& prevOp = operations[i].second;
2789
2790
72
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
27
                auto& curModifier = op.modifier.GetVectorPtr();
2792
27
                if ( curModifier.size() == 0 ) {
2793
3.59k
                    for (size_t j = 0; j < 512; j++) {
2794
3.58k
                        curModifier.push_back(1);
2795
3.58k
                    }
2796
20
                } else {
2797
1.11k
                    for (auto& c : curModifier) {
2798
1.11k
                        c++;
2799
1.11k
                    }
2800
20
                }
2801
27
            }
2802
72
        }
2803
2804
93
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
93
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
93
        const auto& result = results.back();
2811
2812
93
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
93
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
93
        if ( options.disableTests == false ) {
2830
93
            tests::test(op, result.second);
2831
93
        }
2832
2833
93
        postprocess(module, op, result);
2834
93
    }
2835
2836
65
    if ( options.noCompare == false ) {
2837
21
        compare(operations, results, data, size);
2838
21
    }
2839
65
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
64
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
64
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
64
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
639
    do {
2725
639
        auto op = getOp(&parentDs, data, size);
2726
639
        auto module = getModule(parentDs);
2727
639
        if ( module == nullptr ) {
2728
541
            continue;
2729
541
        }
2730
2731
98
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
98
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
634
    } while ( parentDs.Get<bool>() == true );
2738
2739
64
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
55
#if 1
2745
55
    {
2746
55
        std::set<uint64_t> moduleIDs;
2747
55
        for (const auto& m : modules ) {
2748
54
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
54
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
54
            moduleIDs.insert(moduleID);
2756
54
        }
2757
2758
55
        std::set<uint64_t> operationModuleIDs;
2759
55
        for (const auto& op : operations) {
2760
55
            operationModuleIDs.insert(op.first->ID);
2761
55
        }
2762
2763
55
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
55
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
55
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
55
        for (const auto& id : addModuleIDs) {
2768
31
            operations.push_back({ modules.at(id), operations[0].second});
2769
31
        }
2770
55
    }
2771
55
#endif
2772
2773
55
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
55
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
141
    for (size_t i = 0; i < operations.size(); i++) {
2781
86
        auto& operation = operations[i];
2782
2783
86
        auto& module = operation.first;
2784
86
        auto& op = operation.second;
2785
2786
86
        if ( i > 0 ) {
2787
68
            auto& prevModule = operations[i-1].first;
2788
68
            auto& prevOp = operations[i].second;
2789
2790
68
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
31
                auto& curModifier = op.modifier.GetVectorPtr();
2792
31
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
25
                } else {
2797
2.95k
                    for (auto& c : curModifier) {
2798
2.95k
                        c++;
2799
2.95k
                    }
2800
25
                }
2801
31
            }
2802
68
        }
2803
2804
86
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
86
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
86
        const auto& result = results.back();
2811
2812
86
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
86
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
86
        if ( options.disableTests == false ) {
2830
86
            tests::test(op, result.second);
2831
86
        }
2832
2833
86
        postprocess(module, op, result);
2834
86
    }
2835
2836
55
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
55
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
77
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
77
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
77
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
497
    do {
2725
497
        auto op = getOp(&parentDs, data, size);
2726
497
        auto module = getModule(parentDs);
2727
497
        if ( module == nullptr ) {
2728
358
            continue;
2729
358
        }
2730
2731
139
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
139
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
490
    } while ( parentDs.Get<bool>() == true );
2738
2739
77
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
64
#if 1
2745
64
    {
2746
64
        std::set<uint64_t> moduleIDs;
2747
72
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
64
        std::set<uint64_t> operationModuleIDs;
2759
80
        for (const auto& op : operations) {
2760
80
            operationModuleIDs.insert(op.first->ID);
2761
80
        }
2762
2763
64
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
64
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
64
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
64
        for (const auto& id : addModuleIDs) {
2768
34
            operations.push_back({ modules.at(id), operations[0].second});
2769
34
        }
2770
64
    }
2771
64
#endif
2772
2773
64
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
64
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
178
    for (size_t i = 0; i < operations.size(); i++) {
2781
114
        auto& operation = operations[i];
2782
2783
114
        auto& module = operation.first;
2784
114
        auto& op = operation.second;
2785
2786
114
        if ( i > 0 ) {
2787
90
            auto& prevModule = operations[i-1].first;
2788
90
            auto& prevOp = operations[i].second;
2789
2790
90
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
34
                auto& curModifier = op.modifier.GetVectorPtr();
2792
34
                if ( curModifier.size() == 0 ) {
2793
9.74k
                    for (size_t j = 0; j < 512; j++) {
2794
9.72k
                        curModifier.push_back(1);
2795
9.72k
                    }
2796
19
                } else {
2797
41.8k
                    for (auto& c : curModifier) {
2798
41.8k
                        c++;
2799
41.8k
                    }
2800
15
                }
2801
34
            }
2802
90
        }
2803
2804
114
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
114
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
114
        const auto& result = results.back();
2811
2812
114
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
114
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
114
        if ( options.disableTests == false ) {
2830
114
            tests::test(op, result.second);
2831
114
        }
2832
2833
114
        postprocess(module, op, result);
2834
114
    }
2835
2836
64
    if ( options.noCompare == false ) {
2837
24
        compare(operations, results, data, size);
2838
24
    }
2839
64
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
64
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
64
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
64
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
897
    do {
2725
897
        auto op = getOp(&parentDs, data, size);
2726
897
        auto module = getModule(parentDs);
2727
897
        if ( module == nullptr ) {
2728
778
            continue;
2729
778
        }
2730
2731
119
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
119
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
892
    } while ( parentDs.Get<bool>() == true );
2738
2739
64
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
53
#if 1
2745
53
    {
2746
53
        std::set<uint64_t> moduleIDs;
2747
78
        for (const auto& m : modules ) {
2748
78
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
78
            moduleIDs.insert(moduleID);
2756
78
        }
2757
2758
53
        std::set<uint64_t> operationModuleIDs;
2759
73
        for (const auto& op : operations) {
2760
73
            operationModuleIDs.insert(op.first->ID);
2761
73
        }
2762
2763
53
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
53
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
53
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
53
        for (const auto& id : addModuleIDs) {
2768
47
            operations.push_back({ modules.at(id), operations[0].second});
2769
47
        }
2770
53
    }
2771
53
#endif
2772
2773
53
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
53
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
173
    for (size_t i = 0; i < operations.size(); i++) {
2781
120
        auto& operation = operations[i];
2782
2783
120
        auto& module = operation.first;
2784
120
        auto& op = operation.second;
2785
2786
120
        if ( i > 0 ) {
2787
94
            auto& prevModule = operations[i-1].first;
2788
94
            auto& prevOp = operations[i].second;
2789
2790
94
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
41
                auto& curModifier = op.modifier.GetVectorPtr();
2792
41
                if ( curModifier.size() == 0 ) {
2793
6.66k
                    for (size_t j = 0; j < 512; j++) {
2794
6.65k
                        curModifier.push_back(1);
2795
6.65k
                    }
2796
28
                } else {
2797
19.5k
                    for (auto& c : curModifier) {
2798
19.5k
                        c++;
2799
19.5k
                    }
2800
28
                }
2801
41
            }
2802
94
        }
2803
2804
120
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
120
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
120
        const auto& result = results.back();
2811
2812
120
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
120
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
120
        if ( options.disableTests == false ) {
2830
120
            tests::test(op, result.second);
2831
120
        }
2832
2833
120
        postprocess(module, op, result);
2834
120
    }
2835
2836
53
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
53
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
70
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
70
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
70
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.02k
    do {
2725
1.02k
        auto op = getOp(&parentDs, data, size);
2726
1.02k
        auto module = getModule(parentDs);
2727
1.02k
        if ( module == nullptr ) {
2728
898
            continue;
2729
898
        }
2730
2731
126
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
126
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
1.01k
    } while ( parentDs.Get<bool>() == true );
2738
2739
70
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
58
#if 1
2745
58
    {
2746
58
        std::set<uint64_t> moduleIDs;
2747
78
        for (const auto& m : modules ) {
2748
78
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
78
            moduleIDs.insert(moduleID);
2756
78
        }
2757
2758
58
        std::set<uint64_t> operationModuleIDs;
2759
80
        for (const auto& op : operations) {
2760
80
            operationModuleIDs.insert(op.first->ID);
2761
80
        }
2762
2763
58
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
58
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
58
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
58
        for (const auto& id : addModuleIDs) {
2768
40
            operations.push_back({ modules.at(id), operations[0].second});
2769
40
        }
2770
58
    }
2771
58
#endif
2772
2773
58
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
58
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
178
    for (size_t i = 0; i < operations.size(); i++) {
2781
120
        auto& operation = operations[i];
2782
2783
120
        auto& module = operation.first;
2784
120
        auto& op = operation.second;
2785
2786
120
        if ( i > 0 ) {
2787
94
            auto& prevModule = operations[i-1].first;
2788
94
            auto& prevOp = operations[i].second;
2789
2790
94
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
35
                auto& curModifier = op.modifier.GetVectorPtr();
2792
35
                if ( curModifier.size() == 0 ) {
2793
5.64k
                    for (size_t j = 0; j < 512; j++) {
2794
5.63k
                        curModifier.push_back(1);
2795
5.63k
                    }
2796
24
                } else {
2797
2.08k
                    for (auto& c : curModifier) {
2798
2.08k
                        c++;
2799
2.08k
                    }
2800
24
                }
2801
35
            }
2802
94
        }
2803
2804
120
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
120
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
120
        const auto& result = results.back();
2811
2812
120
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
120
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
120
        if ( options.disableTests == false ) {
2830
120
            tests::test(op, result.second);
2831
120
        }
2832
2833
120
        postprocess(module, op, result);
2834
120
    }
2835
2836
58
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
58
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
57
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
57
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
57
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.07k
    do {
2725
1.07k
        auto op = getOp(&parentDs, data, size);
2726
1.07k
        auto module = getModule(parentDs);
2727
1.07k
        if ( module == nullptr ) {
2728
981
            continue;
2729
981
        }
2730
2731
95
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
95
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
1.07k
    } while ( parentDs.Get<bool>() == true );
2738
2739
57
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
47
#if 1
2745
47
    {
2746
47
        std::set<uint64_t> moduleIDs;
2747
72
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
47
        std::set<uint64_t> operationModuleIDs;
2759
65
        for (const auto& op : operations) {
2760
65
            operationModuleIDs.insert(op.first->ID);
2761
65
        }
2762
2763
47
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
47
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
47
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
47
        for (const auto& id : addModuleIDs) {
2768
45
            operations.push_back({ modules.at(id), operations[0].second});
2769
45
        }
2770
47
    }
2771
47
#endif
2772
2773
47
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
47
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
157
    for (size_t i = 0; i < operations.size(); i++) {
2781
110
        auto& operation = operations[i];
2782
2783
110
        auto& module = operation.first;
2784
110
        auto& op = operation.second;
2785
2786
110
        if ( i > 0 ) {
2787
86
            auto& prevModule = operations[i-1].first;
2788
86
            auto& prevOp = operations[i].second;
2789
2790
86
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
37
                auto& curModifier = op.modifier.GetVectorPtr();
2792
37
                if ( curModifier.size() == 0 ) {
2793
7.69k
                    for (size_t j = 0; j < 512; j++) {
2794
7.68k
                        curModifier.push_back(1);
2795
7.68k
                    }
2796
22
                } else {
2797
819
                    for (auto& c : curModifier) {
2798
819
                        c++;
2799
819
                    }
2800
22
                }
2801
37
            }
2802
86
        }
2803
2804
110
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
110
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
110
        const auto& result = results.back();
2811
2812
110
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
110
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
110
        if ( options.disableTests == false ) {
2830
110
            tests::test(op, result.second);
2831
110
        }
2832
2833
110
        postprocess(module, op, result);
2834
110
    }
2835
2836
47
    if ( options.noCompare == false ) {
2837
24
        compare(operations, results, data, size);
2838
24
    }
2839
47
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
62
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
62
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
62
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
708
    do {
2725
708
        auto op = getOp(&parentDs, data, size);
2726
708
        auto module = getModule(parentDs);
2727
708
        if ( module == nullptr ) {
2728
585
            continue;
2729
585
        }
2730
2731
123
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
123
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
704
    } while ( parentDs.Get<bool>() == true );
2738
2739
62
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
57
#if 1
2745
57
    {
2746
57
        std::set<uint64_t> moduleIDs;
2747
81
        for (const auto& m : modules ) {
2748
81
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
81
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
81
            moduleIDs.insert(moduleID);
2756
81
        }
2757
2758
57
        std::set<uint64_t> operationModuleIDs;
2759
73
        for (const auto& op : operations) {
2760
73
            operationModuleIDs.insert(op.first->ID);
2761
73
        }
2762
2763
57
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
57
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
57
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
57
        for (const auto& id : addModuleIDs) {
2768
45
            operations.push_back({ modules.at(id), operations[0].second});
2769
45
        }
2770
57
    }
2771
57
#endif
2772
2773
57
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
57
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
175
    for (size_t i = 0; i < operations.size(); i++) {
2781
118
        auto& operation = operations[i];
2782
2783
118
        auto& module = operation.first;
2784
118
        auto& op = operation.second;
2785
2786
118
        if ( i > 0 ) {
2787
91
            auto& prevModule = operations[i-1].first;
2788
91
            auto& prevOp = operations[i].second;
2789
2790
91
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
33
                auto& curModifier = op.modifier.GetVectorPtr();
2792
33
                if ( curModifier.size() == 0 ) {
2793
8.72k
                    for (size_t j = 0; j < 512; j++) {
2794
8.70k
                        curModifier.push_back(1);
2795
8.70k
                    }
2796
17
                } else {
2797
261
                    for (auto& c : curModifier) {
2798
261
                        c++;
2799
261
                    }
2800
16
                }
2801
33
            }
2802
91
        }
2803
2804
118
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
118
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
118
        const auto& result = results.back();
2811
2812
118
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
118
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
118
        if ( options.disableTests == false ) {
2830
118
            tests::test(op, result.second);
2831
118
        }
2832
2833
118
        postprocess(module, op, result);
2834
118
    }
2835
2836
57
    if ( options.noCompare == false ) {
2837
27
        compare(operations, results, data, size);
2838
27
    }
2839
57
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
64
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
64
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
64
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
750
    do {
2725
750
        auto op = getOp(&parentDs, data, size);
2726
750
        auto module = getModule(parentDs);
2727
750
        if ( module == nullptr ) {
2728
648
            continue;
2729
648
        }
2730
2731
102
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
102
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
747
    } while ( parentDs.Get<bool>() == true );
2738
2739
64
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
54
#if 1
2745
54
    {
2746
54
        std::set<uint64_t> moduleIDs;
2747
66
        for (const auto& m : modules ) {
2748
66
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
66
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
66
            moduleIDs.insert(moduleID);
2756
66
        }
2757
2758
54
        std::set<uint64_t> operationModuleIDs;
2759
59
        for (const auto& op : operations) {
2760
59
            operationModuleIDs.insert(op.first->ID);
2761
59
        }
2762
2763
54
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
54
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
54
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
54
        for (const auto& id : addModuleIDs) {
2768
40
            operations.push_back({ modules.at(id), operations[0].second});
2769
40
        }
2770
54
    }
2771
54
#endif
2772
2773
54
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
54
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
153
    for (size_t i = 0; i < operations.size(); i++) {
2781
99
        auto& operation = operations[i];
2782
2783
99
        auto& module = operation.first;
2784
99
        auto& op = operation.second;
2785
2786
99
        if ( i > 0 ) {
2787
77
            auto& prevModule = operations[i-1].first;
2788
77
            auto& prevOp = operations[i].second;
2789
2790
77
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
32
                auto& curModifier = op.modifier.GetVectorPtr();
2792
32
                if ( curModifier.size() == 0 ) {
2793
8.20k
                    for (size_t j = 0; j < 512; j++) {
2794
8.19k
                        curModifier.push_back(1);
2795
8.19k
                    }
2796
16
                } else {
2797
399
                    for (auto& c : curModifier) {
2798
399
                        c++;
2799
399
                    }
2800
16
                }
2801
32
            }
2802
77
        }
2803
2804
99
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
99
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
99
        const auto& result = results.back();
2811
2812
99
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
99
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
99
        if ( options.disableTests == false ) {
2830
99
            tests::test(op, result.second);
2831
99
        }
2832
2833
99
        postprocess(module, op, result);
2834
99
    }
2835
2836
54
    if ( options.noCompare == false ) {
2837
22
        compare(operations, results, data, size);
2838
22
    }
2839
54
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
69
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
69
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
69
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
593
    do {
2725
593
        auto op = getOp(&parentDs, data, size);
2726
593
        auto module = getModule(parentDs);
2727
593
        if ( module == nullptr ) {
2728
482
            continue;
2729
482
        }
2730
2731
111
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
111
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
592
    } while ( parentDs.Get<bool>() == true );
2738
2739
69
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
62
#if 1
2745
62
    {
2746
62
        std::set<uint64_t> moduleIDs;
2747
111
        for (const auto& m : modules ) {
2748
111
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
111
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
111
            moduleIDs.insert(moduleID);
2756
111
        }
2757
2758
62
        std::set<uint64_t> operationModuleIDs;
2759
83
        for (const auto& op : operations) {
2760
83
            operationModuleIDs.insert(op.first->ID);
2761
83
        }
2762
2763
62
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
62
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
62
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
64
        for (const auto& id : addModuleIDs) {
2768
64
            operations.push_back({ modules.at(id), operations[0].second});
2769
64
        }
2770
62
    }
2771
62
#endif
2772
2773
62
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
62
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
209
    for (size_t i = 0; i < operations.size(); i++) {
2781
147
        auto& operation = operations[i];
2782
2783
147
        auto& module = operation.first;
2784
147
        auto& op = operation.second;
2785
2786
147
        if ( i > 0 ) {
2787
110
            auto& prevModule = operations[i-1].first;
2788
110
            auto& prevOp = operations[i].second;
2789
2790
110
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
32
                auto& curModifier = op.modifier.GetVectorPtr();
2792
32
                if ( curModifier.size() == 0 ) {
2793
9.74k
                    for (size_t j = 0; j < 512; j++) {
2794
9.72k
                        curModifier.push_back(1);
2795
9.72k
                    }
2796
19
                } else {
2797
2.60k
                    for (auto& c : curModifier) {
2798
2.60k
                        c++;
2799
2.60k
                    }
2800
13
                }
2801
32
            }
2802
110
        }
2803
2804
147
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
147
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
147
        const auto& result = results.back();
2811
2812
147
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
147
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
147
        if ( options.disableTests == false ) {
2830
147
            tests::test(op, result.second);
2831
147
        }
2832
2833
147
        postprocess(module, op, result);
2834
147
    }
2835
2836
62
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
62
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
78
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
78
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
78
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
844
    do {
2725
844
        auto op = getOp(&parentDs, data, size);
2726
844
        auto module = getModule(parentDs);
2727
844
        if ( module == nullptr ) {
2728
713
            continue;
2729
713
        }
2730
2731
131
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
131
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
840
    } while ( parentDs.Get<bool>() == true );
2738
2739
78
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
64
#if 1
2745
64
    {
2746
64
        std::set<uint64_t> moduleIDs;
2747
72
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
64
        std::set<uint64_t> operationModuleIDs;
2759
66
        for (const auto& op : operations) {
2760
66
            operationModuleIDs.insert(op.first->ID);
2761
66
        }
2762
2763
64
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
64
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
64
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
64
        for (const auto& id : addModuleIDs) {
2768
42
            operations.push_back({ modules.at(id), operations[0].second});
2769
42
        }
2770
64
    }
2771
64
#endif
2772
2773
64
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
64
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
172
    for (size_t i = 0; i < operations.size(); i++) {
2781
108
        auto& operation = operations[i];
2782
2783
108
        auto& module = operation.first;
2784
108
        auto& op = operation.second;
2785
2786
108
        if ( i > 0 ) {
2787
84
            auto& prevModule = operations[i-1].first;
2788
84
            auto& prevOp = operations[i].second;
2789
2790
84
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
33
                auto& curModifier = op.modifier.GetVectorPtr();
2792
33
                if ( curModifier.size() == 0 ) {
2793
7.69k
                    for (size_t j = 0; j < 512; j++) {
2794
7.68k
                        curModifier.push_back(1);
2795
7.68k
                    }
2796
18
                } else {
2797
2.48k
                    for (auto& c : curModifier) {
2798
2.48k
                        c++;
2799
2.48k
                    }
2800
18
                }
2801
33
            }
2802
84
        }
2803
2804
108
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
108
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
108
        const auto& result = results.back();
2811
2812
108
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
108
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
108
        if ( options.disableTests == false ) {
2830
108
            tests::test(op, result.second);
2831
108
        }
2832
2833
108
        postprocess(module, op, result);
2834
108
    }
2835
2836
64
    if ( options.noCompare == false ) {
2837
24
        compare(operations, results, data, size);
2838
24
    }
2839
64
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
67
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
67
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
67
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
609
    do {
2725
609
        auto op = getOp(&parentDs, data, size);
2726
609
        auto module = getModule(parentDs);
2727
609
        if ( module == nullptr ) {
2728
467
            continue;
2729
467
        }
2730
2731
142
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
142
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
604
    } while ( parentDs.Get<bool>() == true );
2738
2739
67
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
60
#if 1
2745
60
    {
2746
60
        std::set<uint64_t> moduleIDs;
2747
69
        for (const auto& m : modules ) {
2748
69
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
69
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
69
            moduleIDs.insert(moduleID);
2756
69
        }
2757
2758
60
        std::set<uint64_t> operationModuleIDs;
2759
66
        for (const auto& op : operations) {
2760
66
            operationModuleIDs.insert(op.first->ID);
2761
66
        }
2762
2763
60
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
60
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
60
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
60
        for (const auto& id : addModuleIDs) {
2768
40
            operations.push_back({ modules.at(id), operations[0].second});
2769
40
        }
2770
60
    }
2771
60
#endif
2772
2773
60
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
60
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
166
    for (size_t i = 0; i < operations.size(); i++) {
2781
106
        auto& operation = operations[i];
2782
2783
106
        auto& module = operation.first;
2784
106
        auto& op = operation.second;
2785
2786
106
        if ( i > 0 ) {
2787
83
            auto& prevModule = operations[i-1].first;
2788
83
            auto& prevOp = operations[i].second;
2789
2790
83
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
34
                auto& curModifier = op.modifier.GetVectorPtr();
2792
34
                if ( curModifier.size() == 0 ) {
2793
7.18k
                    for (size_t j = 0; j < 512; j++) {
2794
7.16k
                        curModifier.push_back(1);
2795
7.16k
                    }
2796
20
                } else {
2797
659
                    for (auto& c : curModifier) {
2798
659
                        c++;
2799
659
                    }
2800
20
                }
2801
34
            }
2802
83
        }
2803
2804
106
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
106
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
106
        const auto& result = results.back();
2811
2812
106
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
106
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
106
        if ( options.disableTests == false ) {
2830
106
            tests::test(op, result.second);
2831
106
        }
2832
2833
106
        postprocess(module, op, result);
2834
106
    }
2835
2836
60
    if ( options.noCompare == false ) {
2837
23
        compare(operations, results, data, size);
2838
23
    }
2839
60
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
69
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
69
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
69
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
951
    do {
2725
951
        auto op = getOp(&parentDs, data, size);
2726
951
        auto module = getModule(parentDs);
2727
951
        if ( module == nullptr ) {
2728
811
            continue;
2729
811
        }
2730
2731
140
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
140
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
947
    } while ( parentDs.Get<bool>() == true );
2738
2739
69
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
59
#if 1
2745
59
    {
2746
59
        std::set<uint64_t> moduleIDs;
2747
99
        for (const auto& m : modules ) {
2748
99
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
99
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
99
            moduleIDs.insert(moduleID);
2756
99
        }
2757
2758
59
        std::set<uint64_t> operationModuleIDs;
2759
89
        for (const auto& op : operations) {
2760
89
            operationModuleIDs.insert(op.first->ID);
2761
89
        }
2762
2763
59
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
59
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
59
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
59
        for (const auto& id : addModuleIDs) {
2768
54
            operations.push_back({ modules.at(id), operations[0].second});
2769
54
        }
2770
59
    }
2771
59
#endif
2772
2773
59
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
59
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
202
    for (size_t i = 0; i < operations.size(); i++) {
2781
143
        auto& operation = operations[i];
2782
2783
143
        auto& module = operation.first;
2784
143
        auto& op = operation.second;
2785
2786
143
        if ( i > 0 ) {
2787
110
            auto& prevModule = operations[i-1].first;
2788
110
            auto& prevOp = operations[i].second;
2789
2790
110
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
39
                auto& curModifier = op.modifier.GetVectorPtr();
2792
39
                if ( curModifier.size() == 0 ) {
2793
11.2k
                    for (size_t j = 0; j < 512; j++) {
2794
11.2k
                        curModifier.push_back(1);
2795
11.2k
                    }
2796
22
                } else {
2797
4.34k
                    for (auto& c : curModifier) {
2798
4.34k
                        c++;
2799
4.34k
                    }
2800
17
                }
2801
39
            }
2802
110
        }
2803
2804
143
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
143
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
143
        const auto& result = results.back();
2811
2812
143
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
143
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
143
        if ( options.disableTests == false ) {
2830
143
            tests::test(op, result.second);
2831
143
        }
2832
2833
143
        postprocess(module, op, result);
2834
143
    }
2835
2836
59
    if ( options.noCompare == false ) {
2837
33
        compare(operations, results, data, size);
2838
33
    }
2839
59
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
57
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
57
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
57
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
634
    do {
2725
634
        auto op = getOp(&parentDs, data, size);
2726
634
        auto module = getModule(parentDs);
2727
634
        if ( module == nullptr ) {
2728
524
            continue;
2729
524
        }
2730
2731
110
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
110
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
628
    } while ( parentDs.Get<bool>() == true );
2738
2739
57
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
48
#if 1
2745
48
    {
2746
48
        std::set<uint64_t> moduleIDs;
2747
78
        for (const auto& m : modules ) {
2748
78
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
78
            moduleIDs.insert(moduleID);
2756
78
        }
2757
2758
48
        std::set<uint64_t> operationModuleIDs;
2759
72
        for (const auto& op : operations) {
2760
72
            operationModuleIDs.insert(op.first->ID);
2761
72
        }
2762
2763
48
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
48
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
48
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
48
        for (const auto& id : addModuleIDs) {
2768
44
            operations.push_back({ modules.at(id), operations[0].second});
2769
44
        }
2770
48
    }
2771
48
#endif
2772
2773
48
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
48
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
164
    for (size_t i = 0; i < operations.size(); i++) {
2781
116
        auto& operation = operations[i];
2782
2783
116
        auto& module = operation.first;
2784
116
        auto& op = operation.second;
2785
2786
116
        if ( i > 0 ) {
2787
90
            auto& prevModule = operations[i-1].first;
2788
90
            auto& prevOp = operations[i].second;
2789
2790
90
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
36
                auto& curModifier = op.modifier.GetVectorPtr();
2792
36
                if ( curModifier.size() == 0 ) {
2793
8.72k
                    for (size_t j = 0; j < 512; j++) {
2794
8.70k
                        curModifier.push_back(1);
2795
8.70k
                    }
2796
19
                } else {
2797
1.77k
                    for (auto& c : curModifier) {
2798
1.77k
                        c++;
2799
1.77k
                    }
2800
19
                }
2801
36
            }
2802
90
        }
2803
2804
116
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
116
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
116
        const auto& result = results.back();
2811
2812
116
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
116
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
116
        if ( options.disableTests == false ) {
2830
116
            tests::test(op, result.second);
2831
116
        }
2832
2833
116
        postprocess(module, op, result);
2834
116
    }
2835
2836
48
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
48
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
66
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
66
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
66
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.02k
    do {
2725
1.02k
        auto op = getOp(&parentDs, data, size);
2726
1.02k
        auto module = getModule(parentDs);
2727
1.02k
        if ( module == nullptr ) {
2728
902
            continue;
2729
902
        }
2730
2731
125
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
125
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
1.01k
    } while ( parentDs.Get<bool>() == true );
2738
2739
66
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
56
#if 1
2745
56
    {
2746
56
        std::set<uint64_t> moduleIDs;
2747
78
        for (const auto& m : modules ) {
2748
78
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
78
            moduleIDs.insert(moduleID);
2756
78
        }
2757
2758
56
        std::set<uint64_t> operationModuleIDs;
2759
82
        for (const auto& op : operations) {
2760
82
            operationModuleIDs.insert(op.first->ID);
2761
82
        }
2762
2763
56
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
56
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
56
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
56
        for (const auto& id : addModuleIDs) {
2768
38
            operations.push_back({ modules.at(id), operations[0].second});
2769
38
        }
2770
56
    }
2771
56
#endif
2772
2773
56
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
56
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
176
    for (size_t i = 0; i < operations.size(); i++) {
2781
120
        auto& operation = operations[i];
2782
2783
120
        auto& module = operation.first;
2784
120
        auto& op = operation.second;
2785
2786
120
        if ( i > 0 ) {
2787
94
            auto& prevModule = operations[i-1].first;
2788
94
            auto& prevOp = operations[i].second;
2789
2790
94
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
32
                auto& curModifier = op.modifier.GetVectorPtr();
2792
32
                if ( curModifier.size() == 0 ) {
2793
10.2k
                    for (size_t j = 0; j < 512; j++) {
2794
10.2k
                        curModifier.push_back(1);
2795
10.2k
                    }
2796
20
                } else {
2797
992
                    for (auto& c : curModifier) {
2798
992
                        c++;
2799
992
                    }
2800
12
                }
2801
32
            }
2802
94
        }
2803
2804
120
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
120
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
120
        const auto& result = results.back();
2811
2812
120
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
120
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
120
        if ( options.disableTests == false ) {
2830
120
            tests::test(op, result.second);
2831
120
        }
2832
2833
120
        postprocess(module, op, result);
2834
120
    }
2835
2836
56
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
56
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
71
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
71
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
71
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
976
    do {
2725
976
        auto op = getOp(&parentDs, data, size);
2726
976
        auto module = getModule(parentDs);
2727
976
        if ( module == nullptr ) {
2728
849
            continue;
2729
849
        }
2730
2731
127
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
127
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
974
    } while ( parentDs.Get<bool>() == true );
2738
2739
71
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
63
#if 1
2745
63
    {
2746
63
        std::set<uint64_t> moduleIDs;
2747
87
        for (const auto& m : modules ) {
2748
87
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
87
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
87
            moduleIDs.insert(moduleID);
2756
87
        }
2757
2758
63
        std::set<uint64_t> operationModuleIDs;
2759
73
        for (const auto& op : operations) {
2760
73
            operationModuleIDs.insert(op.first->ID);
2761
73
        }
2762
2763
63
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
63
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
63
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
63
        for (const auto& id : addModuleIDs) {
2768
47
            operations.push_back({ modules.at(id), operations[0].second});
2769
47
        }
2770
63
    }
2771
63
#endif
2772
2773
63
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
63
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
183
    for (size_t i = 0; i < operations.size(); i++) {
2781
120
        auto& operation = operations[i];
2782
2783
120
        auto& module = operation.first;
2784
120
        auto& op = operation.second;
2785
2786
120
        if ( i > 0 ) {
2787
91
            auto& prevModule = operations[i-1].first;
2788
91
            auto& prevOp = operations[i].second;
2789
2790
91
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
24
                auto& curModifier = op.modifier.GetVectorPtr();
2792
24
                if ( curModifier.size() == 0 ) {
2793
4.10k
                    for (size_t j = 0; j < 512; j++) {
2794
4.09k
                        curModifier.push_back(1);
2795
4.09k
                    }
2796
16
                } else {
2797
15.8k
                    for (auto& c : curModifier) {
2798
15.8k
                        c++;
2799
15.8k
                    }
2800
16
                }
2801
24
            }
2802
91
        }
2803
2804
120
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
120
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
120
        const auto& result = results.back();
2811
2812
120
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
120
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
120
        if ( options.disableTests == false ) {
2830
120
            tests::test(op, result.second);
2831
120
        }
2832
2833
120
        postprocess(module, op, result);
2834
120
    }
2835
2836
63
    if ( options.noCompare == false ) {
2837
29
        compare(operations, results, data, size);
2838
29
    }
2839
63
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
66
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
66
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
66
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
880
    do {
2725
880
        auto op = getOp(&parentDs, data, size);
2726
880
        auto module = getModule(parentDs);
2727
880
        if ( module == nullptr ) {
2728
773
            continue;
2729
773
        }
2730
2731
107
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
107
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
878
    } while ( parentDs.Get<bool>() == true );
2738
2739
66
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
56
#if 1
2745
56
    {
2746
56
        std::set<uint64_t> moduleIDs;
2747
96
        for (const auto& m : modules ) {
2748
96
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
96
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
96
            moduleIDs.insert(moduleID);
2756
96
        }
2757
2758
56
        std::set<uint64_t> operationModuleIDs;
2759
71
        for (const auto& op : operations) {
2760
71
            operationModuleIDs.insert(op.first->ID);
2761
71
        }
2762
2763
56
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
56
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
56
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
60
        for (const auto& id : addModuleIDs) {
2768
60
            operations.push_back({ modules.at(id), operations[0].second});
2769
60
        }
2770
56
    }
2771
56
#endif
2772
2773
56
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
56
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
187
    for (size_t i = 0; i < operations.size(); i++) {
2781
131
        auto& operation = operations[i];
2782
2783
131
        auto& module = operation.first;
2784
131
        auto& op = operation.second;
2785
2786
131
        if ( i > 0 ) {
2787
99
            auto& prevModule = operations[i-1].first;
2788
99
            auto& prevOp = operations[i].second;
2789
2790
99
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
34
                auto& curModifier = op.modifier.GetVectorPtr();
2792
34
                if ( curModifier.size() == 0 ) {
2793
7.69k
                    for (size_t j = 0; j < 512; j++) {
2794
7.68k
                        curModifier.push_back(1);
2795
7.68k
                    }
2796
19
                } else {
2797
8.48k
                    for (auto& c : curModifier) {
2798
8.48k
                        c++;
2799
8.48k
                    }
2800
19
                }
2801
34
            }
2802
99
        }
2803
2804
131
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
131
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
131
        const auto& result = results.back();
2811
2812
131
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
131
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
131
        if ( options.disableTests == false ) {
2830
131
            tests::test(op, result.second);
2831
131
        }
2832
2833
131
        postprocess(module, op, result);
2834
131
    }
2835
2836
56
    if ( options.noCompare == false ) {
2837
32
        compare(operations, results, data, size);
2838
32
    }
2839
56
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
83
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
83
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
83
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
907
    do {
2725
907
        auto op = getOp(&parentDs, data, size);
2726
907
        auto module = getModule(parentDs);
2727
907
        if ( module == nullptr ) {
2728
772
            continue;
2729
772
        }
2730
2731
135
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
135
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
905
    } while ( parentDs.Get<bool>() == true );
2738
2739
83
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
69
#if 1
2745
69
    {
2746
69
        std::set<uint64_t> moduleIDs;
2747
96
        for (const auto& m : modules ) {
2748
96
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
96
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
96
            moduleIDs.insert(moduleID);
2756
96
        }
2757
2758
69
        std::set<uint64_t> operationModuleIDs;
2759
73
        for (const auto& op : operations) {
2760
73
            operationModuleIDs.insert(op.first->ID);
2761
73
        }
2762
2763
69
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
69
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
69
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
69
        for (const auto& id : addModuleIDs) {
2768
58
            operations.push_back({ modules.at(id), operations[0].second});
2769
58
        }
2770
69
    }
2771
69
#endif
2772
2773
69
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
69
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
200
    for (size_t i = 0; i < operations.size(); i++) {
2781
131
        auto& operation = operations[i];
2782
2783
131
        auto& module = operation.first;
2784
131
        auto& op = operation.second;
2785
2786
131
        if ( i > 0 ) {
2787
99
            auto& prevModule = operations[i-1].first;
2788
99
            auto& prevOp = operations[i].second;
2789
2790
99
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
34
                auto& curModifier = op.modifier.GetVectorPtr();
2792
34
                if ( curModifier.size() == 0 ) {
2793
6.15k
                    for (size_t j = 0; j < 512; j++) {
2794
6.14k
                        curModifier.push_back(1);
2795
6.14k
                    }
2796
22
                } else {
2797
1.78k
                    for (auto& c : curModifier) {
2798
1.78k
                        c++;
2799
1.78k
                    }
2800
22
                }
2801
34
            }
2802
99
        }
2803
2804
131
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
131
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
131
        const auto& result = results.back();
2811
2812
131
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
131
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
131
        if ( options.disableTests == false ) {
2830
131
            tests::test(op, result.second);
2831
131
        }
2832
2833
131
        postprocess(module, op, result);
2834
131
    }
2835
2836
69
    if ( options.noCompare == false ) {
2837
32
        compare(operations, results, data, size);
2838
32
    }
2839
69
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
62
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
62
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
62
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
632
    do {
2725
632
        auto op = getOp(&parentDs, data, size);
2726
632
        auto module = getModule(parentDs);
2727
632
        if ( module == nullptr ) {
2728
533
            continue;
2729
533
        }
2730
2731
99
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
99
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
629
    } while ( parentDs.Get<bool>() == true );
2738
2739
62
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
50
#if 1
2745
50
    {
2746
50
        std::set<uint64_t> moduleIDs;
2747
84
        for (const auto& m : modules ) {
2748
84
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
84
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
84
            moduleIDs.insert(moduleID);
2756
84
        }
2757
2758
50
        std::set<uint64_t> operationModuleIDs;
2759
68
        for (const auto& op : operations) {
2760
68
            operationModuleIDs.insert(op.first->ID);
2761
68
        }
2762
2763
50
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
50
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
50
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
51
        for (const auto& id : addModuleIDs) {
2768
51
            operations.push_back({ modules.at(id), operations[0].second});
2769
51
        }
2770
50
    }
2771
50
#endif
2772
2773
50
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
50
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
169
    for (size_t i = 0; i < operations.size(); i++) {
2781
119
        auto& operation = operations[i];
2782
2783
119
        auto& module = operation.first;
2784
119
        auto& op = operation.second;
2785
2786
119
        if ( i > 0 ) {
2787
91
            auto& prevModule = operations[i-1].first;
2788
91
            auto& prevOp = operations[i].second;
2789
2790
91
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
35
                auto& curModifier = op.modifier.GetVectorPtr();
2792
35
                if ( curModifier.size() == 0 ) {
2793
7.69k
                    for (size_t j = 0; j < 512; j++) {
2794
7.68k
                        curModifier.push_back(1);
2795
7.68k
                    }
2796
20
                } else {
2797
2.46k
                    for (auto& c : curModifier) {
2798
2.46k
                        c++;
2799
2.46k
                    }
2800
20
                }
2801
35
            }
2802
91
        }
2803
2804
119
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
119
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
119
        const auto& result = results.back();
2811
2812
119
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
119
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
119
        if ( options.disableTests == false ) {
2830
119
            tests::test(op, result.second);
2831
119
        }
2832
2833
119
        postprocess(module, op, result);
2834
119
    }
2835
2836
50
    if ( options.noCompare == false ) {
2837
28
        compare(operations, results, data, size);
2838
28
    }
2839
50
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
78
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
78
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
78
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
914
    do {
2725
914
        auto op = getOp(&parentDs, data, size);
2726
914
        auto module = getModule(parentDs);
2727
914
        if ( module == nullptr ) {
2728
783
            continue;
2729
783
        }
2730
2731
131
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
131
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
911
    } while ( parentDs.Get<bool>() == true );
2738
2739
78
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
63
#if 1
2745
63
    {
2746
63
        std::set<uint64_t> moduleIDs;
2747
72
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
63
        std::set<uint64_t> operationModuleIDs;
2759
66
        for (const auto& op : operations) {
2760
66
            operationModuleIDs.insert(op.first->ID);
2761
66
        }
2762
2763
63
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
63
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
63
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
63
        for (const auto& id : addModuleIDs) {
2768
35
            operations.push_back({ modules.at(id), operations[0].second});
2769
35
        }
2770
63
    }
2771
63
#endif
2772
2773
63
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
63
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
164
    for (size_t i = 0; i < operations.size(); i++) {
2781
101
        auto& operation = operations[i];
2782
2783
101
        auto& module = operation.first;
2784
101
        auto& op = operation.second;
2785
2786
101
        if ( i > 0 ) {
2787
77
            auto& prevModule = operations[i-1].first;
2788
77
            auto& prevOp = operations[i].second;
2789
2790
77
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
26
                auto& curModifier = op.modifier.GetVectorPtr();
2792
26
                if ( curModifier.size() == 0 ) {
2793
2.05k
                    for (size_t j = 0; j < 512; j++) {
2794
2.04k
                        curModifier.push_back(1);
2795
2.04k
                    }
2796
22
                } else {
2797
7.99k
                    for (auto& c : curModifier) {
2798
7.99k
                        c++;
2799
7.99k
                    }
2800
22
                }
2801
26
            }
2802
77
        }
2803
2804
101
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
101
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
101
        const auto& result = results.back();
2811
2812
101
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
101
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
101
        if ( options.disableTests == false ) {
2830
101
            tests::test(op, result.second);
2831
101
        }
2832
2833
101
        postprocess(module, op, result);
2834
101
    }
2835
2836
63
    if ( options.noCompare == false ) {
2837
24
        compare(operations, results, data, size);
2838
24
    }
2839
63
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
53
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
53
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
53
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
629
    do {
2725
629
        auto op = getOp(&parentDs, data, size);
2726
629
        auto module = getModule(parentDs);
2727
629
        if ( module == nullptr ) {
2728
537
            continue;
2729
537
        }
2730
2731
92
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
92
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
626
    } while ( parentDs.Get<bool>() == true );
2738
2739
53
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
44
#if 1
2745
44
    {
2746
44
        std::set<uint64_t> moduleIDs;
2747
72
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
44
        std::set<uint64_t> operationModuleIDs;
2759
65
        for (const auto& op : operations) {
2760
65
            operationModuleIDs.insert(op.first->ID);
2761
65
        }
2762
2763
44
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
44
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
44
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
44
        for (const auto& id : addModuleIDs) {
2768
32
            operations.push_back({ modules.at(id), operations[0].second});
2769
32
        }
2770
44
    }
2771
44
#endif
2772
2773
44
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
44
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
141
    for (size_t i = 0; i < operations.size(); i++) {
2781
97
        auto& operation = operations[i];
2782
2783
97
        auto& module = operation.first;
2784
97
        auto& op = operation.second;
2785
2786
97
        if ( i > 0 ) {
2787
73
            auto& prevModule = operations[i-1].first;
2788
73
            auto& prevOp = operations[i].second;
2789
2790
73
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
20
                auto& curModifier = op.modifier.GetVectorPtr();
2792
20
                if ( curModifier.size() == 0 ) {
2793
5.64k
                    for (size_t j = 0; j < 512; j++) {
2794
5.63k
                        curModifier.push_back(1);
2795
5.63k
                    }
2796
11
                } else {
2797
1.89k
                    for (auto& c : curModifier) {
2798
1.89k
                        c++;
2799
1.89k
                    }
2800
9
                }
2801
20
            }
2802
73
        }
2803
2804
97
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
97
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
97
        const auto& result = results.back();
2811
2812
97
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
97
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
97
        if ( options.disableTests == false ) {
2830
97
            tests::test(op, result.second);
2831
97
        }
2832
2833
97
        postprocess(module, op, result);
2834
97
    }
2835
2836
44
    if ( options.noCompare == false ) {
2837
24
        compare(operations, results, data, size);
2838
24
    }
2839
44
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
88
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
88
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
88
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
873
    do {
2725
873
        auto op = getOp(&parentDs, data, size);
2726
873
        auto module = getModule(parentDs);
2727
873
        if ( module == nullptr ) {
2728
720
            continue;
2729
720
        }
2730
2731
153
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
153
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
869
    } while ( parentDs.Get<bool>() == true );
2738
2739
88
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
75
#if 1
2745
75
    {
2746
75
        std::set<uint64_t> moduleIDs;
2747
108
        for (const auto& m : modules ) {
2748
108
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
108
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
108
            moduleIDs.insert(moduleID);
2756
108
        }
2757
2758
75
        std::set<uint64_t> operationModuleIDs;
2759
75
        for (const auto& op : operations) {
2760
72
            operationModuleIDs.insert(op.first->ID);
2761
72
        }
2762
2763
75
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
75
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
75
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
75
        for (const auto& id : addModuleIDs) {
2768
68
            operations.push_back({ modules.at(id), operations[0].second});
2769
68
        }
2770
75
    }
2771
75
#endif
2772
2773
75
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
75
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
215
    for (size_t i = 0; i < operations.size(); i++) {
2781
140
        auto& operation = operations[i];
2782
2783
140
        auto& module = operation.first;
2784
140
        auto& op = operation.second;
2785
2786
140
        if ( i > 0 ) {
2787
104
            auto& prevModule = operations[i-1].first;
2788
104
            auto& prevOp = operations[i].second;
2789
2790
104
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
28
                auto& curModifier = op.modifier.GetVectorPtr();
2792
28
                if ( curModifier.size() == 0 ) {
2793
10.2k
                    for (size_t j = 0; j < 512; j++) {
2794
10.2k
                        curModifier.push_back(1);
2795
10.2k
                    }
2796
20
                } else {
2797
10.0k
                    for (auto& c : curModifier) {
2798
10.0k
                        c++;
2799
10.0k
                    }
2800
8
                }
2801
28
            }
2802
104
        }
2803
2804
140
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
140
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
140
        const auto& result = results.back();
2811
2812
140
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
140
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
140
        if ( options.disableTests == false ) {
2830
140
            tests::test(op, result.second);
2831
140
        }
2832
2833
140
        postprocess(module, op, result);
2834
140
    }
2835
2836
75
    if ( options.noCompare == false ) {
2837
36
        compare(operations, results, data, size);
2838
36
    }
2839
75
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
66
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
66
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
66
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
698
    do {
2725
698
        auto op = getOp(&parentDs, data, size);
2726
698
        auto module = getModule(parentDs);
2727
698
        if ( module == nullptr ) {
2728
576
            continue;
2729
576
        }
2730
2731
122
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
122
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
693
    } while ( parentDs.Get<bool>() == true );
2738
2739
66
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
61
#if 1
2745
61
    {
2746
61
        std::set<uint64_t> moduleIDs;
2747
105
        for (const auto& m : modules ) {
2748
105
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
105
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
105
            moduleIDs.insert(moduleID);
2756
105
        }
2757
2758
61
        std::set<uint64_t> operationModuleIDs;
2759
88
        for (const auto& op : operations) {
2760
88
            operationModuleIDs.insert(op.first->ID);
2761
88
        }
2762
2763
61
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
61
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
61
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
62
        for (const auto& id : addModuleIDs) {
2768
62
            operations.push_back({ modules.at(id), operations[0].second});
2769
62
        }
2770
61
    }
2771
61
#endif
2772
2773
61
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
61
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
211
    for (size_t i = 0; i < operations.size(); i++) {
2781
150
        auto& operation = operations[i];
2782
2783
150
        auto& module = operation.first;
2784
150
        auto& op = operation.second;
2785
2786
150
        if ( i > 0 ) {
2787
115
            auto& prevModule = operations[i-1].first;
2788
115
            auto& prevOp = operations[i].second;
2789
2790
115
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                if ( curModifier.size() == 0 ) {
2793
8.72k
                    for (size_t j = 0; j < 512; j++) {
2794
8.70k
                        curModifier.push_back(1);
2795
8.70k
                    }
2796
26
                } else {
2797
6.75k
                    for (auto& c : curModifier) {
2798
6.75k
                        c++;
2799
6.75k
                    }
2800
26
                }
2801
43
            }
2802
115
        }
2803
2804
150
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
150
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
150
        const auto& result = results.back();
2811
2812
150
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
150
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
150
        if ( options.disableTests == false ) {
2830
150
            tests::test(op, result.second);
2831
150
        }
2832
2833
150
        postprocess(module, op, result);
2834
150
    }
2835
2836
61
    if ( options.noCompare == false ) {
2837
35
        compare(operations, results, data, size);
2838
35
    }
2839
61
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
110
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
110
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
110
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
638
    do {
2725
638
        auto op = getOp(&parentDs, data, size);
2726
638
        auto module = getModule(parentDs);
2727
638
        if ( module == nullptr ) {
2728
473
            continue;
2729
473
        }
2730
2731
165
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
165
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
633
    } while ( parentDs.Get<bool>() == true );
2738
2739
110
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
89
#if 1
2745
89
    {
2746
89
        std::set<uint64_t> moduleIDs;
2747
117
        for (const auto& m : modules ) {
2748
117
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
117
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
117
            moduleIDs.insert(moduleID);
2756
117
        }
2757
2758
89
        std::set<uint64_t> operationModuleIDs;
2759
92
        for (const auto& op : operations) {
2760
92
            operationModuleIDs.insert(op.first->ID);
2761
92
        }
2762
2763
89
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
89
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
89
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
89
        for (const auto& id : addModuleIDs) {
2768
69
            operations.push_back({ modules.at(id), operations[0].second});
2769
69
        }
2770
89
    }
2771
89
#endif
2772
2773
89
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
89
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
250
    for (size_t i = 0; i < operations.size(); i++) {
2781
161
        auto& operation = operations[i];
2782
2783
161
        auto& module = operation.first;
2784
161
        auto& op = operation.second;
2785
2786
161
        if ( i > 0 ) {
2787
122
            auto& prevModule = operations[i-1].first;
2788
122
            auto& prevOp = operations[i].second;
2789
2790
122
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
41
                auto& curModifier = op.modifier.GetVectorPtr();
2792
41
                if ( curModifier.size() == 0 ) {
2793
11.7k
                    for (size_t j = 0; j < 512; j++) {
2794
11.7k
                        curModifier.push_back(1);
2795
11.7k
                    }
2796
23
                } else {
2797
46.7k
                    for (auto& c : curModifier) {
2798
46.7k
                        c++;
2799
46.7k
                    }
2800
18
                }
2801
41
            }
2802
122
        }
2803
2804
161
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
161
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
161
        const auto& result = results.back();
2811
2812
161
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
161
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
161
        if ( options.disableTests == false ) {
2830
161
            tests::test(op, result.second);
2831
161
        }
2832
2833
161
        postprocess(module, op, result);
2834
161
    }
2835
2836
89
    if ( options.noCompare == false ) {
2837
39
        compare(operations, results, data, size);
2838
39
    }
2839
89
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
53
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
53
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
53
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
624
    do {
2725
624
        auto op = getOp(&parentDs, data, size);
2726
624
        auto module = getModule(parentDs);
2727
624
        if ( module == nullptr ) {
2728
516
            continue;
2729
516
        }
2730
2731
108
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
108
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
620
    } while ( parentDs.Get<bool>() == true );
2738
2739
53
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
49
#if 1
2745
49
    {
2746
49
        std::set<uint64_t> moduleIDs;
2747
72
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
49
        std::set<uint64_t> operationModuleIDs;
2759
63
        for (const auto& op : operations) {
2760
63
            operationModuleIDs.insert(op.first->ID);
2761
63
        }
2762
2763
49
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
49
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
49
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
49
        for (const auto& id : addModuleIDs) {
2768
40
            operations.push_back({ modules.at(id), operations[0].second});
2769
40
        }
2770
49
    }
2771
49
#endif
2772
2773
49
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
49
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
152
    for (size_t i = 0; i < operations.size(); i++) {
2781
103
        auto& operation = operations[i];
2782
2783
103
        auto& module = operation.first;
2784
103
        auto& op = operation.second;
2785
2786
103
        if ( i > 0 ) {
2787
79
            auto& prevModule = operations[i-1].first;
2788
79
            auto& prevOp = operations[i].second;
2789
2790
79
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
26
                auto& curModifier = op.modifier.GetVectorPtr();
2792
26
                if ( curModifier.size() == 0 ) {
2793
6.66k
                    for (size_t j = 0; j < 512; j++) {
2794
6.65k
                        curModifier.push_back(1);
2795
6.65k
                    }
2796
13
                } else {
2797
1.43k
                    for (auto& c : curModifier) {
2798
1.43k
                        c++;
2799
1.43k
                    }
2800
13
                }
2801
26
            }
2802
79
        }
2803
2804
103
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
103
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
103
        const auto& result = results.back();
2811
2812
103
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
103
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
103
        if ( options.disableTests == false ) {
2830
103
            tests::test(op, result.second);
2831
103
        }
2832
2833
103
        postprocess(module, op, result);
2834
103
    }
2835
2836
49
    if ( options.noCompare == false ) {
2837
24
        compare(operations, results, data, size);
2838
24
    }
2839
49
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
73
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
73
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
73
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
656
    do {
2725
656
        auto op = getOp(&parentDs, data, size);
2726
656
        auto module = getModule(parentDs);
2727
656
        if ( module == nullptr ) {
2728
523
            continue;
2729
523
        }
2730
2731
133
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
133
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
648
    } while ( parentDs.Get<bool>() == true );
2738
2739
73
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
62
#if 1
2745
62
    {
2746
62
        std::set<uint64_t> moduleIDs;
2747
90
        for (const auto& m : modules ) {
2748
90
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
90
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
90
            moduleIDs.insert(moduleID);
2756
90
        }
2757
2758
62
        std::set<uint64_t> operationModuleIDs;
2759
89
        for (const auto& op : operations) {
2760
89
            operationModuleIDs.insert(op.first->ID);
2761
89
        }
2762
2763
62
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
62
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
62
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
62
        for (const auto& id : addModuleIDs) {
2768
52
            operations.push_back({ modules.at(id), operations[0].second});
2769
52
        }
2770
62
    }
2771
62
#endif
2772
2773
62
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
62
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
203
    for (size_t i = 0; i < operations.size(); i++) {
2781
141
        auto& operation = operations[i];
2782
2783
141
        auto& module = operation.first;
2784
141
        auto& op = operation.second;
2785
2786
141
        if ( i > 0 ) {
2787
111
            auto& prevModule = operations[i-1].first;
2788
111
            auto& prevOp = operations[i].second;
2789
2790
111
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
48
                auto& curModifier = op.modifier.GetVectorPtr();
2792
48
                if ( curModifier.size() == 0 ) {
2793
10.2k
                    for (size_t j = 0; j < 512; j++) {
2794
10.2k
                        curModifier.push_back(1);
2795
10.2k
                    }
2796
28
                } else {
2797
21.5k
                    for (auto& c : curModifier) {
2798
21.5k
                        c++;
2799
21.5k
                    }
2800
28
                }
2801
48
            }
2802
111
        }
2803
2804
141
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
141
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
141
        const auto& result = results.back();
2811
2812
141
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
141
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
141
        if ( options.disableTests == false ) {
2830
141
            tests::test(op, result.second);
2831
141
        }
2832
2833
141
        postprocess(module, op, result);
2834
141
    }
2835
2836
62
    if ( options.noCompare == false ) {
2837
30
        compare(operations, results, data, size);
2838
30
    }
2839
62
}
2840
2841
/* Explicit template instantiation */
2842
template class ExecutorBase<component::Digest, operation::Digest>;
2843
template class ExecutorBase<component::MAC, operation::HMAC>;
2844
template class ExecutorBase<component::MAC, operation::UMAC>;
2845
template class ExecutorBase<component::MAC, operation::CMAC>;
2846
template class ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>;
2847
template class ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>;
2848
template class ExecutorBase<component::Key, operation::KDF_SCRYPT>;
2849
template class ExecutorBase<component::Key, operation::KDF_HKDF>;
2850
template class ExecutorBase<component::Key, operation::KDF_TLS1_PRF>;
2851
template class ExecutorBase<component::Key, operation::KDF_PBKDF>;
2852
template class ExecutorBase<component::Key, operation::KDF_PBKDF1>;
2853
template class ExecutorBase<component::Key, operation::KDF_PBKDF2>;
2854
template class ExecutorBase<component::Key, operation::KDF_ARGON2>;
2855
template class ExecutorBase<component::Key, operation::KDF_SSH>;
2856
template class ExecutorBase<component::Key, operation::KDF_X963>;
2857
template class ExecutorBase<component::Key, operation::KDF_BCRYPT>;
2858
template class ExecutorBase<component::Key, operation::KDF_SP_800_108>;
2859
template class ExecutorBase<component::Key3, operation::KDF_SRTP>;
2860
template class ExecutorBase<component::Key3, operation::KDF_SRTCP>;
2861
template class ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>;
2862
template class ExecutorBase<bool, operation::ECC_ValidatePubkey>;
2863
template class ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>;
2864
template class ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>;
2865
template class ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>;
2866
template class ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>;
2867
template class ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>;
2868
template class ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>;
2869
template class ExecutorBase<bool, operation::ECCSI_Verify>;
2870
template class ExecutorBase<bool, operation::ECDSA_Verify>;
2871
template class ExecutorBase<bool, operation::ECGDSA_Verify>;
2872
template class ExecutorBase<bool, operation::ECRDSA_Verify>;
2873
template class ExecutorBase<bool, operation::Schnorr_Verify>;
2874
template class ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>;
2875
template class ExecutorBase<bool, operation::DSA_Verify>;
2876
template class ExecutorBase<component::DSA_Signature, operation::DSA_Sign>;
2877
template class ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>;
2878
template class ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>;
2879
template class ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>;
2880
template class ExecutorBase<component::Secret, operation::ECDH_Derive>;
2881
template class ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>;
2882
template class ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>;
2883
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>;
2884
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>;
2885
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>;
2886
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>;
2887
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>;
2888
template class ExecutorBase<bool, operation::ECC_Point_Cmp>;
2889
template class ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>;
2890
template class ExecutorBase<component::Bignum, operation::DH_Derive>;
2891
template class ExecutorBase<component::Bignum, operation::BignumCalc>;
2892
template class ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>;
2893
template class ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>;
2894
template class ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>;
2895
template class ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>;
2896
template class ExecutorBase<component::BLS_Signature, operation::BLS_Sign>;
2897
template class ExecutorBase<bool, operation::BLS_Verify>;
2898
template class ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>;
2899
template class ExecutorBase<bool, operation::BLS_BatchVerify>;
2900
template class ExecutorBase<component::G1, operation::BLS_Aggregate_G1>;
2901
template class ExecutorBase<component::G2, operation::BLS_Aggregate_G2>;
2902
template class ExecutorBase<component::Fp12, operation::BLS_Pairing>;
2903
template class ExecutorBase<component::Fp12, operation::BLS_MillerLoop>;
2904
template class ExecutorBase<component::Fp12, operation::BLS_FinalExp>;
2905
template class ExecutorBase<component::G1, operation::BLS_HashToG1>;
2906
template class ExecutorBase<component::G2, operation::BLS_HashToG2>;
2907
template class ExecutorBase<component::G1, operation::BLS_MapToG1>;
2908
template class ExecutorBase<component::G2, operation::BLS_MapToG2>;
2909
template class ExecutorBase<bool, operation::BLS_IsG1OnCurve>;
2910
template class ExecutorBase<bool, operation::BLS_IsG2OnCurve>;
2911
template class ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>;
2912
template class ExecutorBase<component::G1, operation::BLS_Decompress_G1>;
2913
template class ExecutorBase<component::Bignum, operation::BLS_Compress_G1>;
2914
template class ExecutorBase<component::G2, operation::BLS_Decompress_G2>;
2915
template class ExecutorBase<component::G1, operation::BLS_Compress_G2>;
2916
template class ExecutorBase<component::G1, operation::BLS_G1_Add>;
2917
template class ExecutorBase<component::G1, operation::BLS_G1_Mul>;
2918
template class ExecutorBase<bool, operation::BLS_G1_IsEq>;
2919
template class ExecutorBase<component::G1, operation::BLS_G1_Neg>;
2920
template class ExecutorBase<component::G2, operation::BLS_G2_Add>;
2921
template class ExecutorBase<component::G2, operation::BLS_G2_Mul>;
2922
template class ExecutorBase<bool, operation::BLS_G2_IsEq>;
2923
template class ExecutorBase<component::G2, operation::BLS_G2_Neg>;
2924
template class ExecutorBase<component::G1, operation::BLS_G1_MultiExp>;
2925
template class ExecutorBase<Buffer, operation::Misc>;
2926
template class ExecutorBase<bool, operation::SR25519_Verify>;
2927
2928
} /* namespace cryptofuzz */